pull/1121/head
liujiang 2025-05-25 14:25:56 +08:00
commit 325e0bae07
8 changed files with 67 additions and 0 deletions

View File

@ -248,6 +248,15 @@ public class StoreOrderInfoVO {
@ApiModelProperty(value = "轨迹信息")
private List<Track> expressTracks;
@ApiModelProperty(value = "下单用户昵称")
private String orderUserNickName;
@ApiModelProperty(value = "下单用户手机号")
private String orderUserPhoneNumber;
@ApiModelProperty(value = "付款时间")
private Date payTime;
@ApiModel
@Data
@ -428,6 +437,15 @@ public class StoreOrderInfoVO {
@ApiModelProperty(value = "退货原商品数量")
private Integer originGoodsQuantity;
@ApiModelProperty(value = "档口ID")
private Long storeId;
@ApiModelProperty(value = "档口名称")
private String storeName;
@ApiModelProperty(value = "档口地址")
private String storeAddress;
}
@ApiModel

View File

@ -34,6 +34,11 @@ public class StoreOrderQueryVO extends BasePageVO {
*/
@ApiModelProperty(value = "订单号(模糊)")
private String orderNo;
/**
* [1: 2:退]
*/
@ApiModelProperty(value = "订单类型[1:销售订单 2:退货订单]")
private Integer orderType;
/**
* 12退[10: 11: 12: 13: 14: 21: 22: 23: 24:]
*/

View File

@ -3,6 +3,7 @@ package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@ -11,6 +12,7 @@ import java.util.List;
*
* @author ruoyi
*/
@Repository
public interface SysUserMapper extends BaseMapper<SysUser> {
/**
*

View File

@ -32,4 +32,10 @@ public class StoreOrderDetailInfoDTO extends StoreOrderDetailDTO {
private Integer originOrderDetailStatus;
private Integer originGoodsQuantity;
private Long storeId;
private String storeName;
private String storeAddress;
}

View File

@ -5,6 +5,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.util.Date;
import java.util.List;
/**
@ -34,6 +35,12 @@ public class StoreOrderInfoDTO extends StoreOrderDTO {
private String destinationCountyName;
private String orderUserNickName;
private String orderUserPhoneNumber;
private Date payTime;
private List<StoreOrderDetailInfoDTO> orderDetails;
private List<ExpressTrackDTO> expressTracks;

View File

@ -27,6 +27,10 @@ public class StoreOrderQueryDTO extends BasePageDTO {
*
*/
private String orderNo;
/**
* [1: 2:退]
*/
private Integer orderType;
/**
* 12退[10: 11: 12: 13: 14: 21: 22: 23: 24:]
*/

View File

@ -15,8 +15,10 @@ import com.github.pagehelper.PageHelper;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.domain.SimpleEntity;
import com.ruoyi.common.core.domain.XktBaseEntity;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.bean.BeanValidators;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.xkt.domain.*;
import com.ruoyi.xkt.dto.express.*;
import com.ruoyi.xkt.dto.order.*;
@ -65,6 +67,8 @@ public class StoreOrderServiceImpl implements IStoreOrderService {
@Autowired
private StoreProductFileMapper storeProductFileMapper;
@Autowired
private SysUserMapper sysUserMapper;
@Autowired
private IExpressService expressService;
@Autowired
private IOperationRecordService operationRecordService;
@ -417,6 +421,24 @@ public class StoreOrderServiceImpl implements IStoreOrderService {
(o, n) -> n));
for (StoreOrderDetailInfoDTO detailInfo : detailInfos) {
detailInfo.setFirstMainPicUrl(mainPicMap.get(detailInfo.getStoreProdId()));
//档口信息
if (store != null) {
detailInfo.setStoreId(store.getId());
detailInfo.setStoreName(store.getStoreName());
detailInfo.setStoreAddress(store.getStoreAddress());
}
}
//付款记录
StoreOrderOperationRecordDTO payRecord = operationRecordService.getOneRecord(storeOrderId,
EOrderTargetTypeAction.ORDER, EOrderAction.PAY);
if (payRecord != null) {
orderInfo.setPayTime(payRecord.getOperationTime());
}
//下单用户信息
SysUser orderUser = sysUserMapper.selectUserById(orderInfo.getOrderUserId());
if (orderUser != null) {
orderInfo.setOrderUserNickName(orderUser.getNickName());
orderInfo.setOrderUserPhoneNumber(orderUser.getPhonenumber());
}
return orderInfo;
}

View File

@ -24,6 +24,9 @@
<if test="orderNo != null and orderNo !=''">
AND so.order_no LIKE CONCAT('%', #{orderNo}, '%')
</if>
<if test="orderType != null">
AND so.order_type = #{orderType}
</if>
<if test="orderStatus != null">
AND so.order_status = #{orderStatus}
</if>