left join (select PARTY_GROUP_ID,NICKNAME from epdc_party_user_group where IDENTITY_FLAG = '0' and DEL_FLAG='0' and STATE='0') t1 on t.ID = t1.PARTY_GROUP_ID
where t.DEL_FLAG ='0'
@ -89,7 +90,8 @@
t.UPDATED_TIME,
t1.NICKNAME,
t1.USER_ID,
t.SORT
t.SORT,
t.RELATION_COMMUNITY
from epdc_party_group t
left join (select PARTY_GROUP_ID,NICKNAME,USER_ID from epdc_party_user_group where IDENTITY_FLAG = '0' and DEL_FLAG='0' and STATE='0') t1 on t.ID = t1.PARTY_GROUP_ID
where t.DEL_FLAG ='0' and t.ID = #{id}
@ -101,7 +103,8 @@
t.ID,
t.PARTY_GROUP_NAME,
t.PARTY_GROUP_AVATAR,
if(t1.ID is not null ,1,0) as isJoin
if(t1.ID is not null ,1,0) as isJoin,
t.RELATION_COMMUNITY
from epdc_party_group t
left join epdc_party_user_group t1 on t1.PARTY_GROUP_ID = t.ID and t1.DEL_FLAG ='0' and t1.USER_ID=#{userId}
where t.DEL_FLAG ='0' and t.STATE ='0' order by t.SORT, t.CREATED_TIME desc
@ -124,4 +127,4 @@
<updateid="updateGridByDeptId">
UPDATE epdc_party_topic SET DEPT = #{newDeptName}, UPDATED_TIME = NOW() WHERE DEPT_ID = #{deptId}