|
@@ -2331,6 +2331,7 @@ public class OrderServiceImpl implements OrderService {
|
|
//生成商户订单号
|
|
//生成商户订单号
|
|
Snowflake snowflake = IdUtil.createSnowflake(14, 14);
|
|
Snowflake snowflake = IdUtil.createSnowflake(14, 14);
|
|
String orderSn = "8" + snowflake.nextIdStr().substring(6);
|
|
String orderSn = "8" + snowflake.nextIdStr().substring(6);
|
|
|
|
+ LOGGER.info("订单======>{},请求生成订单数据======>{}", orderSn, JacksonUtil.toJson(param));
|
|
// 检查库存和更新库存
|
|
// 检查库存和更新库存
|
|
for (QueryGoodsVO goodsDto : queryGoodsVOList) {
|
|
for (QueryGoodsVO goodsDto : queryGoodsVOList) {
|
|
// 要购买的数量
|
|
// 要购买的数量
|
|
@@ -2354,8 +2355,7 @@ public class OrderServiceImpl implements OrderService {
|
|
LOGGER.error("sku:【{}】库存不足,门店可用库存:【{}】,仓库可用库存:【{}】,购买数量:【{}】", sku, stockNum, warehouseStock, sellVolume);
|
|
LOGGER.error("sku:【{}】库存不足,门店可用库存:【{}】,仓库可用库存:【{}】,购买数量:【{}】", sku, stockNum, warehouseStock, sellVolume);
|
|
throw new ServiceException(String.format("sku:【%s】库存不足,门店可用库存:【%s】,仓库可用库存:【%s】,购买数量:【%s】", sku, stockNum, warehouseStock, sellVolume));
|
|
throw new ServiceException(String.format("sku:【%s】库存不足,门店可用库存:【%s】,仓库可用库存:【%s】,购买数量:【%s】", sku, stockNum, warehouseStock, sellVolume));
|
|
}
|
|
}
|
|
- sellVolume -= 1;
|
|
|
|
- // TODO 库存变化记录新增字段:订单号、门店编号
|
|
|
|
|
|
+ // 库存变化记录新增字段:订单号、门店编号
|
|
// 门店库存变化记录
|
|
// 门店库存变化记录
|
|
StoreMngChangeEntity storeMngChangeEntity = new StoreMngChangeEntity();
|
|
StoreMngChangeEntity storeMngChangeEntity = new StoreMngChangeEntity();
|
|
storeMngChangeEntity.setChangeType(Dict.changeType.item_1.getItem());
|
|
storeMngChangeEntity.setChangeType(Dict.changeType.item_1.getItem());
|
|
@@ -2793,10 +2793,14 @@ public class OrderServiceImpl implements OrderService {
|
|
if (!org.springframework.util.StringUtils.isEmpty(memberCode)) {
|
|
if (!org.springframework.util.StringUtils.isEmpty(memberCode)) {
|
|
// 同步会员订单消费记录
|
|
// 同步会员订单消费记录
|
|
syncMemberConsumeRecord(memberPhone, order, deductionScore);
|
|
syncMemberConsumeRecord(memberPhone, order, deductionScore);
|
|
- syncMemberScoreChangeRecord(openId, order, deductionScore, "下单扣减", queryGoodsVOList, giftGoodsScoreDetailMap, HaiKongMemberScoreChangeEventEnum.SUBTRACT.getEvent());
|
|
|
|
- // 积分变动接口,下单扣减
|
|
|
|
|
|
+ if (deductionScore > 0) {
|
|
|
|
+ // 积分变动接口,下单扣减
|
|
|
|
+ syncMemberScoreChangeRecord(openId, order, deductionScore, "下单扣减", queryGoodsVOList, giftGoodsScoreDetailMap, HaiKongMemberScoreChangeEventEnum.SUBTRACT.getEvent());
|
|
|
|
+ }
|
|
Integer score = memberScore.get();
|
|
Integer score = memberScore.get();
|
|
- syncMemberScoreChangeRecord(openId, order, score, "下单赠送", queryGoodsVOList, giftGoodsScoreDetailMap, HaiKongMemberScoreChangeEventEnum.ADD.getEvent());
|
|
|
|
|
|
+ if (score > 0) {
|
|
|
|
+ syncMemberScoreChangeRecord(openId, order, score, "下单赠送", queryGoodsVOList, giftGoodsScoreDetailMap, HaiKongMemberScoreChangeEventEnum.ADD.getEvent());
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
// 生成取票码
|
|
// 生成取票码
|
|
@@ -2818,7 +2822,7 @@ public class OrderServiceImpl implements OrderService {
|
|
JedisUtil.del(Constants.WAREHOUSE_STOCK_MAP_KEY + "_" + storeId);
|
|
JedisUtil.del(Constants.WAREHOUSE_STOCK_MAP_KEY + "_" + storeId);
|
|
|
|
|
|
|
|
|
|
- if (org.springframework.util.StringUtils.isEmpty(env) && Constants.TEST.equals(env)) {
|
|
|
|
|
|
+ if (!org.springframework.util.StringUtils.isEmpty(env) && Constants.TEST.equals(env)) {
|
|
order.setPayApp("wxpay");
|
|
order.setPayApp("wxpay");
|
|
order.setRequest("1111111111111111111");
|
|
order.setRequest("1111111111111111111");
|
|
order.setResponse("2222222222222222222");
|
|
order.setResponse("2222222222222222222");
|
|
@@ -2878,6 +2882,10 @@ public class OrderServiceImpl implements OrderService {
|
|
} else if (Objects.nonNull(r) && ErrorCodeConstants.VmcShopSysErrorCodeEnum.CODE_10500.getCode().equals(r.getCode())) {
|
|
} else if (Objects.nonNull(r) && ErrorCodeConstants.VmcShopSysErrorCodeEnum.CODE_10500.getCode().equals(r.getCode())) {
|
|
pickUpCodeService.updatePickUpCodeStatusByOrderSn(orderSn, Dict.PickUpCodeStatusEnum.item_6.getStatus());
|
|
pickUpCodeService.updatePickUpCodeStatusByOrderSn(orderSn, Dict.PickUpCodeStatusEnum.item_6.getStatus());
|
|
haiKongSendOrderInfoRecordEntity.setResendStatus(HaiKongMemberOrderResendStatusEnum.NON_RESEND.getStatus());
|
|
haiKongSendOrderInfoRecordEntity.setResendStatus(HaiKongMemberOrderResendStatusEnum.NON_RESEND.getStatus());
|
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
|
+ map.put("orderSn", orderSn);
|
|
|
|
+ map.put("clearMsg", response);
|
|
|
|
+ orderProcessRecordDao.updateMallOrderProcessRecord(map);
|
|
LOGGER.error("推送订单到免税mall失败!响应结果:{}", response);
|
|
LOGGER.error("推送订单到免税mall失败!响应结果:{}", response);
|
|
} else if (Objects.isNull(r)) {
|
|
} else if (Objects.isNull(r)) {
|
|
pickUpCodeService.updatePickUpCodeStatusByOrderSn(orderSn, Dict.PickUpCodeStatusEnum.item_6.getStatus());
|
|
pickUpCodeService.updatePickUpCodeStatusByOrderSn(orderSn, Dict.PickUpCodeStatusEnum.item_6.getStatus());
|
|
@@ -2921,6 +2929,7 @@ public class OrderServiceImpl implements OrderService {
|
|
entity.setIdentityCard(seaportInfo.getIdentityCard());
|
|
entity.setIdentityCard(seaportInfo.getIdentityCard());
|
|
entity.setIdentityMobile(seaportInfo.getIdentityMobile());
|
|
entity.setIdentityMobile(seaportInfo.getIdentityMobile());
|
|
entity.setIdentityName(seaportInfo.getIdentityName());
|
|
entity.setIdentityName(seaportInfo.getIdentityName());
|
|
|
|
+ entity.setOutTradeNo(sendOrderToVmcShopDTO.getPayInfo().getOutTradeNo());
|
|
entity.setOrderProductInfo(JacksonUtil.toJson(seaportInfo.getOrderProductInfoList()));
|
|
entity.setOrderProductInfo(JacksonUtil.toJson(seaportInfo.getOrderProductInfoList()));
|
|
|
|
|
|
return entity;
|
|
return entity;
|
|
@@ -2958,7 +2967,21 @@ public class OrderServiceImpl implements OrderService {
|
|
String response = order.getResponse();
|
|
String response = order.getResponse();
|
|
response = response.replaceAll("\r|\n", "");
|
|
response = response.replaceAll("\r|\n", "");
|
|
payInfoDTO.setResponse(response);
|
|
payInfoDTO.setResponse(response);
|
|
- payInfoDTO.setOutTradeNo(order.getAliTradeNo());
|
|
|
|
|
|
+ if ("wxpay".equals(order.getPayApp())) {
|
|
|
|
+ String payTransactionId = order.getPayTransactionId();
|
|
|
|
+ if (org.springframework.util.StringUtils.isEmpty(payTransactionId)) {
|
|
|
|
+ OrderEntity orderEntity = orderDao.queryObjectByOrderSn(order.getOrder_sn());
|
|
|
|
+ payTransactionId = orderEntity.getPayTransactionId();
|
|
|
|
+ }
|
|
|
|
+ payInfoDTO.setOutTradeNo(payTransactionId);
|
|
|
|
+ } else {
|
|
|
|
+ String aliTradeNo = order.getAliTradeNo();
|
|
|
|
+ if (org.springframework.util.StringUtils.isEmpty(aliTradeNo)) {
|
|
|
|
+ OrderEntity orderEntity = orderDao.queryObjectByOrderSn(order.getOrder_sn());
|
|
|
|
+ aliTradeNo = orderEntity.getAliTradeNo();
|
|
|
|
+ }
|
|
|
|
+ payInfoDTO.setOutTradeNo(aliTradeNo);
|
|
|
|
+ }
|
|
return payInfoDTO;
|
|
return payInfoDTO;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2978,8 +3001,9 @@ public class OrderServiceImpl implements OrderService {
|
|
orderInfoItemDTO.setPrice(orderGoodsVo.getRetail_price());
|
|
orderInfoItemDTO.setPrice(orderGoodsVo.getRetail_price());
|
|
orderInfoItemDTO.setItemcode(orderGoodsVo.getSku());
|
|
orderInfoItemDTO.setItemcode(orderGoodsVo.getSku());
|
|
orderInfoItemDTO.setAmount(orderGoodsVo.getActualPaymentAmount());
|
|
orderInfoItemDTO.setAmount(orderGoodsVo.getActualPaymentAmount());
|
|
- orderInfoItemDTO.setBuyPrice(orderGoodsVo.getActualPaymentAmount());
|
|
|
|
- orderInfoItemDTO.setNums(orderGoodsVo.getNumber());
|
|
|
|
|
|
+ Integer number = orderGoodsVo.getNumber();
|
|
|
|
+ orderInfoItemDTO.setBuyPrice(orderGoodsVo.getActualPaymentAmount().divide(BigDecimal.valueOf(number), 2, BigDecimal.ROUND_HALF_UP));
|
|
|
|
+ orderInfoItemDTO.setNums(number);
|
|
orderInfoItemDTO.setTax("true");
|
|
orderInfoItemDTO.setTax("true");
|
|
orderInfoItemDTO.setTaxPrice(orderGoodsVo.getTaxPrice());
|
|
orderInfoItemDTO.setTaxPrice(orderGoodsVo.getTaxPrice());
|
|
return orderInfoItemDTO;
|
|
return orderInfoItemDTO;
|
|
@@ -3200,6 +3224,12 @@ public class OrderServiceImpl implements OrderService {
|
|
orderDao.updateOrderInfo(orderRaram);
|
|
orderDao.updateOrderInfo(orderRaram);
|
|
this.confirmPay(order.getId(), Dict.payFlag.item_weixin.getItem(), orderWXPayRecordCurrent.getOutTradeNoWX());
|
|
this.confirmPay(order.getId(), Dict.payFlag.item_weixin.getItem(), orderWXPayRecordCurrent.getOutTradeNoWX());
|
|
|
|
|
|
|
|
+ sendWxPayInfo(order, store, wechatMicropayApiResult.getTransaction_id());
|
|
|
|
+ HaiKongSendOrderInfoRecordEntity haiKongSendOrderInfoRecordEntity = new HaiKongSendOrderInfoRecordEntity();
|
|
|
|
+ haiKongSendOrderInfoRecordEntity.setOuterOrderNo(order.getOrder_sn());
|
|
|
|
+ haiKongSendOrderInfoRecordEntity.setOutTradeNo(wechatMicropayApiResult.getTransaction_id());
|
|
|
|
+ haiKongSendOrderInfoRecordService.updateByOrderSn(haiKongSendOrderInfoRecordEntity);
|
|
|
|
+
|
|
// 设置支付单完成时间
|
|
// 设置支付单完成时间
|
|
processRecordEntity.setPaymentSuccTimeStr(wechatMicropayApiResult.getTime_end());
|
|
processRecordEntity.setPaymentSuccTimeStr(wechatMicropayApiResult.getTime_end());
|
|
processRecordEntity.setPaymentSuccTime(
|
|
processRecordEntity.setPaymentSuccTime(
|
|
@@ -3214,9 +3244,8 @@ public class OrderServiceImpl implements OrderService {
|
|
int times = 0;
|
|
int times = 0;
|
|
// 查询是否支付了
|
|
// 查询是否支付了
|
|
while (true) {
|
|
while (true) {
|
|
- boolean flag = orderQuery(order, processRecordEntity);
|
|
|
|
|
|
+ boolean flag = orderQuery(order, processRecordEntity, store);
|
|
if (flag) {
|
|
if (flag) {
|
|
- atomicBoolean.set(true);
|
|
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
try {
|
|
try {
|
|
@@ -3255,20 +3284,21 @@ public class OrderServiceImpl implements OrderService {
|
|
throw new RuntimeException("未支付或支付失败,请联系管理员");
|
|
throw new RuntimeException("未支付或支付失败,请联系管理员");
|
|
}
|
|
}
|
|
|
|
|
|
- if (atomicBoolean.get()) {
|
|
|
|
- // 推送支付单
|
|
|
|
- sendWxPayInfo(order, store, wechatMicropayApiResult);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- private void sendWxPayInfo(OrderVo order, StoreEntity store, WechatMicropayApiResult wechatMicropayApiResult) {
|
|
|
|
|
|
+ private void sendWxPayInfo(OrderVo order, StoreEntity store, String tradeNo) {
|
|
// 组装支付单信息
|
|
// 组装支付单信息
|
|
String payTransactionId = "";
|
|
String payTransactionId = "";
|
|
- if (Objects.nonNull(wechatMicropayApiResult)) {
|
|
|
|
- payTransactionId = wechatMicropayApiResult.getTransaction_id();
|
|
|
|
|
|
+ if (!org.springframework.util.StringUtils.isEmpty(tradeNo)) {
|
|
|
|
+ payTransactionId = tradeNo;
|
|
} else {
|
|
} else {
|
|
- payTransactionId = order.getPayTransactionId();
|
|
|
|
|
|
+ if (!org.springframework.util.StringUtils.isEmpty(order.getPayTransactionId())) {
|
|
|
|
+ payTransactionId = order.getPayTransactionId();
|
|
|
|
+ } else {
|
|
|
|
+ OrderEntity orderEntity = orderDao.queryObjectByOrderSn(order.getOrder_sn());
|
|
|
|
+ payTransactionId = orderEntity.getPayTransactionId();
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
Map<String, Object> orderSendCusParams = new HashMap<>();
|
|
Map<String, Object> orderSendCusParams = new HashMap<>();
|
|
@@ -3281,7 +3311,8 @@ public class OrderServiceImpl implements OrderService {
|
|
orderSendCusParams.put("transactionId", payTransactionId);
|
|
orderSendCusParams.put("transactionId", payTransactionId);
|
|
orderSendCusParams.put("subOrderId", ""); // ccnet原逻辑没有对该字段赋值
|
|
orderSendCusParams.put("subOrderId", ""); // ccnet原逻辑没有对该字段赋值
|
|
orderSendCusParams.put("subOrderNo", order.getOrder_sn());
|
|
orderSendCusParams.put("subOrderNo", order.getOrder_sn());
|
|
- orderSendCusParams.put("feeType", order.getFeeType());
|
|
|
|
|
|
+ orderSendCusParams.put("feeType", "CNY");
|
|
|
|
+ orderSendCusParams.put("duty", 0);
|
|
int orderFee = order.getActual_price().multiply(new BigDecimal(100)).intValue();
|
|
int orderFee = order.getActual_price().multiply(new BigDecimal(100)).intValue();
|
|
orderSendCusParams.put("orderFee", orderFee);
|
|
orderSendCusParams.put("orderFee", orderFee);
|
|
orderSendCusParams.put("productFee", orderFee);
|
|
orderSendCusParams.put("productFee", orderFee);
|
|
@@ -3415,7 +3446,7 @@ public class OrderServiceImpl implements OrderService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- private boolean orderQuery(OrderVo order, OrderProcessRecordEntity processRecordEntity) {
|
|
|
|
|
|
+ private boolean orderQuery(OrderVo order, OrderProcessRecordEntity processRecordEntity, StoreEntity store) {
|
|
LOGGER.info(">>>>>>>>>>>>>>>>>>>>wxOrderQuery 微信查询接口调用");
|
|
LOGGER.info(">>>>>>>>>>>>>>>>>>>>wxOrderQuery 微信查询接口调用");
|
|
String merchOrderSn = order.getMerchOrderSn();
|
|
String merchOrderSn = order.getMerchOrderSn();
|
|
String orderId = order.getId() + "";
|
|
String orderId = order.getId() + "";
|
|
@@ -3437,8 +3468,19 @@ public class OrderServiceImpl implements OrderService {
|
|
Map processParam = Maps.newHashMap();
|
|
Map processParam = Maps.newHashMap();
|
|
processParam.put("payTime", successTime);
|
|
processParam.put("payTime", successTime);
|
|
processParam.put("orderSn", orderSn);
|
|
processParam.put("orderSn", orderSn);
|
|
|
|
+ order.setPayTransactionId(result.getTransaction_id());
|
|
orderDao.updateOrderProcessRecord(processParam);
|
|
orderDao.updateOrderProcessRecord(processParam);
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ sendWxPayInfo(order, store, result.getTransaction_id());
|
|
|
|
+ HaiKongSendOrderInfoRecordEntity haiKongSendOrderInfoRecordEntity = new HaiKongSendOrderInfoRecordEntity();
|
|
|
|
+ haiKongSendOrderInfoRecordEntity.setOutTradeNo(result.getTransaction_id());
|
|
|
|
+ haiKongSendOrderInfoRecordEntity.setResponse(JacksonUtil.toJson(result));
|
|
|
|
+ haiKongSendOrderInfoRecordEntity.setOuterOrderNo(order.getOrder_sn());
|
|
|
|
+
|
|
|
|
+ haiKongSendOrderInfoRecordService.updateByOrderSn(haiKongSendOrderInfoRecordEntity);
|
|
|
|
+
|
|
// orderWXPayRecordService
|
|
// orderWXPayRecordService
|
|
// .updateWXPayRecordTradeState(orderWXPayRecordTemp.getId(), wechatRefundApiResult);
|
|
// .updateWXPayRecordTradeState(orderWXPayRecordTemp.getId(), wechatRefundApiResult);
|
|
|
|
|
|
@@ -4826,6 +4868,12 @@ public class OrderServiceImpl implements OrderService {
|
|
.multiply(BigDecimal.valueOf(goodsDetailsDto.getSellVolume()));
|
|
.multiply(BigDecimal.valueOf(goodsDetailsDto.getSellVolume()));
|
|
skuTotalPrice = skuTotalPrice.add(skuActualPaymentAmount);
|
|
skuTotalPrice = skuTotalPrice.add(skuActualPaymentAmount);
|
|
}
|
|
}
|
|
|
|
+ } else if (CollectionUtils.isEmpty(scoreDeductionAllowSkuList) && !CollectionUtils.isEmpty(scoreDeductionRejectSkuList)) {
|
|
|
|
+ if (!scoreDeductionRejectSkuList.contains(sku)) {
|
|
|
|
+ BigDecimal skuActualPaymentAmount = goodsDetailsDto.getActualPaymentAmount()
|
|
|
|
+ .multiply(BigDecimal.valueOf(goodsDetailsDto.getSellVolume()));
|
|
|
|
+ skuTotalPrice = skuTotalPrice.add(skuActualPaymentAmount);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -5346,6 +5394,7 @@ public class OrderServiceImpl implements OrderService {
|
|
return R.error("该订单所属商户不存在:"+orderEntity.getOrderSn());
|
|
return R.error("该订单所属商户不存在:"+orderEntity.getOrderSn());
|
|
}
|
|
}
|
|
// 组装支付单信息
|
|
// 组装支付单信息
|
|
|
|
+ UserEntity userEntity = userService.queryByMobile(orderEntity.getMobile());
|
|
Map<String, Object> orderSendCusParams = new HashMap<>();
|
|
Map<String, Object> orderSendCusParams = new HashMap<>();
|
|
if(Dict.payFlag.item_weixin.getItem().equals(orderEntity.getPayFlag())){
|
|
if(Dict.payFlag.item_weixin.getItem().equals(orderEntity.getPayFlag())){
|
|
orderSendCusParams.put("merchSn", orderEntity.getMerchSn());
|
|
orderSendCusParams.put("merchSn", orderEntity.getMerchSn());
|
|
@@ -5363,7 +5412,6 @@ public class OrderServiceImpl implements OrderService {
|
|
orderSendCusParams.put("orderFee", orderFee);
|
|
orderSendCusParams.put("orderFee", orderFee);
|
|
orderSendCusParams.put("productFee", orderFee);
|
|
orderSendCusParams.put("productFee", orderFee);
|
|
orderSendCusParams.put("transportFee", 0);
|
|
orderSendCusParams.put("transportFee", 0);
|
|
- UserEntity userEntity = userService.queryByMobile(orderEntity.getMobile());
|
|
|
|
orderSendCusParams.put("certId", userEntity.getIdNo());
|
|
orderSendCusParams.put("certId", userEntity.getIdNo());
|
|
orderSendCusParams.put("name", orderEntity.getPayName());
|
|
orderSendCusParams.put("name", orderEntity.getPayName());
|
|
|
|
|
|
@@ -5379,6 +5427,8 @@ public class OrderServiceImpl implements OrderService {
|
|
//阿里支付流水号
|
|
//阿里支付流水号
|
|
orderSendCusParams.put("tradeNo", orderEntity.getAliTradeNo());
|
|
orderSendCusParams.put("tradeNo", orderEntity.getAliTradeNo());
|
|
orderSendCusParams.put("amount", orderEntity.getActualPrice());
|
|
orderSendCusParams.put("amount", orderEntity.getActualPrice());
|
|
|
|
+ orderSendCusParams.put("buyerIdNo", userEntity.getIdNo());
|
|
|
|
+ orderSendCusParams.put("buyerName", orderEntity.getPayName());
|
|
|
|
|
|
// 将支付单信息发送到当前项目下的 cuspay
|
|
// 将支付单信息发送到当前项目下的 cuspay
|
|
aliCusDeclareBiz.biz(orderSendCusParams);
|
|
aliCusDeclareBiz.biz(orderSendCusParams);
|
|
@@ -5436,4 +5486,27 @@ public class OrderServiceImpl implements OrderService {
|
|
public int queryOrderMainTotal() {
|
|
public int queryOrderMainTotal() {
|
|
return orderDao.queryOrderMainTotal();
|
|
return orderDao.queryOrderMainTotal();
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public R resendOrderInfoToVmcShop(String orderSn) {
|
|
|
|
+
|
|
|
|
+ HaiKongSendOrderInfoRecordEntity sendOrderInfoRecordEntity = haiKongSendOrderInfoRecordService.queryObjectByOrderSn(orderSn);
|
|
|
|
+
|
|
|
|
+ if (Objects.isNull(sendOrderInfoRecordEntity)) {
|
|
|
|
+ LOGGER.error(String.format("重新推送订单到免税mall,订单号【%s】对应发送记录不存在", orderSn));
|
|
|
|
+ return R.error(String.format("订单号【%s】对应发送记录不存在", orderSn));
|
|
|
|
+ }
|
|
|
|
+ // 直接修改状态
|
|
|
|
+ if (!HaiKongMemberOrderResendStatusEnum.RESEND_SUCCESS.getStatus().equals(sendOrderInfoRecordEntity.getResendStatus())) {
|
|
|
|
+ HaiKongSendOrderInfoRecordEntity sendOrderInfoRecordEntity1 = new HaiKongSendOrderInfoRecordEntity();
|
|
|
|
+ sendOrderInfoRecordEntity1.setResendStatus(HaiKongMemberOrderResendStatusEnum.WAIT_RESEND.getStatus());
|
|
|
|
+ sendOrderInfoRecordEntity1.setOuterOrderNo(orderSn);
|
|
|
|
+ haiKongSendOrderInfoRecordService.updateByOrderSn(sendOrderInfoRecordEntity1);
|
|
|
|
+ } else {
|
|
|
|
+ return R.ok("已经推送到免税mall成功,无需重推!");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ return R.ok("重推成功!");
|
|
|
|
+ }
|
|
}
|
|
}
|