package com.xy.service;

import com.xy.annotate.RestMappingController;
import com.xy.dto.DeviceDataDto;
import com.xy.utils.PageBean;
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-01-11
 */
@RestMappingController("/device-data")
public interface DeviceDataService {
    /**
     * 指定查询商户所有设备某天数据
     *
     * @param dto
     * @return
     */
    @PostMapping("getByDay")
    R<List<DeviceDataDto.Vo>> getMercDataOneDay(@RequestBody @Validated DeviceDataDto.CountByDay dto);

    /**
     * 指定查询商户所有设备某月数据
     *
     * @param dto
     * @return
     */
    @PostMapping("getMercDataOneMonth")
    R<List<DeviceDataDto.Vo>> getMercDataOneMonth(@RequestBody @Validated DeviceDataDto.CountByMonth dto);


    @PostMapping("dayChart")
    R<List<DeviceDataDto.DayChartVo>> dayChart(@RequestBody DeviceDataDto.DayChartDto dto);

    /**
     * 商户日期维度查询
     *
     * @param pageByMercAndDate
     * @return
     */
    @PostMapping("pageByMercAndDate")
    R<PageBean<DeviceDataDto.Vo>> pageByMercAndDate(@RequestBody @Validated DeviceDataDto.PageByMercAndDate pageByMercAndDate);

    /**
     * 商户日期维度统计查询
     *
     * @param pageByMercAndDate
     * @return
     */
    @PostMapping("pageByMercAndDateCount")
    R<Long> pageByMercAndDateCount(@RequestBody @Validated DeviceDataDto.PageByMercAndDate pageByMercAndDate);

}
