Pārlūkot izejas kodu

company 合并订单销售只能查看自己的订单bug修复

lxb 1 mēnesi atpakaļ
vecāks
revīzija
b420cafef1

+ 3 - 0
fs-company/src/main/java/com/fs/company/controller/live/OrderController.java

@@ -68,6 +68,9 @@ public class OrderController extends BaseController
         }
         CompanyUser user = SecurityUtils.getLoginUser().getUser();
         param.setCompanyId(user.getCompanyId());
+       if (user.getUserType().equals("01")){
+           param.setUserId(user.getUserId());
+       }
         startPage();
         List<MergedOrderVO> list = mergedOrderService.selectMergedOrderList(param);
         for (MergedOrderVO vo : list) {

+ 10 - 0
fs-service/src/main/resources/mapper/hisStore/MergedOrderMapper.xml

@@ -82,6 +82,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
           <if test="maps.status != null and maps.status != ''">
             AND o.status = #{maps.status}
           </if>
+        <if test="maps.userId != null and maps.userId != ''">
+            AND o.company_user_id = #{maps.userId}
+        </if>
+
         <if test="maps.productId != null and maps.productId != ''">
             AND fspc.product_id = #{maps.productId}
         </if>
@@ -227,6 +231,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
           <if test="maps.status != null and maps.status != ''">
             AND o.status = #{maps.status}
           </if>
+        <if test="maps.userId != null and maps.userId != ''">
+            AND o.company_user_id = #{maps.userId}
+        </if>
         <if test="maps.productId != null and maps.productId != ''">
             AND fspc.product_id = #{maps.productId}
         </if>
@@ -375,6 +382,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
           <if test="maps.status != null and maps.status != ''">
             AND o.status = #{maps.status}
           </if>
+        <if test="maps.userId != null and maps.userId != ''">
+            AND o.company_user_id = #{maps.userId}
+        </if>
         <if test="maps.productId != null and maps.productId != ''">
             AND fspc.product_id = #{maps.productId}
         </if>