mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 23:31:52 +08:00
【代码评审】商城:快递鸟相关的修复代码
This commit is contained in:
parent
7e2498d417
commit
0f51229954
@ -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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user