Commit 586d0b15 by ping.wu

回退积分接口调整

parent 7134b154
......@@ -39,6 +39,7 @@ import com.freemud.api.assortment.datamanager.manager.AssortmentOpenPlatformIapp
import com.freemud.api.assortment.datamanager.manager.AssortmentOpenPlatformPartnerConfigManager;
import com.freemud.api.assortment.datamanager.manager.customer.AssortmentCustomerInfoManager;
import com.freemud.application.sdk.api.log.LogThreadLocal;
import com.freemud.application.sdk.api.membercenter.request.ReturnScoreRequest;
import com.freemud.application.sdk.api.ordercenter.entities.v1.OrderBeanV1;
import com.freemud.application.sdk.api.ordercenter.entities.v1.ProductBeanV1;
import com.freemud.application.sdk.api.ordercenter.enums.OrderClientType;
......@@ -478,20 +479,12 @@ public class PointsMallOrderServiceImpl implements PointsMallOrderService {
}
//确认订单或支付成功失败,冲正活动库存与积分
if (orderFail) {
UseScoreRequest userScoreRequest = new UseScoreRequest();
ReturnScoreRequest userScoreRequest = new ReturnScoreRequest();
userScoreRequest.setMemberId(memberId);
userScoreRequest.setPartnerId(partnerId);
userScoreRequest.setChangeScore(points);
userScoreRequest.setOperationType(12);
userScoreRequest.setOperationName("积分兑换");
userScoreRequest.setChangeType(1);
userScoreRequest.setOperationType(1);
userScoreRequest.setOrderId(orderCode);
userScoreRequest.setOrgCode("");
userScoreRequest.setOrgType(1);
userScoreRequest.setIdempotencyBussinessId(LogThreadLocal.getTrackingNo());
userScoreRequest.setIdempotencyBussinessType("5");
userScoreRequest.setAppId(appId);
CustomerPropertyBaseResponse baseResponse = customerPropertyClient.useScore(userScoreRequest);
CustomerPropertyBaseResponse baseResponse = customerPropertyClient.returnScore(userScoreRequest);
}
} catch (Exception e) {
AppLogUtil.errorLog("createOrderFail_error", null, null, e);
......
......@@ -2,6 +2,8 @@ package cn.freemud.service.thirdparty;
import cn.freemud.annotations.LogIgnoreFeign;
import cn.freemud.entities.dto.user.*;
import com.freemud.application.sdk.api.base.BaseResponse;
import com.freemud.application.sdk.api.membercenter.request.ReturnScoreRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
......@@ -18,6 +20,15 @@ public interface CustomerPropertyClient {
@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);
@LogIgnoreFeign(logMessage="statisticalScore")
@PostMapping({"/propertyservice/score/statisticalScore"})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment