mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-04 20:28:44 +08:00 
			
		
		
		
	Banner: market ==> promotion
This commit is contained in:
		@@ -23,7 +23,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
 | 
			
		||||
 | 
			
		||||
@Tag(name = "管理后台 - Banner 管理")
 | 
			
		||||
@RestController
 | 
			
		||||
@RequestMapping("/market/banner")
 | 
			
		||||
@RequestMapping("/promotion/banner")
 | 
			
		||||
@Validated
 | 
			
		||||
public class BannerController {
 | 
			
		||||
 | 
			
		||||
@@ -32,14 +32,14 @@ public class BannerController {
 | 
			
		||||
 | 
			
		||||
    @PostMapping("/create")
 | 
			
		||||
    @Operation(summary = "创建 Banner")
 | 
			
		||||
    @PreAuthorize("@ss.hasPermission('market:banner:create')")
 | 
			
		||||
    @PreAuthorize("@ss.hasPermission('promotion:banner:create')")
 | 
			
		||||
    public CommonResult<Long> createBanner(@Valid @RequestBody BannerCreateReqVO createReqVO) {
 | 
			
		||||
        return success(bannerService.createBanner(createReqVO));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @PutMapping("/update")
 | 
			
		||||
    @Operation(summary = "更新 Banner")
 | 
			
		||||
    @PreAuthorize("@ss.hasPermission('market:banner:update')")
 | 
			
		||||
    @PreAuthorize("@ss.hasPermission('promotion:banner:update')")
 | 
			
		||||
    public CommonResult<Boolean> updateBanner(@Valid @RequestBody BannerUpdateReqVO updateReqVO) {
 | 
			
		||||
        bannerService.updateBanner(updateReqVO);
 | 
			
		||||
        return success(true);
 | 
			
		||||
@@ -48,7 +48,7 @@ public class BannerController {
 | 
			
		||||
    @DeleteMapping("/delete")
 | 
			
		||||
    @Operation(summary = "删除 Banner")
 | 
			
		||||
    @Parameter(name = "id", description = "编号", required = true)
 | 
			
		||||
    @PreAuthorize("@ss.hasPermission('market:banner:delete')")
 | 
			
		||||
    @PreAuthorize("@ss.hasPermission('promotion:banner:delete')")
 | 
			
		||||
    public CommonResult<Boolean> deleteBanner(@RequestParam("id") Long id) {
 | 
			
		||||
        bannerService.deleteBanner(id);
 | 
			
		||||
        return success(true);
 | 
			
		||||
@@ -57,7 +57,7 @@ public class BannerController {
 | 
			
		||||
    @GetMapping("/get")
 | 
			
		||||
    @Operation(summary = "获得 Banner")
 | 
			
		||||
    @Parameter(name = "id", description = "编号", required = true, example = "1024")
 | 
			
		||||
    @PreAuthorize("@ss.hasPermission('market:banner:query')")
 | 
			
		||||
    @PreAuthorize("@ss.hasPermission('promotion:banner:query')")
 | 
			
		||||
    public CommonResult<BannerRespVO> getBanner(@RequestParam("id") Long id) {
 | 
			
		||||
        BannerDO banner = bannerService.getBanner(id);
 | 
			
		||||
        return success(BannerConvert.INSTANCE.convert(banner));
 | 
			
		||||
@@ -65,7 +65,7 @@ public class BannerController {
 | 
			
		||||
 | 
			
		||||
    @GetMapping("/page")
 | 
			
		||||
    @Operation(summary = "获得 Banner 分页")
 | 
			
		||||
    @PreAuthorize("@ss.hasPermission('market:banner:query')")
 | 
			
		||||
    @PreAuthorize("@ss.hasPermission('promotion:banner:query')")
 | 
			
		||||
    public CommonResult<PageResult<BannerRespVO>> getBannerPage(@Valid BannerPageReqVO pageVO) {
 | 
			
		||||
        PageResult<BannerDO> pageResult = bannerService.getBannerPage(pageVO);
 | 
			
		||||
        return success(BannerConvert.INSTANCE.convertPage(pageResult));
 | 
			
		||||
 
 | 
			
		||||
@@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.promotion.controller.admin.banner.vo;
 | 
			
		||||
 | 
			
		||||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
 | 
			
		||||
import cn.iocoder.yudao.framework.common.validation.InEnum;
 | 
			
		||||
import cn.iocoder.yudao.module.promotion.enums.banner.BannerPositionEnum;
 | 
			
		||||
import io.swagger.v3.oas.annotations.media.Schema;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
@@ -29,6 +30,7 @@ public class BannerBaseVO {
 | 
			
		||||
 | 
			
		||||
    @Schema(description = "position", requiredMode = Schema.RequiredMode.REQUIRED)
 | 
			
		||||
    @NotNull(message = "position 不能为空")
 | 
			
		||||
    @InEnum(BannerPositionEnum.class)
 | 
			
		||||
    private Integer position;
 | 
			
		||||
 | 
			
		||||
    @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user