liangpeile 1 rok pred
rodič
commit
0b0bcdc55d

+ 3 - 1
crmeb-service/src/main/java/com/zbkj/service/dao/OrderDetailDao.java

@@ -31,7 +31,9 @@ public interface OrderDetailDao extends BaseMapper<OrderDetail> {
      * @param uid 用户id
      * @param orderNo 订单号
      */
-    List<OrderDetail> findAfterSaleApplyList(@Param("uid") Integer uid, @Param("orderNo") String orderNo,@Param("isEnterpriseUser") Integer isEnterpriseUser);
+    List<OrderDetail> findAfterSaleApplyList(@Param("uid") Integer uid, @Param("orderNo") String orderNo,
+                                             @Param("isEnterpriseUser") Integer isEnterpriseUser,
+                                             @Param("enterpriseId") Integer enterpriseId);
 
     /**
      * 根据时间、商品id获取销售件数

+ 10 - 1
crmeb-service/src/main/java/com/zbkj/service/service/impl/OrderDetailServiceImpl.java

@@ -99,7 +99,16 @@ public class OrderDetailServiceImpl extends ServiceImpl<OrderDetailDao, OrderDet
         Page<OrderDetail> page = PageHelper.startPage(pageParamRequest.getPage(), pageParamRequest.getLimit());
         User user = userService.getById(uid);
         Integer isEnterpriseUser = user.getIsEnterpriseUser();
-        List<OrderDetail> orderDetailList = dao.findAfterSaleApplyList(uid, orderNo,isEnterpriseUser);
+        Integer enterpriseId=0;
+        if (3==isEnterpriseUser){
+            LambdaQueryWrapper<UserBypassAccount> queryWrapper = new LambdaQueryWrapper<>();
+            queryWrapper.eq(UserBypassAccount::getUserId,user.getId());
+            UserBypassAccount one = userBypassAccountService.getOne(queryWrapper);
+            enterpriseId = one.getEnterpriseId();
+        }
+
+
+        List<OrderDetail> orderDetailList = dao.findAfterSaleApplyList(uid, orderNo,isEnterpriseUser,enterpriseId);
         return CommonPage.copyPageInfo(page, orderDetailList);
     }
 

+ 1 - 0
crmeb-service/src/main/resources/mapper/order/OrderDetailMapper.xml

@@ -23,6 +23,7 @@
         and o.is_user_del = 0 and o.level = 1
         and o.refund_status &lt; 3
         and o.is_enterprise_user=#{isEnterpriseUser}
+        and o.enterprise_id=#{isEnterpriseUser}
         and (od.apply_refund_num + od.refund_num) &lt; od.pay_num
         <if test="orderNo != '' and orderNo != null ">
             and od.order_no = #{orderNo}