From 19a4bafbf9b6108518018a5b7b736556c1058b99 Mon Sep 17 00:00:00 2001 From: yuanye <418471657@qq.com> Date: Wed, 22 May 2024 11:02:44 +0800 Subject: [PATCH] Changes --- .../order/impl/BsOrderChildServiceImpl.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/service/src/main/java/com/hfkj/service/order/impl/BsOrderChildServiceImpl.java b/service/src/main/java/com/hfkj/service/order/impl/BsOrderChildServiceImpl.java index 5c9c26a..385074b 100644 --- a/service/src/main/java/com/hfkj/service/order/impl/BsOrderChildServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/order/impl/BsOrderChildServiceImpl.java @@ -1,9 +1,15 @@ package com.hfkj.service.order.impl; +import com.alibaba.fastjson.JSONObject; import com.hfkj.dao.BsOrderChildMapper; +import com.hfkj.dao.GoodsUserAddressMapper; import com.hfkj.entity.BsOrderChild; import com.hfkj.entity.BsOrderChildExample; +import com.hfkj.entity.BsOrderGoods; +import com.hfkj.entity.GoodsUserAddress; import com.hfkj.model.order.OrderChildModel; +import com.hfkj.service.goods.BsOrderGoodsService; +import com.hfkj.service.goods.GoodsUserAddressService; import com.hfkj.service.order.BsOrderChildService; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; @@ -12,6 +18,7 @@ import javax.annotation.Resource; import java.util.ArrayList; import java.util.Date; import java.util.List; +import java.util.Map; /** * @className: BsOrderChildServiceImpl @@ -23,6 +30,12 @@ public class BsOrderChildServiceImpl implements BsOrderChildService { @Resource private BsOrderChildMapper orderChildMapper; + @Resource + private GoodsUserAddressService goodsUserAddressService; + + @Resource + private BsOrderGoodsService orderGoodsService; + @Override public void editData(BsOrderChild data) { data.setUpdateTime(new Date()); @@ -59,6 +72,18 @@ public class BsOrderChildServiceImpl implements BsOrderChildService { for (BsOrderChild orderChild : list) { OrderChildModel childModel = new OrderChildModel(); BeanUtils.copyProperties(orderChild, childModel); + + BsOrderGoods orderGoods = orderGoodsService.findGoodsOrder(orderNo); + + GoodsUserAddress address = goodsUserAddressService.queryDetail(orderGoods.getId()); + + JSONObject object = new JSONObject((Map) childModel.getBusiness()); + + object.put("address", address); + if (orderGoods.getLogisticsNo() != null) { + object.put("logisticsNo", orderGoods.getLogisticsNo()); + } + orderChildModelList.add(childModel); } return orderChildModelList;