package com.xy.service;

import com.xy.annotate.RestMappingController;
import com.xy.dto.DeviceChargingDto;
import com.xy.utils.R;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * <p>
 * 设备计费表 服务类
 * </p>
 *
 * @author lijin
 * @since 2023-04-14
 */
@RestMappingController("/device-charging")
public interface DeviceChargingService {

    /**
     * 购买
     *
     * @param pay
     * @return
     */
    @PostMapping("pay")
    R pay(@RequestBody DeviceChargingDto.Pay pay);

    /**
     * 购买回调
     *
     * @param payNotice
     * @return
     */
    @PostMapping("payNotice")
    R payNotice(@RequestBody DeviceChargingDto.PayNotice payNotice);

    /**
     * 集合查询
     *
     * @return
     */
    @PostMapping("list")
    R<List<DeviceChargingDto.Vo>> list(@RequestBody @Validated DeviceChargingDto.SelectList selectList);

    /**
     * 查询过期条数
     *
     * @param deviceChargingTimeoutCount
     * @return
     */
    @PostMapping("deviceChargingTimeoutCount")
    R<DeviceChargingDto.DeviceChargingTimeoutCountVo> deviceChargingTimeoutCount(@RequestBody @Validated DeviceChargingDto.DeviceChargingTimeoutCount deviceChargingTimeoutCount);
}
