master:订单详情返回快递物流单号;

pull/1121/head
liujiang 2025-11-29 20:53:49 +08:00
parent 84ce358c28
commit a94ed3ba10
3 changed files with 29 additions and 0 deletions

View File

@ -1,5 +1,6 @@
package com.ruoyi.web.controller.xkt.vo.order;
import com.ruoyi.xkt.dto.express.ExpressWaybillNoInfoDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -249,6 +250,20 @@ public class StoreOrderInfoVO {
@ApiModelProperty(value = "付款时间")
private Date payTime;
@ApiModelProperty(value = "快递物流信息")
private List<ExpressWaybillNoInfoVO> expressWaybillNoInfos;
@ApiModel
@Data
public static class ExpressWaybillNoInfoVO {
private Long expressId;
private String expressName;
private String expressWaybillNo;
}
@ApiModel
@Data

View File

@ -1,5 +1,6 @@
package com.ruoyi.xkt.dto.order;
import com.ruoyi.xkt.dto.express.ExpressWaybillNoInfoDTO;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ -40,4 +41,6 @@ public class StoreOrderInfoDTO extends StoreOrderDTO {
private List<StoreOrderDetailInfoDTO> orderDetails;
private List<ExpressWaybillNoInfoDTO> expressWaybillNoInfos;
}

View File

@ -407,6 +407,8 @@ public class StoreOrderServiceImpl implements IStoreOrderService {
FileType.MAIN_PIC.getValue(), ORDER_NUM_1).stream()
.collect(Collectors.toMap(StoreProdMainPicDTO::getStoreProdId, StoreProdMainPicDTO::getFileUrl,
(o, n) -> n));
Map<Long, String> expressMap = expressService.getAllExpressNameMap();
Set<ExpressWaybillNoInfoDTO> expressWaybillNoInfos = new LinkedHashSet<>();
for (StoreOrderDetailInfoDTO detailInfo : detailInfos) {
detailInfo.setFirstMainPicUrl(mainPicMap.get(detailInfo.getStoreProdId()));
//档口信息
@ -415,7 +417,16 @@ public class StoreOrderServiceImpl implements IStoreOrderService {
detailInfo.setStoreName(store.getStoreName());
detailInfo.setStoreAddress(store.getStoreAddress());
}
if (StrUtil.isNotEmpty(detailInfo.getExpressWaybillNo())) {
String[] nos = detailInfo.getExpressWaybillNo().split(",");
Long eId = detailInfo.getExpressId();
String eName = expressMap.get(eId);
for (String no : nos) {
expressWaybillNoInfos.add(new ExpressWaybillNoInfoDTO(eId, eName, no));
}
}
}
orderInfo.setExpressWaybillNoInfos(new ArrayList<>(expressWaybillNoInfos));
//付款记录
StoreOrderOperationRecordDTO payRecord = operationRecordService.getOneRecord(storeOrderId,
EOrderTargetTypeAction.ORDER, EOrderAction.PAY);