|
@@ -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);
|