【代码评审】商城:快递鸟相关的修复代码
This commit is contained in:
parent
7e2498d417
commit
0f51229954
|
@ -11,10 +11,9 @@ import java.util.List;
|
|||
public interface AfterSaleLogMapper extends BaseMapperX<AfterSaleLogDO> {
|
||||
|
||||
default List<AfterSaleLogDO> selectListByAfterSaleId(Long afterSaleId) {
|
||||
LambdaQueryWrapper<AfterSaleLogDO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(AfterSaleLogDO::getAfterSaleId, afterSaleId);
|
||||
queryWrapper.orderByDesc(AfterSaleLogDO::getCreateTime);
|
||||
return selectList(queryWrapper);
|
||||
return selectList(new LambdaQueryWrapper<AfterSaleLogDO>()
|
||||
.eq(AfterSaleLogDO::getAfterSaleId, afterSaleId)
|
||||
.orderByDesc(AfterSaleLogDO::getCreateTime));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -11,10 +11,9 @@ import java.util.List;
|
|||
public interface TradeOrderLogMapper extends BaseMapperX<TradeOrderLogDO> {
|
||||
|
||||
default List<TradeOrderLogDO> selectListByOrderId(Long orderId) {
|
||||
LambdaQueryWrapper<TradeOrderLogDO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(TradeOrderLogDO::getOrderId, orderId);
|
||||
queryWrapper.orderByDesc(TradeOrderLogDO::getCreateTime);
|
||||
return selectList(queryWrapper);
|
||||
return selectList(new LambdaQueryWrapper<TradeOrderLogDO>()
|
||||
.eq(TradeOrderLogDO::getOrderId, orderId)
|
||||
.orderByDesc(TradeOrderLogDO::getCreateTime));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -219,6 +219,7 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService {
|
|||
public List<ExpressTrackRespDTO> getExpressTrackList(String code, String logisticsNo, String receiverMobile) {
|
||||
return expressClientFactory.getDefaultExpressClient().getExpressTrackList(
|
||||
new ExpressTrackQueryReqDTO().setExpressCode(code).setLogisticsNo(logisticsNo)
|
||||
// TODO @卢越:1)为什么 customerName 使用 mobile 哈?2)如果使用 mobile,其实可以考虑通过 phone 计算下
|
||||
.setPhone(receiverMobile).setCustomerName(StrUtil.subSuf(receiverMobile, receiverMobile.length() - 4)));
|
||||
}
|
||||
|
||||
|
|
|
@ -80,13 +80,13 @@ public class TradeMemberPointOrderHandler implements TradeOrderHandler {
|
|||
public void afterCancelOrderItem(TradeOrderDO order, TradeOrderItemDO orderItem) {
|
||||
// 增加(回滚)积分(订单抵扣)
|
||||
addPoint(order.getUserId(), orderItem.getUsePoint(), MemberPointBizTypeEnum.ORDER_USE_CANCEL_ITEM, orderItem.getId());
|
||||
|
||||
// 扣减(回滚)积分(订单赠送)
|
||||
reducePoint(order.getUserId(), orderItem.getGivePoint(), MemberPointBizTypeEnum.ORDER_GIVE_CANCEL_ITEM, orderItem.getId());
|
||||
|
||||
// 扣减(回滚)用户经验
|
||||
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()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue