|
@ -146,6 +146,7 @@ |
|
|
<result property="thisCommunity" column="thisCommunity"/> |
|
|
<result property="thisCommunity" column="thisCommunity"/> |
|
|
<result property="shieldFlag" column="SHIELD_FLAG"/> |
|
|
<result property="shieldFlag" column="SHIELD_FLAG"/> |
|
|
<result property="shieldReason" column="SHIELD_REASON"/> |
|
|
<result property="shieldReason" column="SHIELD_REASON"/> |
|
|
|
|
|
<result property="topFlag" column="TOP_FLAG"/> |
|
|
<collection property="images" ofType="java.lang.String"> |
|
|
<collection property="images" ofType="java.lang.String"> |
|
|
<result property="image" column="IMG_URL"/> |
|
|
<result property="image" column="IMG_URL"/> |
|
|
</collection> |
|
|
</collection> |
|
@ -163,31 +164,32 @@ |
|
|
</collection> |
|
|
</collection> |
|
|
</resultMap> |
|
|
</resultMap> |
|
|
<select id="selectListOfPartyTopic" resultMap="partyTopicResult"> |
|
|
<select id="selectListOfPartyTopic" resultMap="partyTopicResult"> |
|
|
select t.ID, |
|
|
select t.ID, |
|
|
t.NICKNAME, |
|
|
t.NICKNAME, |
|
|
t.USER_FACE, |
|
|
t.USER_FACE, |
|
|
t.PARTY_MEMBER, |
|
|
t.PARTY_MEMBER, |
|
|
t.CREATED_TIME, |
|
|
t.CREATED_TIME, |
|
|
t.TOPIC_CONTENT, |
|
|
t.TOPIC_CONTENT, |
|
|
t.TOPIC_MODULE, |
|
|
t.TOPIC_MODULE, |
|
|
t.SUPPORT_NUM, |
|
|
t.SUPPORT_NUM, |
|
|
t.COMMENT_NUM, |
|
|
t.COMMENT_NUM, |
|
|
t.TOPIC_ADDRESS, |
|
|
t.TOPIC_ADDRESS, |
|
|
t6.IDENTITY_FLAG, |
|
|
t6.IDENTITY_FLAG, |
|
|
<if test='userId != "" and userId != null'> |
|
|
<if test='userId != "" and userId != null'> |
|
|
if( t1.ATTITUDE_FLAG='0',1,0)likeFlag, |
|
|
if( t1.ATTITUDE_FLAG='0',1,0)likeFlag, |
|
|
</if> |
|
|
</if> |
|
|
t2.IMG_URL, |
|
|
t2.IMG_URL, |
|
|
t3.ID as commentId, |
|
|
t3.ID as commentId, |
|
|
t3.USERNAME as username, |
|
|
t3.USERNAME as username, |
|
|
t3.USER_FACE as commentUserFace, |
|
|
t3.USER_FACE as commentUserFace, |
|
|
t3.CONTENT as content, |
|
|
t3.CONTENT as content, |
|
|
t3.PARTY_MEMBER as commentPartyMember, |
|
|
t3.PARTY_MEMBER as commentPartyMember, |
|
|
t5.USER_ID as supportUserId, |
|
|
t5.USER_ID as supportUserId, |
|
|
t5.NICKNAME as supportNickname, |
|
|
t5.NICKNAME as supportNickname, |
|
|
t5.USER_AVATAR as supportUserAvatar, |
|
|
t5.USER_AVATAR as supportUserAvatar, |
|
|
(if(find_in_set(t7.DEPT_ID,t6.ALL_DEPT_IDS)>0,'1','0'))as thisCommunity |
|
|
(if(find_in_set(t7.DEPT_ID,t6.ALL_DEPT_IDS)>0,'1','0'))as thisCommunity, |
|
|
from epdc_party_topic t |
|
|
t.TOP_FLAG |
|
|
|
|
|
from epdc_party_topic t |
|
|
<if test='userId != "" and userId != null'> |
|
|
<if test='userId != "" and userId != null'> |
|
|
left join (select * from epdc_party_topic_user_attitude)t1 on t.ID = t1.PARTY_TOPIC_ID and t1.DEL_FLAG='0' and t1.USER_ID = #{userId} |
|
|
left join (select * from epdc_party_topic_user_attitude)t1 on t.ID = t1.PARTY_TOPIC_ID and t1.DEL_FLAG='0' and t1.USER_ID = #{userId} |
|
|
</if> |
|
|
</if> |
|
@ -218,9 +220,10 @@ |
|
|
and t1.ID = #{partyTopicId} |
|
|
and t1.ID = #{partyTopicId} |
|
|
</if> |
|
|
</if> |
|
|
ORDER BY |
|
|
ORDER BY |
|
|
|
|
|
t1.TOP_TIME DESC, |
|
|
t1.CREATED_TIME DESC |
|
|
t1.CREATED_TIME DESC |
|
|
LIMIT #{pageIndex},#{pageSize}) tmp) |
|
|
LIMIT #{pageIndex},#{pageSize}) tmp) |
|
|
order by t.CREATED_TIME desc,t3.CREATED_TIME,t4.CREATED_TIME |
|
|
order by t.TOP_TIME DESC, t.CREATED_TIME desc,t3.CREATED_TIME,t4.CREATED_TIME |
|
|
</select> |
|
|
</select> |
|
|
<select id="selectListOfMyPartyTopic" resultMap="partyTopicResult"> |
|
|
<select id="selectListOfMyPartyTopic" resultMap="partyTopicResult"> |
|
|
|
|
|
|
|
@ -319,4 +322,30 @@ |
|
|
ORDER BY |
|
|
ORDER BY |
|
|
i.IMG_URL |
|
|
i.IMG_URL |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select id="selectGroupUserByUserIdAndTopicId" resultType="Integer"> |
|
|
|
|
|
SELECT |
|
|
|
|
|
COUNT(ug.ID) |
|
|
|
|
|
FROM |
|
|
|
|
|
epdc_party_user_group ug |
|
|
|
|
|
LEFT JOIN epdc_party_topic pt ON ug.PARTY_GROUP_ID = pt.PARTY_GROUP_ID |
|
|
|
|
|
AND pt.DEL_FLAG = '0' |
|
|
|
|
|
WHERE |
|
|
|
|
|
ug.DEL_FLAG = '0' |
|
|
|
|
|
AND ug.STATE = 0 |
|
|
|
|
|
AND ug.IDENTITY_FLAG IN ( '0', '1' ) |
|
|
|
|
|
AND pt.ID = #{formDto.topicId} |
|
|
|
|
|
AND ug.USER_ID = #{formDto.userId} |
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<update id="updateTopicTopFlagById"> |
|
|
|
|
|
UPDATE epdc_party_topic SET TOP_FLAG = #{formDto.topFlag} |
|
|
|
|
|
<if test='formDto.topFlag == "0"'> |
|
|
|
|
|
, TOP_TIME = NULL |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test='formDto.topFlag == "1"'> |
|
|
|
|
|
, TOP_TIME = NOW() |
|
|
|
|
|
</if> |
|
|
|
|
|
WHERE ID = #{formDto.topicId} |
|
|
|
|
|
</update> |
|
|
</mapper> |
|
|
</mapper> |