| | |
| | | package com.ruoyi.other.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.core.enums.status.AdvertisingStatusEnum; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | |
| | | @ApiOperation(tags = {"管理后台-广告管理"},value = "广告修改") |
| | | @Log(title = "【广告管理】修改广告", businessType = BusinessType.UPDATE,operatorType = OperatorType.MANAGE) |
| | | public AjaxResult updateVip(@RequestBody TAdvertising dto) { |
| | | if (dto.getJumpType() == 2){ |
| | | // 清空跳转地址 |
| | | advertisingService.updateById(dto); |
| | | LambdaUpdateWrapper<TAdvertising> tAdvertisingLambdaUpdateWrapper = new LambdaUpdateWrapper<>(); |
| | | tAdvertisingLambdaUpdateWrapper.eq(TAdvertising::getId,dto.getId()) |
| | | .set(TAdvertising::getJumpUrl,null); |
| | | advertisingService.update(tAdvertisingLambdaUpdateWrapper); |
| | | }else{ |
| | | advertisingService.updateById(dto); |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | | @GetMapping("/getInfo") |