|
@@ -2818,7 +2818,7 @@ public class OrderServiceImpl implements OrderService {
|
|
|
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.setRequest("1111111111111111111");
|
|
|
order.setResponse("2222222222222222222");
|
|
@@ -2878,6 +2878,10 @@ public class OrderServiceImpl implements OrderService {
|
|
|
} else if (Objects.nonNull(r) && ErrorCodeConstants.VmcShopSysErrorCodeEnum.CODE_10500.getCode().equals(r.getCode())) {
|
|
|
pickUpCodeService.updatePickUpCodeStatusByOrderSn(orderSn, Dict.PickUpCodeStatusEnum.item_6.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);
|
|
|
} else if (Objects.isNull(r)) {
|
|
|
pickUpCodeService.updatePickUpCodeStatusByOrderSn(orderSn, Dict.PickUpCodeStatusEnum.item_6.getStatus());
|
|
@@ -5352,6 +5356,7 @@ public class OrderServiceImpl implements OrderService {
|
|
|
return R.error("该订单所属商户不存在:"+orderEntity.getOrderSn());
|
|
|
}
|
|
|
// 组装支付单信息
|
|
|
+ UserEntity userEntity = userService.queryByMobile(orderEntity.getMobile());
|
|
|
Map<String, Object> orderSendCusParams = new HashMap<>();
|
|
|
if(Dict.payFlag.item_weixin.getItem().equals(orderEntity.getPayFlag())){
|
|
|
orderSendCusParams.put("merchSn", orderEntity.getMerchSn());
|
|
@@ -5369,7 +5374,6 @@ public class OrderServiceImpl implements OrderService {
|
|
|
orderSendCusParams.put("orderFee", orderFee);
|
|
|
orderSendCusParams.put("productFee", orderFee);
|
|
|
orderSendCusParams.put("transportFee", 0);
|
|
|
- UserEntity userEntity = userService.queryByMobile(orderEntity.getMobile());
|
|
|
orderSendCusParams.put("certId", userEntity.getIdNo());
|
|
|
orderSendCusParams.put("name", orderEntity.getPayName());
|
|
|
|
|
@@ -5385,6 +5389,8 @@ public class OrderServiceImpl implements OrderService {
|
|
|
//阿里支付流水号
|
|
|
orderSendCusParams.put("tradeNo", orderEntity.getAliTradeNo());
|
|
|
orderSendCusParams.put("amount", orderEntity.getActualPrice());
|
|
|
+ orderSendCusParams.put("certId", userEntity.getIdNo());
|
|
|
+ orderSendCusParams.put("name", orderEntity.getPayName());
|
|
|
|
|
|
// 将支付单信息发送到当前项目下的 cuspay
|
|
|
aliCusDeclareBiz.biz(orderSendCusParams);
|
|
@@ -5442,4 +5448,27 @@ public class OrderServiceImpl implements OrderService {
|
|
|
public int 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("重推成功!");
|
|
|
+ }
|
|
|
}
|