|
@@ -11,6 +11,7 @@ import cn.newfeifan.mall.framework.common.core.KeyValue;
|
|
import cn.newfeifan.mall.framework.common.enums.UserTypeEnum;
|
|
import cn.newfeifan.mall.framework.common.enums.UserTypeEnum;
|
|
import cn.newfeifan.mall.framework.common.util.json.JsonUtils;
|
|
import cn.newfeifan.mall.framework.common.util.json.JsonUtils;
|
|
import cn.newfeifan.mall.framework.common.util.number.MoneyUtils;
|
|
import cn.newfeifan.mall.framework.common.util.number.MoneyUtils;
|
|
|
|
+import cn.newfeifan.mall.framework.mybatis.core.query.LambdaQueryWrapperX;
|
|
import cn.newfeifan.mall.module.member.api.address.MemberAddressApi;
|
|
import cn.newfeifan.mall.module.member.api.address.MemberAddressApi;
|
|
import cn.newfeifan.mall.module.member.api.address.dto.MemberAddressRespDTO;
|
|
import cn.newfeifan.mall.module.member.api.address.dto.MemberAddressRespDTO;
|
|
import cn.newfeifan.mall.module.pay.api.order.PayOrderApi;
|
|
import cn.newfeifan.mall.module.pay.api.order.PayOrderApi;
|
|
@@ -393,6 +394,11 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
|
|
if (deliveryReqVO.getAttachment() != null) {
|
|
if (deliveryReqVO.getAttachment() != null) {
|
|
//如果是虚拟商品直接完成发货和签收
|
|
//如果是虚拟商品直接完成发货和签收
|
|
updateOrderObj.setStatus(TradeOrderStatusEnum.COMPLETED.getStatus()).setDeliveryTime(LocalDateTime.now()).setReceivingTime(LocalDateTime.now());
|
|
updateOrderObj.setStatus(TradeOrderStatusEnum.COMPLETED.getStatus()).setDeliveryTime(LocalDateTime.now()).setReceivingTime(LocalDateTime.now());
|
|
|
|
+ TradeOrderItemDO tradeOrderItemDO = tradeOrderItemMapper.selectOne(new LambdaQueryWrapperX<TradeOrderItemDO>()
|
|
|
|
+ .eq(TradeOrderItemDO::getOrderId, order.getId())
|
|
|
|
+ );
|
|
|
|
+ tradeOrderItemDO.setDistributeBenefit(true);
|
|
|
|
+ tradeOrderItemMapper.updateById(tradeOrderItemDO);
|
|
} else {
|
|
} else {
|
|
updateOrderObj.setStatus(TradeOrderStatusEnum.DELIVERED.getStatus()).setDeliveryTime(LocalDateTime.now());
|
|
updateOrderObj.setStatus(TradeOrderStatusEnum.DELIVERED.getStatus()).setDeliveryTime(LocalDateTime.now());
|
|
}
|
|
}
|