
package cn.freemud.service.thirdparty;
import cn.freemud.entities.dto.GetSvcInfoByMemberIdResponse;
import cn.freemud.entities.dto.StatisticalPropertyRequest;
import com.freemud.application.sdk.api.base.BaseResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import cn.freemud.annotations.IgnoreFeignLogAnnotation;
import cn.freemud.entities.dto.user.CustomerPropertyBaseResponse;
import cn.freemud.entities.dto.user.GetSvcInfoByMemberIdResponseVo;
import cn.freemud.entities.dto.user.StatisticalScoreRequestVo;
import cn.freemud.entities.dto.user.StatisticalScoreResponse;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @author yuanyuan.jing
 */
@FeignClient(name = "customer-property-service", url = "${customer.property.service.url:}")
@RequestMapping(produces = {"application/json;charset=UTF-8"})
public interface CustomerPropertyClient {


    @IgnoreFeignLogAnnotation(logMessage="getMemberCards")
    @PostMapping(value = "/propertyservice/card/getMemberCards")
    BaseResponse<List<GetSvcInfoByMemberIdResponse>> getMemberCards(@RequestBody StatisticalPropertyRequest statisticalPropertyRequest);
//    @LogIgnoreFeign(logMessage="useScore")
//    @PostMapping(value = "/propertyservice/score/pay")
//    CustomerPropertyBaseResponse<PayScoreResponse> useScore(@RequestBody UseScoreRequest userScoreRequest);
//
//    /**
//     * 积分回退
//     * @param request
//     * @return
//     */
//    @LogIgnoreFeign(logMessage = "returnScore")
//    @PostMapping({"/propertyservice/score/returnScore"})
//    CustomerPropertyBaseResponse returnScore(ReturnScoreRequest request);


    @IgnoreFeignLogAnnotation(logMessage="statisticalScore")
    @PostMapping({"/propertyservice/score/statisticalScore"})
    CustomerPropertyBaseResponse<StatisticalScoreResponse> statisticalScore(StatisticalScoreRequestVo request);

    //查询用户储值卡或会员卡
//    @IgnoreFeignLogAnnotation(logMessage="getMemberCards")
//    @PostMapping({"/propertyservice/card/getMemberCards"})
//    CustomerPropertyBaseResponse<List<GetSvcInfoByMemberIdResponseVo>> getMemberCards(StatisticalScoreRequestVo request);

}
