From 7ec17b93b34a060233e5f193fa47fa243f7efafc Mon Sep 17 00:00:00 2001 From: zxl <763096477@qq.com> Date: 星期四, 28 八月 2025 01:07:52 +0800 Subject: [PATCH] 导出以及页面 --- framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeActivityServiceImpl.java | 31 ++++++++++++++++++++++++++----- 1 files changed, 26 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 2bb6dff..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 @@ -2,6 +2,7 @@ import cn.lili.common.utils.StringUtils; 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; @@ -16,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; @@ -45,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() { @@ -54,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); } @@ -229,4 +245,9 @@ .collect(Collectors.toList()); return Result.ok().data(vos); } + + @Override + public PrizeDetailVO prizeInfo(String id) { + return prizeActivityMapper.prizeInfo(id); + } } -- Gitblit v1.8.0