‘linchangsheng’ il y a 3 semaines
Parent
commit
836162bdb8

+ 3 - 1
src/main/java/com/gree/mall/manager/commonmapper/WxCustomerMapper.java

@@ -44,5 +44,7 @@ public interface WxCustomerMapper {
     IPage<UserApplyBean> queryServiceApplyList(Page<Object> objectPage,
                                                @Param("companyWechatIds") List<String> companyWechatIds,
                                                @Param("keyword") String keyword,
-                                               @Param("status") String status);
+                                               @Param("status") String status,
+                                               @Param("adminWebsitIds") List<String> adminWebsitIds
+                                               );
 }

+ 5 - 1
src/main/java/com/gree/mall/manager/logic/user/UserLogic.java

@@ -109,10 +109,12 @@ public class UserLogic {
         //获取当前登录企业微信id
         AdminUserCom adminUser = commonLogic.getAdminUser(request);
         List<String> companyWechatIds = adminUser.getAdminCompanyIds();
+        List<String> adminWebsitIds = adminUser.getAdminWebsitIds();
 
         LambdaQueryWrapper<User> memberLambdaQueryWrapper = new LambdaQueryWrapper<>();
         memberLambdaQueryWrapper
                 .in(CollectionUtils.isNotEmpty(companyWechatIds), User::getCompanyWechatId, companyWechatIds)
+                .in(CollectionUtils.isNotEmpty(adminWebsitIds), User::getWebsitId, adminWebsitIds)
                 .eq(isExchangeCode != null,User::getIsExchangeCode,isExchangeCode)
                 .eq(promotionGroupLeader != null, User::getPromotionGroupLeader, promotionGroupLeader)
                 .eq(StringUtils.isNotEmpty(type), User::getType, type)
@@ -563,7 +565,8 @@ public class UserLogic {
         //获取当前登录企业微信id
         AdminUserCom adminUser = commonLogic.getAdminUser(request);
         List<String> companyWechatIds = adminUser.getAdminCompanyIds();
-        IPage<UserApplyBean> page = wxCustomerMapper.queryServiceApplyList(new Page<>(pageNum, pageSize), companyWechatIds, keyword, status);
+        List<String> adminWebsitIds = adminUser.getAdminWebsitIds();
+        IPage<UserApplyBean> page = wxCustomerMapper.queryServiceApplyList(new Page<>(pageNum, pageSize), companyWechatIds, keyword, status,adminWebsitIds);
         return page;
     }
 
@@ -614,6 +617,7 @@ public class UserLogic {
         AdminUserCom adminUser = commonLogic.getAdminUser();
         return userServiceWaitService.lambdaQuery()
                 .eq(UserServiceWait::getCompanyWechatId, adminUser.getCompanyWechatId())
+                .eq(CollectionUtils.isNotEmpty(adminUser.getAdminWebsitIds()),UserServiceWait::getWebsitId, adminUser.getAdminWebsitIds())
                 .like(StringUtils.isNotBlank(websitId), UserServiceWait::getWebsitId, websitId)
                 .like(StringUtils.isNotBlank(websitName), UserServiceWait::getWebsitName, websitName)
                 .like(StringUtils.isNotBlank(workUserId), UserServiceWait::getWorkerId, workUserId)

+ 6 - 0
src/main/resources/mapper/WxCustomerMapper.xml

@@ -129,6 +129,12 @@
                 #{item}
             </foreach>
         </if>
+        <if test="adminWebsitIds != null and adminWebsitIds.size > 0">
+            AND b.adminWebsitIds IN
+            <foreach item="item" index="index" collection="adminWebsitIds" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
         <if test="keyword != null and keyword != ''">
             AND (a.mobile LIKE concat('%',#{keyword,jdbcType=VARCHAR},'%') OR b.nick_name LIKE
             concat('%',#{keyword,jdbcType=VARCHAR},'%'))