| | |
| | | <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"> |
| | |
| | | circle_images, |
| | | circle_video, |
| | | deleted_falg, |
| | | circle_type |
| | | circle_type, |
| | | event_id, |
| | | even_type, |
| | | community_code, |
| | | house_code |
| | | from |
| | | jczz_circle |
| | | </sql> |
| | |
| | | |
| | | |
| | | <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 |
| | | (selelct count(1) from jczz_circle_like jcl where jcl.circle_id = jc.id and user_id = #{userId} ) likeFlag |
| | | (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 |
| | | <where> |
| | | <if test="circle.id != null "> and id = #{circle.id}</if> |
| | | <if test="circle.userId != null "> and user_id = #{circle.userId}</if> |
| | | <if test="circle.createTime != null "> and create_time = #{circle.createTime}</if> |
| | | <if test="circle.circleText != null and circle.circleText != ''"> and circle_text = #{circle.circleText}</if> |
| | | <if test="circle.circleImages != null and circle.circleImages != ''"> and circle_images = #{circle.circleImages}</if> |
| | | <if test="circle.circleVideo != null and circle.circleVideo != ''"> and circle_video = #{circle.circleVideo}</if> |
| | | <if test="circle.deletedFalg != null "> and deleted_falg = #{circle.deletedFalg}</if> |
| | | <if test="circle.circleType != null "> and circle_type = #{circle.circleType}</if> |
| | | <if test="circle.id != null ">and jc.id = #{circle.id}</if> |
| | | <if test="circle.userId != null ">and jc.user_id = #{circle.userId}</if> |
| | | <if test="circle.createTime != null ">and jc.create_time = #{circle.createTime}</if> |
| | | <if test="circle.circleText != null and circle.circleText != ''">and jc.circle_text like concat |
| | | ('%',#{circle.circleText},'%') |
| | | </if> |
| | | <if test="circle.circleImages != null and circle.circleImages != ''">and jc.circle_images = |
| | | #{circle.circleImages} |
| | | </if> |
| | | <if test="circle.circleVideo != null and circle.circleVideo != ''">and jc.circle_video = |
| | | #{circle.circleVideo} |
| | | </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> |
| | | |
| | | |