mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 15:21:53 +08:00
!1049 【功能修复】修复快递鸟顺丰查询问题、订单退款问题、订单日志查询优化等
Merge pull request !1049 from 卢越/master-jdk17
This commit is contained in:
commit
7e2498d417
@ -43,7 +43,8 @@ public interface AfterSaleConvert {
|
||||
@Mapping(source = "afterSale.orderId", target = "merchantOrderId"),
|
||||
@Mapping(source = "afterSale.id", target = "merchantRefundId"),
|
||||
@Mapping(source = "afterSale.applyReason", target = "reason"),
|
||||
@Mapping(source = "afterSale.refundPrice", target = "price")
|
||||
@Mapping(source = "afterSale.refundPrice", target = "price"),
|
||||
@Mapping(source = "orderProperties.payAppKey", target = "appKey")
|
||||
})
|
||||
PayRefundCreateReqDTO convert(String userIp, AfterSaleDO afterSale,
|
||||
TradeOrderProperties orderProperties);
|
||||
|
@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.trade.dal.mysql.aftersale;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.trade.dal.dataobject.aftersale.AfterSaleLogDO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
@ -10,7 +11,10 @@ import java.util.List;
|
||||
public interface AfterSaleLogMapper extends BaseMapperX<AfterSaleLogDO> {
|
||||
|
||||
default List<AfterSaleLogDO> selectListByAfterSaleId(Long afterSaleId) {
|
||||
return selectList(AfterSaleLogDO::getAfterSaleId, afterSaleId);
|
||||
LambdaQueryWrapper<AfterSaleLogDO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(AfterSaleLogDO::getAfterSaleId, afterSaleId);
|
||||
queryWrapper.orderByDesc(AfterSaleLogDO::getCreateTime);
|
||||
return selectList(queryWrapper);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.trade.dal.mysql.order;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderLogDO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
@ -10,7 +11,10 @@ import java.util.List;
|
||||
public interface TradeOrderLogMapper extends BaseMapperX<TradeOrderLogDO> {
|
||||
|
||||
default List<TradeOrderLogDO> selectListByOrderId(Long orderId) {
|
||||
return selectList(TradeOrderLogDO::getOrderId, orderId);
|
||||
LambdaQueryWrapper<TradeOrderLogDO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(TradeOrderLogDO::getOrderId, orderId);
|
||||
queryWrapper.orderByDesc(TradeOrderLogDO::getCreateTime);
|
||||
return selectList(queryWrapper);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -28,4 +28,9 @@ public class ExpressTrackQueryReqDTO {
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 自定义名称(顺丰专用)
|
||||
*/
|
||||
private String customerName;
|
||||
|
||||
}
|
||||
|
@ -29,4 +29,10 @@ public class KdNiaoExpressQueryReqDTO {
|
||||
@JsonProperty("OrderCode")
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 自定义名称(顺丰专用)
|
||||
*/
|
||||
@JsonProperty("CustomerName")
|
||||
private String customerName;
|
||||
|
||||
}
|
||||
|
@ -219,7 +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)
|
||||
.setPhone(receiverMobile));
|
||||
.setPhone(receiverMobile).setCustomerName(StrUtil.subSuf(receiverMobile, receiverMobile.length() - 4)));
|
||||
}
|
||||
|
||||
// =================== Order Item ===================
|
||||
|
@ -78,17 +78,15 @@ public class TradeMemberPointOrderHandler implements TradeOrderHandler {
|
||||
|
||||
@Override
|
||||
public void afterCancelOrderItem(TradeOrderDO order, TradeOrderItemDO orderItem) {
|
||||
// 扣减(回滚)积分(订单赠送)
|
||||
reducePoint(order.getUserId(), orderItem.getGivePoint(), MemberPointBizTypeEnum.ORDER_GIVE_CANCEL_ITEM,
|
||||
orderItem.getId());
|
||||
// 增加(回滚)积分(订单抵扣)
|
||||
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());
|
||||
|
||||
// 扣减(回滚)用户经验
|
||||
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