From c90a8ac772937f8f084356ea1f04c5dba1d9e5d5 Mon Sep 17 00:00:00 2001 From: luodangjia <luodangjia> Date: 星期五, 24 一月 2025 11:15:33 +0800 Subject: [PATCH] 12.18 --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BannerController.java | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BannerController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BannerController.java index adfa1cf..16ca460 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BannerController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BannerController.java @@ -1,6 +1,7 @@ package com.ruoyi.other.controller; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.account.api.feignClient.AppUserClient; import com.ruoyi.account.api.model.AppUser; @@ -82,12 +83,10 @@ //秒杀活动 if(null != jumpType1 && 4 == jumpType1){ SeckillActivityInfo activityInfo = seckillActivityInfoService.getById(banner.getContent()); - if(null == activityInfo || activityInfo.getDelFlag() == 1){ + if(null == activityInfo || activityInfo.getDelFlag() == 1 || !activityInfo.getVipIds().contains(vipId.toString())){ banner.setJumpType(1); } - if(!activityInfo.getVipIds().contains(vipId.toString())){ - banner.setJumpType(1); - } + } } return R.ok(list); @@ -108,6 +107,12 @@ @ApiOperation(value = "广告管理-banner管理-修改", tags = {"管理后台"}) public R edit(@RequestBody Banner banner){ bannerService.updateById(banner); + if (banner.getContentType()==2){ + LambdaUpdateWrapper<Banner> bannerLambdaUpdateWrapper = new LambdaUpdateWrapper<>(); + bannerLambdaUpdateWrapper.set(Banner::getJumpType,null); + bannerLambdaUpdateWrapper.eq(Banner::getId,banner.getId()); + bannerService.update(bannerLambdaUpdateWrapper); + } return R.ok(); } @GetMapping("/detail") -- Gitblit v1.7.1