Prechádzať zdrojové kódy

添加积分商城所需的参数

Yangzw 10 mesiacov pred
rodič
commit
643d1e6616

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

@@ -390,7 +390,12 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
         }
 
         // 执行更新
-        updateOrderObj.setStatus(TradeOrderStatusEnum.DELIVERED.getStatus()).setDeliveryTime(LocalDateTime.now());
+        if(deliveryReqVO.getDeliveryRemark() != null){
+            //如果是虚拟商品直接完成发货和签收
+            updateOrderObj.setStatus(TradeOrderStatusEnum.COMPLETED.getStatus()).setDeliveryTime(LocalDateTime.now()).setReceivingTime(LocalDateTime.now());
+        }else{
+            updateOrderObj.setStatus(TradeOrderStatusEnum.DELIVERED.getStatus()).setDeliveryTime(LocalDateTime.now());
+        }
         int updateCount = tradeOrderMapper.updateByIdAndStatus(order.getId(), order.getStatus(), updateOrderObj);
         if (updateCount == 0) {
             throw exception(ORDER_DELIVERY_FAIL_STATUS_NOT_UNDELIVERED);