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

import com.neusoft.smart.pos.dto.trade.request.GetSettlementRequest;
import com.neusoft.smart.pos.dto.trade.request.PostSettlementRequest;
import com.neusoft.smart.pos.dto.trade.request.PutSettlementRequest;
import com.neusoft.smart.pos.dto.trade.response.GetSettlementResponse;
import com.neusoft.smart.pos.dto.trade.response.PostSettlementResponse;
import com.neusoft.smart.pos.dto.trade.response.PutSettlementResponse;
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.*;

import javax.validation.Valid;

/**
 * 商户结算信息管理使用远程调用service
 */
@FeignClient(value = "service-trade/tradeSettlement")
public interface RemoteTradeSettlementService {

    @PostMapping("/settlement")
    ResponseData<PostSettlementResponse> saveSettlement(@RequestBody PostSettlementRequest settlementRequest);

    @PutMapping("/settlement")
    ResponseData<PutSettlementResponse> updateSettlement(@RequestBody PutSettlementRequest settlementRequest);

    @GetMapping("/settlement")
    ResponseData<GetSettlementResponse> querySettlement(@RequestParam(value="serialNo",defaultValue = "") String serialNo);
    
    @GetMapping("/settlementByShopId")
    ResponseData<GetSettlementResponse> querySettlementByShopId(@RequestParam(value="orgId",defaultValue = "0") Integer orgId, @RequestParam(value="shopId",defaultValue = "0") Integer shopId);
}