Pu Zhibing
2025-03-06 1b81b84edaeea9b200c622e4a34c49b4b1aaac92
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TAdvertisingController.java
@@ -9,6 +9,8 @@
import com.ruoyi.common.log.annotation.Log;
import com.ruoyi.common.log.enums.BusinessType;
import com.ruoyi.common.log.enums.OperatorType;
import com.ruoyi.common.security.annotation.Logical;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import com.ruoyi.other.api.domain.TAdvertising;
import com.ruoyi.other.api.domain.TVip;
import com.ruoyi.other.api.dto.AdvertisingDTO;
@@ -50,6 +52,9 @@
    @Autowired
    private TAdvertisingService advertisingService;
    @RequiresPermissions(value = {"/advertisement/add"}, logical = Logical.OR)
    @PostMapping("/saveAdvertising")
    @ApiOperation(tags = {"管理后台-广告管理"},value = "广告添加")
    @Log(title = "【广告管理】添加广告", businessType = BusinessType.INSERT,operatorType = OperatorType.MANAGE)
@@ -57,6 +62,9 @@
        advertisingService.save(dto);
        return AjaxResult.success();
    }
    @RequiresPermissions(value = {"/advertisement/del"}, logical = Logical.OR)
    @GetMapping("/delete")
    @ApiOperation(tags = {"管理后台-广告管理"},value = "广告删除")
    @Log(title = "【广告管理】删除广告", businessType = BusinessType.DELETE,operatorType = OperatorType.MANAGE)
@@ -64,11 +72,14 @@
        advertisingService.removeBatchByIds(Arrays.asList(ids.split(",")));
        return AjaxResult.success();
    }
    @RequiresPermissions(value = {"/advertisement/update"}, logical = Logical.OR)
    @PostMapping("/updateVip")
    @ApiOperation(tags = {"管理后台-广告管理"},value = "广告修改")
    @Log(title = "【广告管理】修改广告", businessType = BusinessType.UPDATE,operatorType = OperatorType.MANAGE)
    public AjaxResult updateVip(@RequestBody TAdvertising dto) {
        if (dto.getJumpType() == 2){
        if (dto.getJumpType()!=null && dto.getJumpType() == 2){
            // 清空跳转地址
            advertisingService.updateById(dto);
            LambdaUpdateWrapper<TAdvertising> tAdvertisingLambdaUpdateWrapper = new LambdaUpdateWrapper<>();
@@ -80,14 +91,19 @@
        }
        return AjaxResult.success();
    }
    @RequiresPermissions(value = {"/advertisement/select"}, logical = Logical.OR)
    @GetMapping("/getInfo")
    @ApiOperation(tags = {"管理后台-广告管理"},value = "广告查看详情")
    public AjaxResult<TAdvertising> getInfo(Integer id) {
        return AjaxResult.ok(advertisingService.getById(id));
    }
    @RequiresPermissions(value = {"/advertisement"}, logical = Logical.OR)
    @ApiOperation(tags = {"管理后台-广告管理"},value = "广告列表分页查询")
    @PostMapping(value = "/pageList")
    public AjaxResult<PageInfo<TAdvertising>> pageList(@RequestBody AdvertisingDTO dto) {