Browse Source

bugFix 0281

xiahan 1 năm trước cách đây
mục cha
commit
035e308441

+ 4 - 3
rw-training/training-common/src/main/resources/mybatis/TraningCommonDao.xml

@@ -32,12 +32,12 @@
     </select>
 
     <select id="getAllUserIdAndNameByOrgId" resultType="String">
-        with orgid as (select DISTINCT ID from sys_organization
+        with org_id as (select DISTINCT ID from sys_organization
         <where>
             DELETED='0'
             AND
             <foreach collection="orgIds" open="(" close=")" separator="or" item="orgId">
-                FIND_IN_SET(#{orgId},FULLPID)
+                FIND_IN_SET(#{orgId},CONCAT(FULLPID,',',ID))
             </foreach>
         </where>
         )
@@ -46,8 +46,9 @@
         FROM
         sys_user su
         LEFT JOIN sys_user_org suo ON suo.USERID = su.ID
-        AND suo.DELETED = '0' AND suo.ORGID IN (select ID from orgid)
+        AND suo.DELETED = '0'
         where su.DELETED='0'
+        AND suo.ORGID IN (select ID from org_id)
     </select>
     <select id="getDemandUserInfo" resultType="com.rongwei.training.vo.DemandUserVo">
         SELECT