linwe
2024-08-09 8b7258c9427882bb1798f1502eaa35184c6e374e
src/main/java/org/springblade/modules/circle/mapper/CircleMapper.xml
@@ -11,6 +11,10 @@
        <result property="circleVideo"    column="circle_video"    />
        <result property="deletedFalg"    column="deleted_falg"    />
        <result property="circleType"    column="circle_type"    />
        <result property="eventId"    column="event_id"    />
        <result property="evenType"    column="even_type"    />
        <result property="communityCode"    column="community_code"    />
        <result property="houseCode"    column="house_code"    />
    </resultMap>
    <sql id="selectCircle">
@@ -22,7 +26,11 @@
            circle_images,
            circle_video,
            deleted_falg,
            circle_type
            circle_type,
            event_id,
            even_type,
            community_code,
            house_code
        from
            jczz_circle
    </sql>
@@ -49,16 +57,9 @@
    <select id="selectCirclePage" resultMap="CircleVOResult">
        select jc.id,
        jc.user_id,
        jc.create_time,
        jc.circle_text,
        jc.circle_images,
        jc.circle_video,
        jc.deleted_falg,
        select jc.*,
        bu.name,
        bu.avatar,
        jc.circle_type,
        (select count(1) from jczz_circle_like jcl where jcl.circle_id = jc.id and jcl.user_id = #{circle.userIds} and
        jcl.delete_flag = 0 ) likeFlag
        from jczz_circle jc left join blade_user bu on jc.user_id = bu.id
@@ -77,6 +78,10 @@
            </if>
            <if test="circle.deletedFalg != null ">and jc.deleted_falg = #{circle.deletedFalg}</if>
            <if test="circle.circleType != null ">and jc.circle_type = #{circle.circleType}</if>
            <if test="circle.eventId != null "> and event_id = #{circle.eventId}</if>
            <if test="circle.evenType != null "> and even_type = #{circle.evenType}</if>
            <if test="circle.communityCode != null  and circle.communityCode != ''"> and community_code = #{circle.communityCode}</if>
            <if test="circle.houseCode != null  and circle.houseCode != ''"> and house_code = #{circle.houseCode}</if>
        </where>
        order by jc.create_time desc
    </select>