From bf6989e1f9cc614cf0439f048280cbcdb78d4009 Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期五, 29 八月 2025 02:12:03 +0800
Subject: [PATCH] 提交本地代码

---
 framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeActivityServiceImpl.java |   25 ++++++++++++++++++++-----
 1 files changed, 20 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 9ca5f23..4351b3d 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
@@ -17,8 +17,6 @@
 import cn.lili.modules.lmk.domain.form.PrizeActivityForm;
 import cn.lili.modules.lmk.domain.vo.PrizeActivityVO;
 import cn.lili.modules.lmk.domain.query.PrizeActivityQuery;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
 import org.springframework.stereotype.Service;
 import lombok.RequiredArgsConstructor;
 import cn.lili.utils.PageUtil;
@@ -46,6 +44,21 @@
 
     private final COSUtil cOSUtil;
 
+    @Override
+    public Result getONPrizeActivity(){
+        PrizeActivity prizeActivity = new LambdaQueryChainWrapper<>(baseMapper)
+                .eq(PrizeActivity::getDeleteFlag,Boolean.FALSE)
+                .eq(PrizeActivity::getEnableStatus,PrizeActivityStatusEnum.ON.name())
+                .one();
+        PrizeActivityVO prizeActivityVO = new PrizeActivityVO();
+        if (prizeActivity != null){
+            PrizeActivityVO vo = PrizeActivityVO.getVoByEntity(prizeActivity, prizeActivityVO);
+            if (StringUtils.isNotBlank(vo.getActivityCover())){
+                vo.setActivityCoverUrl(cOSUtil.getPreviewUrl(vo.getActivityCover()));
+            }
+        }
+        return Result.ok().data(prizeActivityVO);
+    }
 
     @Override
     public Result getPopup() {
@@ -55,9 +68,11 @@
                 .eq(PrizeActivity::getPopup,Boolean.TRUE)
                 .one();
         PrizeActivityVO prizeActivityVO = new PrizeActivityVO();
-        PrizeActivityVO vo = PrizeActivityVO.getVoByEntity(prizeActivity, prizeActivityVO);
-        if (StringUtils.isNotBlank(vo.getActivityCover())){
-            vo.setActivityCoverUrl(cOSUtil.getPreviewUrl(vo.getActivityCover()));
+        if (prizeActivity != null){
+            PrizeActivityVO vo = PrizeActivityVO.getVoByEntity(prizeActivity, prizeActivityVO);
+            if (StringUtils.isNotBlank(vo.getActivityCover())){
+                vo.setActivityCoverUrl(cOSUtil.getPreviewUrl(vo.getActivityCover()));
+            }
         }
         return Result.ok().data(prizeActivityVO);
     }

--
Gitblit v1.8.0