【代码评审】商城:快递鸟相关的修复代码

This commit is contained in:
YunaiV 2024-08-23 20:16:24 +08:00
parent 7e2498d417
commit 0f51229954
4 changed files with 9 additions and 10 deletions

View File

@ -11,10 +11,9 @@ import java.util.List;
public interface AfterSaleLogMapper extends BaseMapperX<AfterSaleLogDO> { public interface AfterSaleLogMapper extends BaseMapperX<AfterSaleLogDO> {
default List<AfterSaleLogDO> selectListByAfterSaleId(Long afterSaleId) { default List<AfterSaleLogDO> selectListByAfterSaleId(Long afterSaleId) {
LambdaQueryWrapper<AfterSaleLogDO> queryWrapper = new LambdaQueryWrapper<>(); return selectList(new LambdaQueryWrapper<AfterSaleLogDO>()
queryWrapper.eq(AfterSaleLogDO::getAfterSaleId, afterSaleId); .eq(AfterSaleLogDO::getAfterSaleId, afterSaleId)
queryWrapper.orderByDesc(AfterSaleLogDO::getCreateTime); .orderByDesc(AfterSaleLogDO::getCreateTime));
return selectList(queryWrapper);
} }
} }

View File

@ -11,10 +11,9 @@ import java.util.List;
public interface TradeOrderLogMapper extends BaseMapperX<TradeOrderLogDO> { public interface TradeOrderLogMapper extends BaseMapperX<TradeOrderLogDO> {
default List<TradeOrderLogDO> selectListByOrderId(Long orderId) { default List<TradeOrderLogDO> selectListByOrderId(Long orderId) {
LambdaQueryWrapper<TradeOrderLogDO> queryWrapper = new LambdaQueryWrapper<>(); return selectList(new LambdaQueryWrapper<TradeOrderLogDO>()
queryWrapper.eq(TradeOrderLogDO::getOrderId, orderId); .eq(TradeOrderLogDO::getOrderId, orderId)
queryWrapper.orderByDesc(TradeOrderLogDO::getCreateTime); .orderByDesc(TradeOrderLogDO::getCreateTime));
return selectList(queryWrapper);
} }
} }

View File

@ -219,6 +219,7 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService {
public List<ExpressTrackRespDTO> getExpressTrackList(String code, String logisticsNo, String receiverMobile) { public List<ExpressTrackRespDTO> getExpressTrackList(String code, String logisticsNo, String receiverMobile) {
return expressClientFactory.getDefaultExpressClient().getExpressTrackList( return expressClientFactory.getDefaultExpressClient().getExpressTrackList(
new ExpressTrackQueryReqDTO().setExpressCode(code).setLogisticsNo(logisticsNo) new ExpressTrackQueryReqDTO().setExpressCode(code).setLogisticsNo(logisticsNo)
// TODO @卢越1为什么 customerName 使用 mobile 2如果使用 mobile其实可以考虑通过 phone 计算下
.setPhone(receiverMobile).setCustomerName(StrUtil.subSuf(receiverMobile, receiverMobile.length() - 4))); .setPhone(receiverMobile).setCustomerName(StrUtil.subSuf(receiverMobile, receiverMobile.length() - 4)));
} }

View File

@ -80,13 +80,13 @@ public class TradeMemberPointOrderHandler implements TradeOrderHandler {
public void afterCancelOrderItem(TradeOrderDO order, TradeOrderItemDO orderItem) { public void afterCancelOrderItem(TradeOrderDO order, TradeOrderItemDO orderItem) {
// 增加回滚积分订单抵扣 // 增加回滚积分订单抵扣
addPoint(order.getUserId(), orderItem.getUsePoint(), MemberPointBizTypeEnum.ORDER_USE_CANCEL_ITEM, orderItem.getId()); addPoint(order.getUserId(), orderItem.getUsePoint(), MemberPointBizTypeEnum.ORDER_USE_CANCEL_ITEM, orderItem.getId());
// 扣减回滚积分订单赠送 // 扣减回滚积分订单赠送
reducePoint(order.getUserId(), orderItem.getGivePoint(), MemberPointBizTypeEnum.ORDER_GIVE_CANCEL_ITEM, orderItem.getId()); reducePoint(order.getUserId(), orderItem.getGivePoint(), MemberPointBizTypeEnum.ORDER_GIVE_CANCEL_ITEM, orderItem.getId());
// 扣减回滚用户经验 // 扣减回滚用户经验
AfterSaleDO afterSale = afterSaleService.getAfterSale(orderItem.getAfterSaleId()); AfterSaleDO afterSale = afterSaleService.getAfterSale(orderItem.getAfterSaleId());
memberLevelApi.reduceExperience(order.getUserId(), afterSale.getRefundPrice(), MemberExperienceBizTypeEnum.ORDER_GIVE_CANCEL_ITEM.getType(), String.valueOf(orderItem.getId())); memberLevelApi.reduceExperience(order.getUserId(), afterSale.getRefundPrice(),
MemberExperienceBizTypeEnum.ORDER_GIVE_CANCEL_ITEM.getType(), String.valueOf(orderItem.getId()));
} }
/** /**