无关风月
2024-09-29 965af8a1b7b7470a1d3659fb9efed1da21713a1c
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TAdvertisingController.java
@@ -7,6 +7,7 @@
import com.ruoyi.common.core.web.page.PageInfo;
import com.ruoyi.common.log.annotation.Log;
import com.ruoyi.common.log.enums.BusinessType;
import com.ruoyi.common.log.enums.OperatorType;
import com.ruoyi.other.api.domain.TAdvertising;
import com.ruoyi.other.api.domain.TVip;
import com.ruoyi.other.api.dto.AdvertisingDTO;
@@ -16,10 +17,20 @@
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.SecureRandom;
import java.text.SimpleDateFormat;
import java.util.*;
/**
 * <p>
@@ -37,18 +48,21 @@
    private TAdvertisingService advertisingService;
    @PostMapping("/saveAdvertising")
    @ApiOperation(tags = {"管理后台-广告管理"},value = "广告添加")
    @Log(title = "【广告管理】添加广告", businessType = BusinessType.INSERT,operatorType = OperatorType.MANAGE)
    public AjaxResult saveAdvertising(@RequestBody TAdvertising dto) {
        advertisingService.save(dto);
        return AjaxResult.success();
    }
    @GetMapping("/delete")
    @ApiOperation(tags = {"管理后台-广告管理"},value = "广告删除")
    @Log(title = "【广告管理】删除广告", businessType = BusinessType.DELETE,operatorType = OperatorType.MANAGE)
    public AjaxResult delete(String ids) {
        advertisingService.removeBatchByIds(Arrays.asList(ids.split(",")));
        return AjaxResult.success();
    }
    @PostMapping("/updateVip")
    @ApiOperation(tags = {"管理后台-广告管理"},value = "广告修改")
    @Log(title = "【广告管理】修改广告", businessType = BusinessType.UPDATE,operatorType = OperatorType.MANAGE)
    public AjaxResult updateVip(@RequestBody TAdvertising dto) {
        advertisingService.updateById(dto);
        return AjaxResult.success();