| | |
| | | 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; |
| | |
| | | //秒杀活动 |
| | | 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); |
| | |
| | | @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") |