Commit 6e45121b authored by liwei's avatar liwei

修改了活动查询接口

parent cdb54dbd
...@@ -84,7 +84,8 @@ ...@@ -84,7 +84,8 @@
</select> </select>
<select id="queryCmsActivityPaged" resultMap="BaseResultMap"> <select id="queryCmsActivityPaged" resultMap="BaseResultMap">
SELECT ca.business_id, SELECT
ca.business_id,
ca.publish_date, ca.publish_date,
ca.create_by, ca.create_by,
ca.create_date, ca.create_date,
...@@ -106,23 +107,21 @@ ...@@ -106,23 +107,21 @@
ca.end_time, ca.end_time,
ca.summary, ca.summary,
ca.max_application_count, ca.max_application_count,
su.nick_name as nickName, su.nick_name AS nickName,
oi.url oi.url
FROM cms_activity ca
LEFT JOIN
(SELECT
activity_id,
COUNT(*) AS application_count
FROM FROM
cms_application cms_activity ca
LEFT JOIN (
SELECT activity_id, COUNT(*) AS application_count
FROM cms_application
WHERE status = '1'
GROUP BY activity_id
) AS applicationList ON ca.business_id = applicationList.activity_id
LEFT JOIN oss_info oi ON ca.picture_id = oi.business_id
LEFT JOIN sys_user su ON su.business_id = ca.create_by
WHERE WHERE
status = '1' ca.del_flag = '0'
GROUP BY AND ca.publish_status = '1'
activity_id) AS applicationList
ON ca.business_id = applicationList.activity_id
LEFT JOIN oss_info oi on ca.picture_id = oi.business_id
LEFT JOIN sys_user su on su.business_id = ca.create_by
where ca.del_flag='0'
<if test="entity.flag!=null and entity.flag != '' "> <if test="entity.flag!=null and entity.flag != '' ">
and ca.flag = #{entity.flag} and ca.flag = #{entity.flag}
</if> </if>
...@@ -180,7 +179,8 @@ ...@@ -180,7 +179,8 @@
<if test="entity.publishStatus !=null "> <if test="entity.publishStatus !=null ">
and ca.publish_status = #{entity.publishStatus} and ca.publish_status = #{entity.publishStatus}
</if> </if>
ORDER BY ca.publish_date DESC ORDER BY
ca.publish_date DESC
</select> </select>
<update id="deleteCmsActivity" parameterType="java.lang.Integer"> <update id="deleteCmsActivity" parameterType="java.lang.Integer">
update cms_activity update cms_activity
......
...@@ -184,6 +184,7 @@ ...@@ -184,6 +184,7 @@
left join oss_info oi on oi.business_id = m.avatar left join oss_info oi on oi.business_id = m.avatar
where 1=1 where 1=1
and m.del_flag = '0' and m.del_flag = '0'
and m.user_id != 1
<if test="entity.flag !=null and entity.flag != '' "> <if test="entity.flag !=null and entity.flag != '' ">
and m.flag = #{entity.flag} and m.flag = #{entity.flag}
</if> </if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment