Prechádzať zdrojové kódy

添加积分商城所需的参数

Yangzw 10 mesiacov pred
rodič
commit
3ee9f760c0

+ 3 - 0
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/spu/vo/ProductSpuRespVO.java

@@ -135,4 +135,7 @@ public class ProductSpuRespVO {
 
     @Schema(description = "商户id", example = "8240")
     private Long merchantId;
+
+    @Schema(description = "商品支付类别")
+    private Integer spuPayType;
 }

+ 15 - 10
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/order/TradeOrderUpdateServiceImpl.java

@@ -353,7 +353,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
     @TradeOrderLog(operateType = TradeOrderOperateTypeEnum.ADMIN_DELIVERY)
     public void deliveryOrder(TradeOrderDeliveryReqVO deliveryReqVO) {
         //校验发货信息不能都为空
-        if(deliveryReqVO.getLogisticsNo() == null && deliveryReqVO.getDeliveryRemark() == null){
+        if (deliveryReqVO.getLogisticsNo() == null && deliveryReqVO.getDeliveryRemark() == null) {
             throw exception(ORDER_DELIVERY_DETAILS_IS_NULL);
         }
 
@@ -390,10 +390,10 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
         }
 
         // 执行更新
-        if(deliveryReqVO.getDeliveryRemark() != null){
+        if (deliveryReqVO.getDeliveryRemark() != null) {
             //如果是虚拟商品直接完成发货和签收
             updateOrderObj.setStatus(TradeOrderStatusEnum.COMPLETED.getStatus()).setDeliveryTime(LocalDateTime.now()).setReceivingTime(LocalDateTime.now());
-        }else{
+        } else {
             updateOrderObj.setStatus(TradeOrderStatusEnum.DELIVERED.getStatus()).setDeliveryTime(LocalDateTime.now());
         }
         int updateCount = tradeOrderMapper.updateByIdAndStatus(order.getId(), order.getStatus(), updateOrderObj);
@@ -412,13 +412,18 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
         //5.发送微信模板消息
         List<String> params = new ArrayList<>();
         params.add(order.getNo());
-        params.add(deliveryExpressService.getDeliveryNameById(order.getLogisticsId()));
-        params.add(order.getLogisticsNo());
+        if (deliveryReqVO.getDeliveryRemark() != null) {
+            params.add("无");
+            params.add("-");
+        }else{
+            params.add(deliveryExpressService.getDeliveryNameById(order.getLogisticsId()));
+            params.add(order.getLogisticsNo());
+        }
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
         params.add(LocalDateTime.now().format(formatter));
         params.add(tradeOrderItemMapper.getSupNameByOrderId(order.getId()));
         wcChatMessageUtils.sendWcChatMessage(order.getUserId(), WcChatMessageTemplateIdEnum.ORDER_DELIVERY2.getTemplateId(),
-                params, null,order.getUserId(), order.getId());
+                params, null, order.getUserId(), order.getId());
     }
 
     /**
@@ -433,7 +438,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
 
         // 设置订阅参数,包括回调URL和手机号
         SubscribeParameters subscribeParameters = new SubscribeParameters();
-        subscribeParameters.setCallbackurl("http://47.107.28.221:8001/admin-api/trade/order/callBackUrl?orderId="+order.getId());
+        subscribeParameters.setCallbackurl("http://47.107.28.221:8001/admin-api/trade/order/callBackUrl?orderId=" + order.getId());
         subscribeParameters.setPhone(order.getReceiverMobile());
         //添加盐
         subscribeParameters.setSalt(order.getLogisticsNo());
@@ -460,13 +465,13 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
         String returnCode = jsonObject.get("returnCode").getAsString();
 
         if (result && returnCode.equals("200")) {
-            log.info("订单号:{}:订阅成功",order.getNo());
+            log.info("订单号:{}:订阅成功", order.getNo());
 
             order.setSubscriptionLogisticsInfo(TradeOrderSubscribeStatusEnum.SUBSCRIBE.getStatus());
-        } else if(returnCode.equals("600") || returnCode.equals("601")) {
+        } else if (returnCode.equals("600") || returnCode.equals("601")) {
             throw exception(NOT_SUFFICIENT_FUNDS);
         } else {
-            log.info("订单号:{}:订阅失败原因:{}",order.getNo(),jsonObject);
+            log.info("订单号:{}:订阅失败原因:{}", order.getNo(), jsonObject);
 
             order.setSubscriptionLogisticsInfo(TradeOrderSubscribeStatusEnum.abnormal.getStatus());
         }