添加订单地址信息
This commit is contained in:
@@ -7,6 +7,7 @@ import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.peanut.modules.book.vo.response.ConsigneeVo;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -185,4 +186,7 @@ public class BuyOrder implements Serializable {
|
||||
private List<ExpressOrder> expressList;
|
||||
|
||||
private int addressModified;
|
||||
|
||||
@TableField(exist = false)
|
||||
private ConsigneeVo consigneeVo;
|
||||
}
|
||||
|
||||
@@ -387,6 +387,20 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
||||
b1.setExpressOrder(expressOrderDao.selectById(b1.getExpressOrderId()));
|
||||
}
|
||||
b.setProductList(buyOrderProducts);
|
||||
//设置快递信息传递给前端
|
||||
ConsigneeVo consigneeVo = new ConsigneeVo();
|
||||
consigneeVo.setConsigneeName(b.getShippingUser());
|
||||
consigneeVo.setConsigneeMobile(b.getUserPhone());
|
||||
County county = countyService.getOne(new LambdaQueryWrapper<County>().eq(County::getCountyName, b.getDistrict()));
|
||||
consigneeVo.setCounty(county.getCountyName());
|
||||
consigneeVo.setCountyCode(county.getRegionCode());
|
||||
City city = cityService.getOne(new LambdaQueryWrapper<City>().eq(City::getCityId, county.getCityId()));
|
||||
consigneeVo.setCity(city.getCityName());
|
||||
consigneeVo.setCityCode(city.getRegionCode());
|
||||
Province province = provinceService.getOne(new LambdaQueryWrapper<Province>().eq(Province::getProvId, city.getProvId()));
|
||||
consigneeVo.setProvince(province.getProvName());
|
||||
consigneeVo.setProvinceCode(province.getRegionCode());
|
||||
b.setConsigneeVo(consigneeVo);
|
||||
//添加快递包裹信息
|
||||
// LambdaQueryWrapper<BuyOrderProduct> b_wrapper = new LambdaQueryWrapper<>();
|
||||
// b_wrapper.eq(BuyOrderProduct::getOrderId,b.getOrderId());
|
||||
|
||||
Reference in New Issue
Block a user