diff --git a/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderMasterController.java b/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderMasterController.java index ce7eec31..9a39e4da 100644 --- a/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderMasterController.java +++ b/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderMasterController.java @@ -22,14 +22,8 @@ import com.ghy.customer.domain.Customer; import com.ghy.customer.domain.CustomerAddress; import com.ghy.customer.service.CustomerAddressService; import com.ghy.customer.service.CustomerService; -import com.ghy.goods.domain.Goods; -import com.ghy.goods.domain.GoodsArea; -import com.ghy.goods.domain.GoodsImgs; -import com.ghy.goods.domain.GoodsStandard; -import com.ghy.goods.service.GoodsAreaService; -import com.ghy.goods.service.GoodsImgsService; -import com.ghy.goods.service.GoodsService; -import com.ghy.goods.service.GoodsStandardService; +import com.ghy.goods.domain.*; +import com.ghy.goods.service.*; import com.ghy.order.domain.*; import com.ghy.order.service.*; import com.ghy.payment.domain.FinancialChangeRecord; @@ -95,6 +89,10 @@ public class OrderMasterController extends BaseController { private GoodsService goodsService; @Resource private GoodsImgsService goodsImgsService; + @Resource + private DeptGoodsCategoryService deptGoodsCategoryService; + @Resource + private GoodsCategoryService goodsCategoryService; @Autowired private CustomerService customerService; @@ -726,10 +724,30 @@ public class OrderMasterController extends BaseController { FinancialMaster fm = financialMasterMap.get(master.getId()); if (fm != null) { master.setFinancialMasterMoney(fm.getPayMoney()); + master.setFinancialMasterPayMoney(fm.getServerMoney()); } Goods good = goodsMap.get(master.getGoodsId()); if (good != null) { master.setGoods(good); + // 填充商品三级类目 + if(good.getDeptGoodsCategoryId() != null){ + DeptGoodsCategory deptGoodsCategory = deptGoodsCategoryService.get(good.getDeptGoodsCategoryId()); + if(deptGoodsCategory != null){ + GoodsCategory one = goodsCategoryService.selectById(deptGoodsCategory.getGoodsCategoryId()); + if(one != null && one.getParentCategoryId() != null){ + GoodsCategory two = goodsCategoryService.selectById(one.getParentCategoryId()); + if(two != null && two.getParentCategoryId() != null){ + GoodsCategory three = goodsCategoryService.selectById(two.getParentCategoryId()); + if(three != null){ + int totalNum = orderGoodsService.selectByOrderMasterId(master.getId()).stream().mapToInt(OrderGoods::getGoodsNum).sum(); + master.setConsoleGoodsName("【" + three.getGoodsCategoryName() + + "-" + two.getGoodsCategoryName() + + "-" + one.getGoodsCategoryName() + "】x" + totalNum); + } + } + } + } + } } // 地址信息 CustomerAddress customerAddress = addressService.selectByCustomerAddressId(master.getAddressId()); diff --git a/ghy-admin/src/main/resources/templates/order/master.html b/ghy-admin/src/main/resources/templates/order/master.html index 00dcac59..121d93f6 100644 --- a/ghy-admin/src/main/resources/templates/order/master.html +++ b/ghy-admin/src/main/resources/templates/order/master.html @@ -605,7 +605,7 @@ var actions = []; actions.push('查看 '); actions.push('师傅退单 '); - actions.push('商家退单 '); + // actions.push('商家退单 '); if (row.payStatus == 0) { actions.push('付款 '); diff --git a/ghy-admin/src/main/resources/templates/order/orderManager.html b/ghy-admin/src/main/resources/templates/order/orderManager.html index 6523e806..da52a814 100644 --- a/ghy-admin/src/main/resources/templates/order/orderManager.html +++ b/ghy-admin/src/main/resources/templates/order/orderManager.html @@ -627,15 +627,14 @@ return '