From dbbad373cfa576ced45044abf7dfc887ebd12be8 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期四, 31 七月 2025 11:45:49 +0800
Subject: [PATCH] 活动代码修改

---
 framework/src/main/java/cn/lili/modules/lmk/service/impl/ActivityReportServiceImpl.java |   14 +++++++++++---
 framework/src/main/java/cn/lili/modules/lmk/service/impl/ActivityServiceImpl.java       |   11 ++++++++---
 2 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/ActivityReportServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/ActivityReportServiceImpl.java
index a5729f7..8a86350 100644
--- a/framework/src/main/java/cn/lili/modules/lmk/service/impl/ActivityReportServiceImpl.java
+++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/ActivityReportServiceImpl.java
@@ -6,6 +6,7 @@
 import cn.lili.modules.lmk.domain.vo.ActivityReportVO;
 import cn.lili.modules.lmk.mapper.ActivityReportMapper;
 import cn.lili.modules.lmk.service.ActivityReportService;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.RequiredArgsConstructor;
@@ -25,9 +26,16 @@
 
     @Override
     public Result delByActivityId(String activityId) {
-        baseMapper.delete(new LambdaQueryChainWrapper<>(baseMapper)
-                .eq(ActivityReport::getActivityId, activityId)
-                .eq(ActivityReport::getDeleteFlag,Boolean.FALSE));
+        LambdaQueryWrapper<ActivityReport> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(ActivityReport::getActivityId, activityId)
+                .eq(ActivityReport::getDeleteFlag, Boolean.FALSE);
+        int deletedRows = baseMapper.delete(wrapper);
+        if (deletedRows > 0) {
+            System.out.println("鍒犻櫎鏉℃暟:" + deletedRows);
+        } else {
+            System.out.println("鏈壘鍒板尮閰嶇殑璁板綍");
+        }
+
         return Result.ok();
     }
 
diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/ActivityServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/ActivityServiceImpl.java
index 67827d3..825ffd3 100644
--- a/framework/src/main/java/cn/lili/modules/lmk/service/impl/ActivityServiceImpl.java
+++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/ActivityServiceImpl.java
@@ -121,14 +121,15 @@
 
         //娲诲姩鏄惁鍙戝竷
         if (activity.getPublish()){
-            throw new RuntimeException("瀛樺湪娲诲姩宸插彂甯冨垹闄ゅ墠璇蜂笅鏋惰娲诲姩锛�");
+            return Result.error("瀛樺湪娲诲姩宸插彂甯冨垹闄ゅ墠璇蜂笅鏋惰娲诲姩锛�");
         }
         //妫�鏌ユ姤鍚嶄汉鍛樺墠鍒ゆ柇娲诲姩鏄惁缁撴潫浜� 缁撴潫浜嗗氨鍏佽鍒犻櫎
         Date currentDate = new Date();
         if (currentDate.before(activity.getEndTime())){
             //娲诲姩鏈粨鏉� 涓旀姤鍚嶄汉鍛樼殑鎯呭喌
             if(haveApplicationMembers(activity.getId())){
-                throw new RuntimeException("瀛樺湪娲诲姩宸叉湁鎶ュ悕浜哄憳锛屾棤娉曞垹闄わ紒");
+                //todo 鎶ュ悕浜哄憳瀛樺湪 浣嗘槸闇�瑕佸垹闄ょ殑鎯呭喌棰勭暀
+//                return Result.error("娲诲姩鏈粨鏉熶笖宸叉湁鎶ュ悕浜哄憳锛屾棤娉曞垹闄わ紒");
             }
 
         }
@@ -260,8 +261,12 @@
 
             if (currentTime.before(entity.getEndTime())){
                 if(haveApplicationMembers(form.getId())){
-                    return Result.error("璇ユ椿鍔ㄦ棤娉曚笅鏋讹紝宸插瓨鍦ㄦ姤鍚嶄汉鍛�");
+//                    return Result.error("璇ユ椿鍔ㄦ棤娉曚笅鏋讹紝宸插瓨鍦ㄦ姤鍚嶄汉鍛�");
+                    //todo 鎶ュ悕浜哄憳瀛樺湪 浣嗘槸闇�瑕佷笅鏋剁殑鎯呭喌棰勭暀
+
                 }
+
+
             }
 
         }else {

--
Gitblit v1.8.0