|
|
|
@ -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<String, Object>) childModel.getBusiness()); |
|
|
|
|
|
|
|
|
|
object.put("address", address); |
|
|
|
|
if (orderGoods.getLogisticsNo() != null) { |
|
|
|
|
object.put("logisticsNo", orderGoods.getLogisticsNo()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
orderChildModelList.add(childModel); |
|
|
|
|
} |
|
|
|
|
return orderChildModelList; |
|
|
|
|