diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/BannerController.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/BannerController.java index 0bf2b2c33..8b6dae9cf 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/BannerController.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/BannerController.java @@ -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 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 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 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 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> getBannerPage(@Valid BannerPageReqVO pageVO) { PageResult pageResult = bannerService.getBannerPage(pageVO); return success(BannerConvert.INSTANCE.convertPage(pageResult)); diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerBaseVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerBaseVO.java index f840254cc..0818257ef 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerBaseVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerBaseVO.java @@ -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)