package com.neusoft.smart.pos.gateway.service.feignService;

import com.neusoft.smart.pos.dto.trade.request.GetDailyRequest;
import com.neusoft.smart.pos.dto.trade.request.GetShopTradeSummaryRequest;
import com.neusoft.smart.pos.dto.trade.response.*;
import com.neusoft.smart.pos.framework.bean.PaginationExtendBean;
import com.neusoft.smart.pos.framework.dto.ResponseData;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;
import java.util.List;

@FeignClient(value = "service-trade/tradeStatistics")
public interface RemoteTradeStatisticsService {

    @GetMapping("/daily")
    ResponseData<GetDailyResponse> queryPayDaily(@RequestParam("orgId") Integer orgId
            , @RequestParam(value="shopIds") List<Integer> shopIds
            , @RequestParam(value="startTime",defaultValue = "") String startTime
            , @RequestParam(value="endTime",defaultValue = "") String endTime
            , @RequestParam("offset") Integer offset
            , @RequestParam("limit") Integer limit
            , @RequestParam("isPage") Boolean isPage);

    @GetMapping("/payChannelSummaryForPos")
    ResponseData<GetPayChannelSummaryForPosResponse> queryPayChannelSummaryForPos(
            @RequestParam(value="serialNo",defaultValue = "") String serialNo
            , @RequestParam(value="dateTime",defaultValue = "") String dateTime
            , @RequestParam(value="endTime",defaultValue = "") String endTime
            , @RequestParam(value="startTime",defaultValue = "") String startTime
            , @RequestParam(value="timeMode",defaultValue = "2") String timeMode);
    
    @GetMapping("/shopTradeSummary")
    ResponseData<GetShopTradeSummaryResponse> queryShopTradeSummary(@RequestParam("orgId") Integer orgId
            , @RequestParam(value="shopIds",defaultValue = "") List<Integer> shopIds
            , @RequestParam(value="startTime",defaultValue = "") String startTime
            , @RequestParam(value="endTime",defaultValue = "") String endTime
            , @RequestParam(value="dateTime",defaultValue = "") String dateTime
            , @RequestParam(value="timeMode",defaultValue = "") String timeMode
    );
    
    @ApiOperation(value = "支付方式交易统计查询接口", notes = "支付方式交易统计查询接口")
    @GetMapping("/payTypeTradeSummary")
    ResponseData<GetPayTypeTradeSummaryResponse> queryPayTypeTradeSummary(
            @RequestParam("orgId") Integer orgId
            , @RequestParam(value="shopIds",defaultValue = "") List<Integer> shopIds
            , @RequestParam(value="startTime",defaultValue = "") String startTime
            , @RequestParam(value="endTime",defaultValue = "") String endTime
    );
}