‘linchangsheng’ 1 week ago
parent
commit
01b892aef5

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

@@ -12,5 +12,5 @@ public interface CustomMemberMapper {
     @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
     List<MemberBean> queryUser(@Param("type")String type, @Param("keyword")String keyword,
                                @Param("websitNos")List<String> websitNos, @Param("startTime")String startTime,
-                               @Param("endTime")String endTime, @Param("companyIds")List<String> companyIds);
+                               @Param("endTime")String endTime, @Param("companyIds")List<String> companyIds,@Param("websitIds")List<String> websitIds);
 }

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

@@ -173,8 +173,9 @@ public class UserLogic {
         //获取当前登录企业微信id
         AdminUserCom adminUser = commonLogic.getAdminUser(request);
         List<String> companyWechatIds = adminUser.getAdminCompanyIds();
+        List<String> websitIds = adminUser.getAdminWebsitIds();
 
-        List<MemberBean> userList = customMemberMapper.queryUser(type, keyword, null, startTime, endTime, companyWechatIds);
+        List<MemberBean> userList = customMemberMapper.queryUser(type, keyword, null, startTime, endTime, companyWechatIds,websitIds);
 
         log.info("会员导出请求参数{},{},{},{}", type, keyword, startTime, endTime);
         log.info("会员导出数据条数{}", userList == null ? 0 : userList.size());

+ 7 - 9
src/main/resources/mapper/CustomMemberMapper.xml

@@ -4,8 +4,6 @@
     <select id="queryUser" resultType="com.gree.mall.manager.bean.member.MemberBean">
         select ur.*
         from user ur
-        left join enterprise_wechat_worker eww on eww.wechat_user_id = ur.work_user_id
-        left join admin_websit aw on aw.id = eww.main_department
         where
         ur.status =1
         <if test=' companyIds != null and companyIds.size > 0' >
@@ -14,6 +12,12 @@
                 #{companyId}
             </foreach>
         </if>
+        <if test=' websitIds != null and websitIds.size > 0' >
+            and ur.websit_id in
+            <foreach collection="websitIds" open="(" close=")" item="companyId" separator=",">
+                #{websitId}
+            </foreach>
+        </if>
         <if test="type != null and type !=''">
             and ur.type = #{type}
         </if>
@@ -24,13 +28,7 @@
             and (ur.nick_name like concat('%',#{keyword,jdbcType=VARCHAR},'%') or ur.mobile like
             concat('%',#{keyword,jdbcType=VARCHAR},'%'))
         </if>
-         <if test="null != websitNos and websitNos.size > 0">
-             and aw.websit_number in
-             <foreach item="item" index="index" collection="websitNos" open="(" separator=","
-                      close=")">
-                 #{item}
-             </foreach>
-        </if>
+
         order by ur.create_time
     </select>