修改打单托寄物、备注
This commit is contained in:
@@ -528,7 +528,6 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
||||
BigDecimal totalWeight = new BigDecimal(0);
|
||||
List<ExpressCommodity> commodityList = new ArrayList<>();
|
||||
List<Integer> buyOrderIdList = new ArrayList<>();
|
||||
Integer ln = 0;
|
||||
String remark ="";
|
||||
for (BuyOrderProduct buyOrderProduct : buyOrderProductList) {
|
||||
buyOrderIdList.add(buyOrderProduct.getOrderId());
|
||||
@@ -536,18 +535,25 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
||||
ShopProduct product = shopProductService.getById(productId);
|
||||
//定义快递商品
|
||||
ExpressCommodity commodity = new ExpressCommodity();
|
||||
commodity.setGoodsName(product.getProductName()+" ×"+buyOrderProduct.getQuantity());
|
||||
String productName = product.getProductName()+" ×"+buyOrderProduct.getQuantity()+";";
|
||||
remark += productName;
|
||||
//商品类型01挂图02书籍03预售书04仪器05课程06小店商品
|
||||
if ("02".equals(product.getGoodsType())||"03".equals(product.getGoodsType())){
|
||||
commodity.setGoodsName("书籍");
|
||||
}else if ("01".equals(product.getGoodsType())){
|
||||
commodity.setGoodsName("挂图");
|
||||
}else if ("04".equals(product.getGoodsType())){
|
||||
commodity.setGoodsName("仪器");
|
||||
}else {
|
||||
commodity.setGoodsName("商品");
|
||||
}
|
||||
commodity.setGoodsquantity(buyOrderProduct.getQuantity());
|
||||
commodity.setGoodsWeight((product.getWeight().doubleValue())/1000);
|
||||
commodity.setGoodsPrice(product.getPrice().doubleValue());
|
||||
totalWeight = totalWeight.add(
|
||||
BigDecimal.valueOf(product.getWeight().doubleValue()).multiply(new BigDecimal(buyOrderProduct.getQuantity())).divide(BigDecimal.valueOf(1000),2,RoundingMode.HALF_UP)
|
||||
);
|
||||
if(ln>0){
|
||||
remark += commodity.getGoodsName();
|
||||
}
|
||||
commodityList.add(commodity);
|
||||
ln++;
|
||||
}
|
||||
// 获取用户地址
|
||||
Integer orderId = buyOrderProductList.get(0).getOrderId();
|
||||
|
||||
Reference in New Issue
Block a user