【同步】BOOT 和 CLOUD 的功能
This commit is contained in:
@@ -21,7 +21,6 @@ import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -142,9 +141,8 @@ public class AfterSaleController {
|
||||
public CommonResult<Boolean> updateAfterSaleRefunded(@RequestBody PayRefundNotifyReqDTO notifyReqDTO) {
|
||||
log.info("[updateAfterRefund][notifyReqDTO({})]", notifyReqDTO);
|
||||
if (StrUtil.startWithAny(notifyReqDTO.getMerchantRefundId(), "order-")) {
|
||||
tradeOrderUpdateService.updatePaidOrderRefunded(
|
||||
Long.parseLong(notifyReqDTO.getMerchantRefundId()),
|
||||
notifyReqDTO.getPayRefundId());
|
||||
Long orderId = Long.parseLong(StrUtil.subAfter(notifyReqDTO.getMerchantRefundId(), "order-", true));
|
||||
tradeOrderUpdateService.updatePaidOrderRefunded(orderId, notifyReqDTO.getPayRefundId());
|
||||
} else {
|
||||
afterSaleService.updateAfterSaleRefunded(
|
||||
Long.parseLong(notifyReqDTO.getMerchantRefundId()),
|
||||
|
||||
@@ -98,7 +98,7 @@ public class DeliveryExpressTemplateServiceImpl implements DeliveryExpressTempla
|
||||
expressTemplateFreeMapper.updateBatch(diffList.get(1));
|
||||
}
|
||||
if (CollUtil.isNotEmpty(diffList.get(2))) {
|
||||
expressTemplateFreeMapper.deleteBatchIds(convertList(diffList.get(2), DeliveryExpressTemplateFreeDO::getId));
|
||||
expressTemplateFreeMapper.deleteByIds(convertList(diffList.get(2), DeliveryExpressTemplateFreeDO::getId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ public class DeliveryExpressTemplateServiceImpl implements DeliveryExpressTempla
|
||||
expressTemplateChargeMapper.updateBatch(diffList.get(1));
|
||||
}
|
||||
if (CollUtil.isNotEmpty(diffList.get(2))) {
|
||||
expressTemplateChargeMapper.deleteBatchIds(convertList(diffList.get(2), DeliveryExpressTemplateChargeDO::getId));
|
||||
expressTemplateChargeMapper.deleteByIds(convertList(diffList.get(2), DeliveryExpressTemplateChargeDO::getId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ public class DeliveryExpressTemplateServiceImpl implements DeliveryExpressTempla
|
||||
|
||||
@Override
|
||||
public List<DeliveryExpressTemplateDO> getDeliveryExpressTemplateList(Collection<Long> ids) {
|
||||
return expressTemplateMapper.selectBatchIds(ids);
|
||||
return expressTemplateMapper.selectByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -205,7 +205,7 @@ public class DeliveryExpressTemplateServiceImpl implements DeliveryExpressTempla
|
||||
if (CollUtil.isEmpty(ids)) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
List<DeliveryExpressTemplateDO> templateList = expressTemplateMapper.selectBatchIds(ids);
|
||||
List<DeliveryExpressTemplateDO> templateList = expressTemplateMapper.selectByIds(ids);
|
||||
// 查询 templateCharge 数组
|
||||
List<DeliveryExpressTemplateChargeDO> chargeList = expressTemplateChargeMapper.selectByTemplateIds(ids);
|
||||
// 查询 templateFree 数组
|
||||
|
||||
@@ -75,7 +75,7 @@ public class DeliveryPickUpStoreServiceImpl implements DeliveryPickUpStoreServic
|
||||
|
||||
@Override
|
||||
public List<DeliveryPickUpStoreDO> getDeliveryPickUpStoreList(Collection<Long> ids) {
|
||||
return deliveryPickUpStoreMapper.selectBatchIds(ids);
|
||||
return deliveryPickUpStoreMapper.selectByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -84,7 +84,7 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService {
|
||||
if (CollUtil.isEmpty(ids)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return tradeOrderMapper.selectBatchIds(ids);
|
||||
return tradeOrderMapper.selectByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,6 +25,9 @@ import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum;
|
||||
import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum;
|
||||
import cn.iocoder.yudao.module.product.api.comment.ProductCommentApi;
|
||||
import cn.iocoder.yudao.module.product.api.comment.dto.ProductCommentCreateReqDTO;
|
||||
import cn.iocoder.yudao.module.promotion.api.combination.CombinationRecordApi;
|
||||
import cn.iocoder.yudao.module.promotion.api.combination.dto.CombinationRecordRespDTO;
|
||||
import cn.iocoder.yudao.module.promotion.enums.combination.CombinationRecordStatusEnum;
|
||||
import cn.iocoder.yudao.module.system.api.social.SocialClientApi;
|
||||
import cn.iocoder.yudao.module.system.api.social.dto.SocialWxaSubscribeMessageSendReqDTO;
|
||||
import cn.iocoder.yudao.module.trade.controller.admin.order.vo.TradeOrderDeliveryReqVO;
|
||||
@@ -121,6 +124,8 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
|
||||
public SocialClientApi socialClientApi;
|
||||
@Resource
|
||||
public PayRefundApi payRefundApi;
|
||||
@Resource
|
||||
private CombinationRecordApi combinationRecordApi;
|
||||
|
||||
@Resource
|
||||
private TradeOrderProperties tradeOrderProperties;
|
||||
@@ -422,7 +427,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
|
||||
.addMessage("phrase6", TradeOrderStatusEnum.DELIVERED.getName()) // 订单状态
|
||||
.addMessage("date4", LocalDateTimeUtil.formatNormal(LocalDateTime.now()))// 发货时间
|
||||
.addMessage("character_string5", StrUtil.blankToDefault(deliveryReqVO.getLogisticsNo(), "-")) // 快递单号
|
||||
.addMessage("thing9", order.getReceiverDetailAddress())).getCheckedData(); // 收货地址
|
||||
.addMessage("thing9", order.getReceiverDetailAddress())).checkError(); // 收货地址
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -775,6 +780,14 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
|
||||
if (ObjUtil.notEqual(DeliveryTypeEnum.PICK_UP.getType(), order.getDeliveryType())) {
|
||||
throw exception(ORDER_RECEIVE_FAIL_DELIVERY_TYPE_NOT_PICK_UP);
|
||||
}
|
||||
// 情况一:如果是拼团订单,则校验拼团是否成功
|
||||
if (TradeOrderTypeEnum.isCombination(order.getType())) {
|
||||
CombinationRecordRespDTO combinationRecord = combinationRecordApi.getCombinationRecordByOrderId(
|
||||
order.getUserId(), order.getId()).getCheckedData();
|
||||
if (!CombinationRecordStatusEnum.isSuccess(combinationRecord.getStatus())) {
|
||||
throw exception(ORDER_PICK_UP_FAIL_COMBINATION_NOT_SUCCESS);
|
||||
}
|
||||
}
|
||||
DeliveryPickUpStoreDO deliveryPickUpStore = pickUpStoreService.getDeliveryPickUpStore(order.getPickUpStoreId());
|
||||
if (deliveryPickUpStore == null
|
||||
|| !CollUtil.contains(deliveryPickUpStore.getVerifyUserIds(), userId)) {
|
||||
|
||||
Reference in New Issue
Block a user