package cn.freemud.service.thirdparty;

import cn.freemud.annotations.LogIgnoreFeign;
import cn.freemud.constant.ResponseCodeKeyConstant;
import cn.freemud.entities.dto.CouponCodeResponseDto;
import cn.freemud.entities.dto.CouponCodeVerificationDto;
import cn.freemud.entities.dto.coupon.PreCheckAndLockReq;
import com.freemud.application.sdk.api.base.BaseResponse;
import com.freemud.application.sdk.api.couponcenter.offline.response.CouponLockResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient(name = "OPEN-STORE-OFFLINE-COUPON-SERVICE",url="${saas.couponofflineclient.feign.url}")
public interface CouponOfflineClient {


    @LogIgnoreFeign(logMessage="verification",messageFieldName= ResponseCodeKeyConstant.MSG,statusCodeFieldName=ResponseCodeKeyConstant.STATUS_CODE)
    @PostMapping("/api")
    CouponCodeResponseDto verification(CouponCodeVerificationDto couponCodeVerificationDto);

    /**
     * 预校验锁定券新接口
     */
    @LogIgnoreFeign(logMessage="precheckAndLock",messageFieldName= ResponseCodeKeyConstant.MSG,statusCodeFieldName=ResponseCodeKeyConstant.STATUS_CODE)
    @PostMapping("/standard/checkandlock")
    CouponCodeResponseDto preCheckAndLock(PreCheckAndLockReq couponCodeVerificationDto);
}
