Commit 6e45121b authored by liwei's avatar liwei

修改了活动查询接口

parent cdb54dbd
......@@ -84,7 +84,8 @@
</select>
<select id="queryCmsActivityPaged" resultMap="BaseResultMap">
SELECT ca.business_id,
SELECT
ca.business_id,
ca.publish_date,
ca.create_by,
ca.create_date,
......@@ -106,23 +107,21 @@
ca.end_time,
ca.summary,
ca.max_application_count,
su.nick_name as nickName,
su.nick_name AS nickName,
oi.url
FROM cms_activity ca
LEFT JOIN
(SELECT
activity_id,
COUNT(*) AS application_count
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
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 ca.del_flag='0'
ca.del_flag = '0'
AND ca.publish_status = '1'
<if test="entity.flag!=null and entity.flag != '' ">
and ca.flag = #{entity.flag}
</if>
......@@ -180,7 +179,8 @@
<if test="entity.publishStatus !=null ">
and ca.publish_status = #{entity.publishStatus}
</if>
ORDER BY ca.publish_date DESC
ORDER BY
ca.publish_date DESC
</select>
<update id="deleteCmsActivity" parameterType="java.lang.Integer">
update cms_activity
......
......@@ -184,6 +184,7 @@
left join oss_info oi on oi.business_id = m.avatar
where 1=1
and m.del_flag = '0'
and m.user_id != 1
<if test="entity.flag !=null and entity.flag != '' ">
and m.flag = #{entity.flag}
</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