From 9d54d50c7beb2e6f0baee23ad0d536eb53d89eec Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期一, 25 八月 2025 17:55:06 +0800
Subject: [PATCH] 抽奖活动

---
 framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeActivityServiceImpl.java |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeActivityServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeActivityServiceImpl.java
index 2b199ce..0b5e08f 100644
--- a/framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeActivityServiceImpl.java
+++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeActivityServiceImpl.java
@@ -3,6 +3,7 @@
 import cn.lili.common.utils.StringUtils;
 import cn.lili.modules.lmk.domain.entity.ActivityRefPrize;
 import cn.lili.modules.lmk.domain.vo.ActivityRefPrizeInfoVO;
+import cn.lili.modules.lmk.domain.vo.PrizeDetailVO;
 import cn.lili.modules.lmk.enums.general.PrizeActivityStatusEnum;
 import cn.lili.modules.lmk.service.ActivityRefPrizeService;
 import cn.lili.utils.COSUtil;
@@ -61,14 +62,12 @@
             }
             // 浣跨敤 list
         }
-
-
-        if (PrizeActivityStatusEnum.OFF.getDescription().equals(prizeActivity.getEnableStatus())) {
-            prizeActivity.setEnableStatus(PrizeActivityStatusEnum.ON.getDescription());
+        if (PrizeActivityStatusEnum.OFF.name().equals(prizeActivity.getEnableStatus())) {
+            prizeActivity.setEnableStatus(PrizeActivityStatusEnum.ON.name());
             baseMapper.updateById(prizeActivity);
             return Result.ok("鍚姩鎴愬姛");
         }else {
-            prizeActivity.setEnableStatus(PrizeActivityStatusEnum.OFF.getDescription());
+            prizeActivity.setEnableStatus(PrizeActivityStatusEnum.OFF.name());
             baseMapper.updateById(prizeActivity);
             return Result.ok("鍏抽棴鎴愬姛");
         }
@@ -84,6 +83,7 @@
     @Override
     public Result add(PrizeActivityForm form) {
         PrizeActivity entity = PrizeActivityForm.getEntityByForm(form, null);
+        entity.setEnableStatus(PrizeActivityStatusEnum.OFF.name());
         baseMapper.insert(entity);
         return Result.ok("娣诲姞鎴愬姛");
     }
@@ -100,6 +100,7 @@
         // 涓虹┖鎶汭llegalArgumentException锛屽仛鍏ㄥ眬寮傚父澶勭悊
         Assert.notNull(entity, "璁板綍涓嶅瓨鍦�");
         BeanUtils.copyProperties(form, entity);
+        entity.setEnableStatus(PrizeActivityStatusEnum.OFF.name());
         baseMapper.updateById(entity);
         return Result.ok("淇敼鎴愬姛");
     }
@@ -171,4 +172,9 @@
                 .collect(Collectors.toList());
         return Result.ok().data(vos);
     }
+
+    @Override
+    public PrizeDetailVO prizeInfo(String id) {
+        return prizeActivityMapper.prizeInfo(id);
+    }
 }

--
Gitblit v1.8.0