From b2a68b1eaa6db1c1456534e084d66fe98e4443f0 Mon Sep 17 00:00:00 2001 From: peng <peng.com> Date: 星期四, 21 八月 2025 15:26:59 +0800 Subject: [PATCH] 抽奖活动 --- framework/src/main/resources/mapper/lmk/ActivityMapper.xml | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/framework/src/main/resources/mapper/lmk/ActivityMapper.xml b/framework/src/main/resources/mapper/lmk/ActivityMapper.xml index e651bc2..cd31bbf 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 @@ -244,10 +241,17 @@ LA.activity_location, LA.activity_content FROM - lmk_activity LA inner join lmk_activity_audit_record LAAR ON LA.id = LAAR.activity_id and LAAR.delete_flag = 0 and LAAR.audit = 1 + lmk_activity LA WHERE LA.delete_flag = 0 AND LA.publish = 1 + AND EXISTS ( + SELECT 1 + FROM lmk_activity_audit_record LAAR + WHERE LA.id = LAAR.activity_id + AND LAAR.delete_flag = 0 + AND LAAR.audit = 1 + ) </select> -- Gitblit v1.8.0