From 4c846cd7210dd0d0255a3088055315275b6e6a68 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Wed, 23 Dec 2020 17:44:09 +0800
Subject: [PATCH] modify

---
 zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java          |    8 ++++----
 zq-erp/src/main/java/com/matrix/system/app/action/ApiOrderAction.java            |   11 +++++++++++
 zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java |    3 ++-
 3 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiOrderAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiOrderAction.java
index c2b6098..a2027f2 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/action/ApiOrderAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiOrderAction.java
@@ -87,6 +87,7 @@
                 carItem.setShoppingGoods(shoppingGoodsService.findById(item.getGoodsId()));
                 list.add(carItem);
             }
+            car.setCarItems(list);
         }
         int i = sysOrderService.createOrder(WebUtil.getSession(), car);
         if (i > 0) {
@@ -96,4 +97,14 @@
         return AjaxResult.buildFailInstance("下单失败");
     }
 
+    @PostMapping(value = "/findOrderList")
+    public AjaxResult findOrderList() {
+        return null;
+    }
+
+    @GetMapping(value = "/findOrderDetail/{orderId}")
+    public AjaxResult findOrderDetail(@PathVariable("orderId") Long orderId) {
+        return null;
+    }
+
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java
index 550f9ab..5d99c8d 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java
@@ -15,10 +15,7 @@
 import com.matrix.system.constance.Dictionary;
 import com.matrix.system.constance.SystemConstance;
 import com.matrix.system.hive.action.util.QueryUtil;
-import com.matrix.system.hive.bean.AchieveNew;
-import com.matrix.system.hive.bean.MoneyCardUse;
-import com.matrix.system.hive.bean.SysOrder;
-import com.matrix.system.hive.bean.SysOrderItem;
+import com.matrix.system.hive.bean.*;
 import com.matrix.system.hive.dao.MoneyCardUseDao;
 import com.matrix.system.hive.dao.SysOrderDao;
 import com.matrix.system.hive.dao.SysOrderItemDao;
@@ -176,6 +173,9 @@
         //设置过滤后的购物车条目
         car.setCarItems(carItems);
 
+        SysVipInfo info = (SysVipInfo) WebUtil.getSession().getAttribute(SystemConstance.CURRENT_CUSTOMER);
+        car.setVipId(info.getId());
+
         // 添加新订单
         int i = orderService.createOrder(WebUtil.getSession(), car);
 
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
index a1cab35..5237787 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
@@ -356,7 +356,7 @@
             throw new GlobleException("没用选择购买产品");
         }
         // 获取会员信息,判断等级 获取相应家居折扣
-        SysVipInfo info = (SysVipInfo) WebUtil.getSession().getAttribute(SystemConstance.CURRENT_CUSTOMER);
+        SysVipInfo info = sysVipInfoDao.selectById(car.getVipId());
 
         //获取折扣-----
         Double zk = zk = 1.0;
@@ -376,6 +376,7 @@
         order.setStatu(Dictionary.ORDER_STATU_DFK);
         order.setCardPay(0.00);
         order.setCashPay(0.00);
+        order.setCompanyId(user.getCompanyId());
         order.setBeatuyId(car.getBeatuyId() + "");
         // 根据美疗师id查询美疗师姓名
         if (car.getBeatuyId() != null) {

--
Gitblit v1.9.1