| | |
| | | |
| | | |
| | | <select id="selectCirclePage" resultMap="CircleVOResult"> |
| | | select jc.id, |
| | | select jc.id, |
| | | jc.user_id, |
| | | jc.create_time, |
| | | jc.circle_text, |
| | |
| | | jc.deleted_falg, |
| | | 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 |
| | | 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 |
| | | <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> |
| | | </where> |
| | | order by jc.create_time desc |
| | | </select> |
| | | |
| | | |