From 1f09f6daaf73bc83cceb4ae22b862b7b365635cf Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期四, 03 四月 2025 19:59:17 +0800 Subject: [PATCH] 修改反馈文档bug --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BannerController.java | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 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..bb11d0c 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; @@ -74,20 +75,17 @@ Goods goods = goodsService.getById(banner.getContent()); if(null == goods || goods.getDelFlag() == 1){ banner.setJumpType(1); - } - if(!goods.getCommodityAuthority().contains("-1") && !goods.getCommodityAuthority().contains(vipId.toString())){ + } else if(!goods.getCommodityAuthority().contains("-1") && !goods.getCommodityAuthority().contains(vipId.toString())){ banner.setJumpType(1); } } //秒杀活动 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 +106,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