package com.ruoyi.web.controller.api; import com.baomidou.mybatisplus.core.metadata.IPage; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.system.dto.asset.AssetAdMaterialPriceDTO; import com.ruoyi.system.query.AssetAdMaterialPriceQuery; import com.ruoyi.system.service.AssetAdMaterialPriceService; import com.ruoyi.system.utils.FastExcelUtil; import com.ruoyi.system.vo.asset.AssetAdMaterialPriceVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.context.annotation.Lazy; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; import java.io.IOException; import java.util.Collections; import java.util.List; /** *
* 广告物料单价参考表 前端控制器 *
* * @author WuGuanFengYue * @since 2025-09-15 */ @Api(tags = {"广告物料单价相关接口"}) @Slf4j @Validated @RestController @RequestMapping("/asset-ad-material-price") @RequiredArgsConstructor(onConstructor_ = {@Lazy}) public class AssetAdMaterialPriceController { private final AssetAdMaterialPriceService assetAdMaterialPriceService; @ApiOperation(value = "新增广告物料单价") @Log(title = "新增广告物料单价", businessType = BusinessType.INSERT) @PostMapping("/add") public R> addAssetAdMaterialPrice(@Valid @RequestBody AssetAdMaterialPriceDTO dto) { assetAdMaterialPriceService.addAssetAdMaterialPrice(dto); return R.ok(); } @ApiOperation(value = "编辑广告物料单价") @Log(title = "编辑广告物料单价", businessType = BusinessType.UPDATE) @PostMapping("/edit") public R> editAssetAdMaterialPrice(@Valid @RequestBody AssetAdMaterialPriceDTO dto) { assetAdMaterialPriceService.editAssetAdMaterialPrice(dto); return R.ok(); } @ApiOperation("获取分页列表") @PostMapping("/page") public R