zhongrj
2024-04-02 566e7986291e73051d30ee252b0ebf852b1577a7
src/main/java/org/springblade/modules/discuss/mapper/PublicDiscussMapper.xml
@@ -62,8 +62,11 @@
        jpd.vote_number_public,
        jpd.appoint_user,
        jpd.user_ids,
        jpd.event_type
        jpd.event_type,
        jpd.signature_flag,
        GROUP_CONCAT(jh.name) userName
        from jczz_public_discuss jpd
        LEFT JOIN jczz_household jh ON FIND_IN_SET ( jh.id, jpd.user_ids )
        <where>
            <if test="publicDiscuss.id != null "> and id = #{publicDiscuss.id}</if>
            <if test="publicDiscuss.title != null  and publicDiscuss.title != ''"> and title = #{publicDiscuss.title}</if>
@@ -82,6 +85,7 @@
            <if test="publicDiscuss.userIds != null  and publicDiscuss.userIds != ''"> and user_ids = #{publicDiscuss.userIds}</if>
            <if test="publicDiscuss.eventType != null "> and event_type = #{publicDiscuss.eventType}</if>
        </where>
        GROUP BY jpd.id
    </select>
    <select id="selectPublicDiscussList" parameterType="org.springblade.modules.discuss.dto.PublicDiscussDTO" resultMap="publicDiscussResultMap">
@@ -126,11 +130,11 @@
        jpd.user_ids,
        jpd.event_type,
        jpd.signature_flag,
        (SELECT user_id from jczz_user_public_enroll where user_id = #{userId} and public_discuss_id = jpd.id)userId
        (SELECT household_id from jczz_user_public_enroll where household_id = #{householdId} and article_id = jpd.article_id)householdId
        from
        jczz_public_discuss jpd
        <where>
            <if test="id != null "> and jpd.id = #{id}</if>
            <if test="articleId != null ">and jpd.article_id = #{articleId}</if>
        </where>
    </select>