From 50d7478082c9a8b4b75bcc202086cb610ec781c1 Mon Sep 17 00:00:00 2001 From: peng <peng.com> Date: 星期四, 17 七月 2025 19:13:19 +0800 Subject: [PATCH] 修改图片显示问题 --- framework/src/main/resources/mapper/lmk/ActivityMapper.xml | 65 ++++++++++++++++++++++++++++++-- 1 files changed, 61 insertions(+), 4 deletions(-) diff --git a/framework/src/main/resources/mapper/lmk/ActivityMapper.xml b/framework/src/main/resources/mapper/lmk/ActivityMapper.xml index 75c5379..4ac053c 100644 --- a/framework/src/main/resources/mapper/lmk/ActivityMapper.xml +++ b/framework/src/main/resources/mapper/lmk/ActivityMapper.xml @@ -128,10 +128,7 @@ LA.activity_location, LA.activity_content, LA.publish, - CASE WHEN EXISTS ( - SELECT 1 FROM lmk_activity_audit_record - WHERE activity_id = LA.id AND delete_flag = 0 AND audit != 0 - ) THEN 1 ELSE 0 END AS auditStatus + LAAR.audit as auditStatus FROM lmk_activity LA LEFT JOIN @@ -165,8 +162,68 @@ <if test="query.audit == true" >AND LAAR.audit != 0</if> <if test="query.audit == false" >AND LAAR.audit = 0</if> <if test="query.memberId !=null and query.memberId !=''">And LA.member_id = #{query.memberId}</if> + <if test="query.storeId !=null and query.storeId !=''">And LA.store_id = #{query.storeId}</if> + Order by LA.create_time DESC </select> + <select id="storeGetPage" resultMap="BaseResultMap"> + SELECT + LA.id, + LA.activity_name, + LA.activity_type, + LA.report_start_time, + LA.report_end_time, + LA.start_time, + LA.end_time, + LA.status, + LA.recommend, + LA.cover, + LA.cover_type, + LA.limit_user_num, + LA.activity_location, + LA.activity_content, + LA.publish, + LAAR.audit as auditStatus + FROM + lmk_activity LA + LEFT JOIN + ( + SELECT + activity_id, + audit, + create_time + FROM ( + SELECT + activity_id, + audit, + create_time, + ROW_NUMBER() OVER (PARTITION BY activity_id ORDER BY create_time DESC) AS rn + FROM + lmk_activity_audit_record + WHERE + delete_flag = 0 + ) t + WHERE + rn = 1 + ) LAAR ON LA.id = LAAR.activity_id + WHERE + LA.delete_flag = 0 + <if test="query.activityName != null and query.activityName != ''">AND LA.activity_name LIKE CONCAT('%', #{query.activityName}, '%')</if> + <if test="query.activityType != null and query.activityType != ''">AND LA.activity_type LIKE CONCAT('%', #{query.activityType}, '%')</if> + <if test="query.recommend != null and query.recommend != ''">AND LA.recommend = #{recommend}</if> + <if test="query.reportStartTime != null">AND LA.report_start_time >= #{query.reportStartTime}</if> + <if test="query.reportEndTime != null">AND LA.report_end_time <= #{query.reportEndTime}</if> + <if test="query.memberId != null and query.memberId !=''">AND LA.member_id <= #{query.memberId}</if> + <if test="query.audit == true" >AND LAAR.audit != 0</if> + <if test="query.audit == false" >AND LAAR.audit = 0</if> + <if test="query.memberId !=null and query.memberId !=''">And LA.member_id = #{query.memberId}</if> + <if test="query.storeId !=null and query.storeId !=''">And LA.store_id = #{query.storeId}</if> + Order by LA.create_time DESC + </select> + + + + <select id="getCanReportPage" resultMap="BaseResultMap"> SELECT LA.id, -- Gitblit v1.8.0