Commit 0ea70850 by 张跃

券码预交验

parent 987599dd
......@@ -3663,6 +3663,7 @@ public class OrderSdkAdapter {
}
CreateOrderAccountRequest accountBean = accountRequest.get();
CouponRequest couponRequest = new CouponRequest();
couponRequest.setReqtype(71);
couponRequest.setVer(Integer.valueOf(Version.VERSION_1));
couponRequest.setPartnerId(Integer.parseInt(orderBean.getCompanyId()));
ActivityChannelEnum activityChannelEnum = orderTypeEnumConvert2ActivityChannel(orderBean.getOrderType());
......
......@@ -227,10 +227,10 @@ public class OrderCenterSdkServiceImpl implements OrderCenterSdkService {
// 下单成锁定劵,冻结失败提示下单失败并冲正库存积分等,判断支付渠道,积分和svc卡直接核销,无需锁定10102 = svc卡支付 || 支付金额小于等于0
//todo:统一流程 下单锁券再核销
CouponLockRequest couponLockRequest = orderSdkAdapter.convert2CouponLockRequest(orderBean, accounts);
// CouponLockRequest couponLockRequest = orderSdkAdapter.convert2CouponLockRequest(orderBean, accounts);
CouponRequest request = orderSdkAdapter.convert2PreCheckRequest(orderBean, accounts, openId);
request.setChannel_codes(getOrgCodes(orderBean.getCompanyId(),orderBean.getShopId()));
if (couponLockRequest != null) {
request.setChannel_ids(getOrgCodes(orderBean.getCompanyId(),orderBean.getShopId()));
if (request != null) {
// BaseResponse<CouponLockResponse> couponLockResponseBaseResponse = offlineCouponSdkService.couponLock(couponLockRequest, "");
BaseResponse<CouponLockResponse> couponLockResponseBaseResponse = offlineCouponSdkService.precheckAndLock(request, LogThreadLocal.getTrackingNo());
if (!ObjectUtils.equals(RESPONSE_SUCCESS_STR, couponLockResponseBaseResponse.getCode())) {
......
......@@ -107,7 +107,7 @@ public class PlatformCouponRelationServiceImpl implements CouponRelationService
couponCodeVerificationDto.setOrderPaymentAmount(orderBean.getAmount());
couponCodeVerificationDto.setOrderDiscountAmount(orderBean.getOriginalAmount().longValue()-orderBean.getAmount());
// 核销券新增参数:组织机构ID
couponCodeVerificationDto.setChannel_codes(storeService.getOrgIdsArr(orderBean.getCompanyId(), orderBean.getShopId()));
couponCodeVerificationDto.setChannel_ids(storeService.getOrgIdsArr(orderBean.getCompanyId(), orderBean.getShopId()));
try {
//71.券核销
for (int i = 2; i >= 0; i--) {
......
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