hym %!s(int64=4) %!d(string=hai) anos
pai
achega
1c51784d10
Modificáronse 1 ficheiros con 5 adicións e 5 borrados
  1. 5 5
      user_center/src/main/resources/mapper/UserGroupMapper.xml

+ 5 - 5
user_center/src/main/resources/mapper/UserGroupMapper.xml

@@ -216,15 +216,15 @@
           left join uims_user_role userrole ON userrole.USER_ID=a.id
      </sql>
     <select id="findUsersByUserGroup" resultType="com.huaxu.entity.UserEntity">
-        select 	<include refid="userColumns"/>,b.id userGroupId
-         from uims_user a left join uims_group_user b on a.id=b.USER_ID
-        <include refid="sysAreaJoins"/>
+        select distinct a.username as "username" , a.id as "id"
+        from uims_user a left join uims_group_user b on a.id=b.USER_ID
+
         where  a.status!=0
         <if test="id != -1 ">
-           and  b.GROUP_ID=#{id} and b.status!=0 and userrole.status!=0
+           and  b.GROUP_ID=#{id} and b.status!=0
         </if>
         <if test="id == -1 ">
-          and  b.GROUP_ID is null and userrole.status!=0
+            and (b.GROUP_ID is null or b.status =0 )
         </if>
         <if test="tenantId != null and tenantId != ''">
             and a.TENANT_ID = #{tenantId}