mirror of
https://gitee.com/dromara/dax-pay
synced 2026-08-10 14:56:06 +08:00
refactor(perm): 权限码体系重构, @PermCode 对齐菜单编码并改用下划线粗粒度命名
- menuCode 对齐 iam_perm_menu: 去除 payment:/starter: 旧前缀, 修正商户与通道商户撞码 - code 改用下划线粗粒度: 增删改统一为 manage, 特殊操作(publish/kickout/reset_password 等)独立保留 - 日志类 starter:log:* 改为 system:log:*; 字典/公告/安全配置等去除重复段 - 同一 menuCode 跨 Controller 的 nameCn/nameEn 统一, 避免权限码扫描同步冲突 - 新增 update-perm-codes.sql: 8 条菜单 menu_code 改名 + 清空 iam_perm_code 供扫描重建
This commit is contained in:
38
_config/sql/update-perm-codes.sql
Normal file
38
_config/sql/update-perm-codes.sql
Normal file
@@ -0,0 +1,38 @@
|
||||
-- ============================================================
|
||||
-- 权限码体系重构迁移(下划线命名 + 粗粒度 + menuCode 对齐菜单)
|
||||
-- ============================================================
|
||||
-- 执行时机:部署本批代码改动后、重启服务前执行
|
||||
-- 执行后: 重启服务,触发权限码扫描同步(PermCodeScanService)按新 @PermCode 重建 iam_perm_code
|
||||
-- 前提: iam_role_code 当前无实际角色-权限码分配数据,可直接重建
|
||||
|
||||
-- ---------- 1. 菜单 menu_code 改名(仅改编码,不增删菜单记录) ----------
|
||||
|
||||
-- 安全配置:system:securityConfig → system:security_config
|
||||
UPDATE iam_perm_menu SET menu_code = 'system:security_config', last_modified_time = now() WHERE id = 30401;
|
||||
|
||||
-- 平台配置:system:platformConfig → system:platform_config
|
||||
UPDATE iam_perm_menu SET menu_code = 'system:platform_config', last_modified_time = now() WHERE id = 30402;
|
||||
|
||||
-- OSS 配置:system:ossConfig → system:oss_config(同时修正原先与平台配置的撞码)
|
||||
UPDATE iam_perm_menu SET menu_code = 'system:oss_config', last_modified_time = now() WHERE id = 30404;
|
||||
|
||||
-- 支付通道:payment:platform:payChannel → payment:platform:pay_channel
|
||||
UPDATE iam_perm_menu SET menu_code = 'payment:platform:pay_channel', last_modified_time = now() WHERE id = 40103;
|
||||
|
||||
-- 支付产品配置:payment:config:productConfig → payment:config:product_config
|
||||
UPDATE iam_perm_menu SET menu_code = 'payment:config:product_config', last_modified_time = now() WHERE id = 40105;
|
||||
|
||||
-- 支付渠道管理页:payment:platform:provider:manage → payment:platform:provider_manage
|
||||
-- 该页复用 payment:platform:provider 权限码(来自 40102),改名为下划线连接以避免与权限码末段 manage 混淆
|
||||
UPDATE iam_perm_menu SET menu_code = 'payment:platform:provider_manage', last_modified_time = now() WHERE id = 4040116;
|
||||
|
||||
-- 设备厂商配置:device:vendorConfig → device:vendor_config
|
||||
UPDATE iam_perm_menu SET menu_code = 'device:vendor_config', last_modified_time = now() WHERE id = 90201;
|
||||
|
||||
-- 支付产品详情(子页面):payment:config:productDetail → payment:config:product_detail
|
||||
UPDATE iam_perm_menu SET menu_code = 'payment:config:product_detail', last_modified_time = now() WHERE id = 40501;
|
||||
|
||||
-- ---------- 2. 清空权限码主数据(重启后由扫描同步按新代码重建) ----------
|
||||
-- iam_role_code 无分配数据;先清关联表避免外键冲突,再清权限码主数据
|
||||
DELETE FROM iam_role_code;
|
||||
DELETE FROM iam_perm_code;
|
||||
@@ -28,7 +28,7 @@ import java.util.List;
|
||||
///
|
||||
/// 提供直连商户应用及其密钥配置、授权认证配置的 REST API,支持按商户号和通道商户号查询列表。
|
||||
///
|
||||
@PermCode(menuCode = "payment:alipay:mch-app")
|
||||
@PermCode(menuCode = "channel:alipay:app")
|
||||
@Validated
|
||||
@Tag(name = "支付宝直连商户应用管理")
|
||||
@RestController
|
||||
@@ -78,7 +78,7 @@ public class AlipayDirectAppController {
|
||||
return Res.ok(alipayDirectAppService.existsAliAppIdByChannel(mchNo, channelMchNo, aliAppId, id));
|
||||
}
|
||||
|
||||
@PermCode(code = "add", nameCn = "通道商户新增", nameEn = "Channel Merchant Add")
|
||||
@PermCode(code = "manage", nameCn = "通道商户管理", nameEn = "Channel Merchant Manage")
|
||||
@Operation(summary = "新增直连商户应用")
|
||||
@PostMapping("/add")
|
||||
public Result<Void> add(@RequestBody @Validated(ValidationGroup.add.class) AlipayDirectAppParam param) {
|
||||
@@ -87,7 +87,7 @@ public class AlipayDirectAppController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "通道商户编辑", nameEn = "Channel Merchant Edit")
|
||||
@PermCode(code = "manage", nameCn = "通道商户管理", nameEn = "Channel Merchant Manage")
|
||||
@Operation(summary = "修改直连商户应用")
|
||||
@PostMapping("/update")
|
||||
public Result<Void> update(@RequestBody @Validated(ValidationGroup.edit.class) AlipayDirectAppParam param) {
|
||||
@@ -96,7 +96,7 @@ public class AlipayDirectAppController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "通道商户编辑", nameEn = "Channel Merchant Edit")
|
||||
@PermCode(code = "manage", nameCn = "通道商户管理", nameEn = "Channel Merchant Manage")
|
||||
@Operation(summary = "删除直连商户应用")
|
||||
@PostMapping("/delete")
|
||||
public Result<Void> delete(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
@@ -112,7 +112,7 @@ public class AlipayDirectAppController {
|
||||
return Res.ok(alipayDirectAppKeyConfigService.findByAlipayDirectAppId(alipayDirectAppId).toResult());
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "通道商户编辑", nameEn = "Channel Merchant Edit")
|
||||
@PermCode(code = "manage", nameCn = "通道商户管理", nameEn = "Channel Merchant Manage")
|
||||
@Operation(summary = "保存应用密钥配置")
|
||||
@PostMapping("/save-key-config")
|
||||
public Result<Void> saveKeyConfig(@RequestBody @Validated AlipayDirectAppKeyConfigParam param) {
|
||||
@@ -128,7 +128,7 @@ public class AlipayDirectAppController {
|
||||
return Res.ok(alipayDirectAppAuthConfigService.findByAlipayDirectAppId(alipayDirectAppId).toResult());
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "通道商户编辑", nameEn = "Channel Merchant Edit")
|
||||
@PermCode(code = "manage", nameCn = "通道商户管理", nameEn = "Channel Merchant Manage")
|
||||
@Operation(summary = "保存应用授权认证配置")
|
||||
@PostMapping("/save-auth-config")
|
||||
public Result<Void> saveAuthConfig(@RequestBody @Validated AlipayDirectAppAuthConfigParam param) {
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/// # 支付宝直连通道商户管理
|
||||
///
|
||||
@PermCode(menuCode = "payment:merchant:channelMerchant")
|
||||
@PermCode(menuCode = "channel:merchant")
|
||||
@Validated
|
||||
@Tag(name = "支付宝直连通道商户管理")
|
||||
@RestController
|
||||
@@ -29,7 +29,7 @@ public class AlipayDirectChannelMerchantController {
|
||||
|
||||
private final AlipayDirectChannelMerchantService alipayDirectChannelMerchantService;
|
||||
|
||||
@PermCode(code = "view", nameCn = "商户通道商户查看", nameEn = "Merchant Channel Merchant View")
|
||||
@PermCode(code = "view", nameCn = "通道商户查看", nameEn = "Channel Merchant View")
|
||||
@Operation(summary = "根据通道商户号查询支付宝直连通道商户配置")
|
||||
@GetMapping("/find-by-channel-mch-no")
|
||||
public Result<AlipayDirectChannelMerchantResult> findByChannelMchNo(
|
||||
@@ -37,7 +37,7 @@ public class AlipayDirectChannelMerchantController {
|
||||
return Res.ok(alipayDirectChannelMerchantService.findByChannelMchNo(channelMchNo));
|
||||
}
|
||||
|
||||
@PermCode(code = "add", nameCn = "商户通道商户新增", nameEn = "Merchant Channel Merchant Add")
|
||||
@PermCode(code = "manage", nameCn = "通道商户管理", nameEn = "Channel Merchant Manage")
|
||||
@Operation(summary = "创建支付宝直连通道商户")
|
||||
@PostMapping("/create")
|
||||
public Result<Void> create(@RequestBody @Validated AlipayDirectChannelMerchantCreateParam param) {
|
||||
|
||||
@@ -72,7 +72,7 @@ public class AlipayIsvAppController {
|
||||
return Res.ok(alipayIsvAppService.existsAliAppId(aliAppId, id));
|
||||
}
|
||||
|
||||
@PermCode(code = "add", nameCn = "支付宝服务商新增", nameEn = "Alipay ISV Add")
|
||||
@PermCode(code = "manage", nameCn = "支付宝服务商管理", nameEn = "Alipay ISV Manage")
|
||||
@Operation(summary = "新增服务商应用")
|
||||
@PostMapping("/add")
|
||||
public Result<Void> add(@RequestBody @Validated(ValidationGroup.add.class) AlipayIsvAppParam param) {
|
||||
@@ -81,7 +81,7 @@ public class AlipayIsvAppController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "支付宝服务商编辑", nameEn = "Alipay ISV Edit")
|
||||
@PermCode(code = "manage", nameCn = "支付宝服务商管理", nameEn = "Alipay ISV Manage")
|
||||
@Operation(summary = "修改服务商应用")
|
||||
@PostMapping("/update")
|
||||
public Result<Void> update(@RequestBody @Validated(ValidationGroup.edit.class) AlipayIsvAppParam param) {
|
||||
@@ -90,7 +90,7 @@ public class AlipayIsvAppController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "支付宝服务商编辑", nameEn = "Alipay ISV Edit")
|
||||
@PermCode(code = "manage", nameCn = "支付宝服务商管理", nameEn = "Alipay ISV Manage")
|
||||
@Operation(summary = "删除服务商应用")
|
||||
@PostMapping("/delete")
|
||||
public Result<Void> delete(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
@@ -106,7 +106,7 @@ public class AlipayIsvAppController {
|
||||
return Res.ok(alipayIsvAppKeyConfigService.findByAlipayIsvAppId(alipayIsvAppId).toResult());
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "支付宝服务商编辑", nameEn = "Alipay ISV Edit")
|
||||
@PermCode(code = "manage", nameCn = "支付宝服务商管理", nameEn = "Alipay ISV Manage")
|
||||
@Operation(summary = "保存应用密钥配置")
|
||||
@PostMapping("/save-key-config")
|
||||
public Result<Void> saveKeyConfig(@RequestBody @Validated AlipayIsvAppKeyConfigParam param) {
|
||||
@@ -122,7 +122,7 @@ public class AlipayIsvAppController {
|
||||
return Res.ok(alipayIsvAppAuthConfigService.findByAlipayIsvAppId(alipayIsvAppId).toResult());
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "支付宝服务商编辑", nameEn = "Alipay ISV Edit")
|
||||
@PermCode(code = "manage", nameCn = "支付宝服务商管理", nameEn = "Alipay ISV Manage")
|
||||
@Operation(summary = "保存应用授权认证配置")
|
||||
@PostMapping("/save-auth-config")
|
||||
public Result<Void> saveAuthConfig(@RequestBody @Validated AlipayIsvAppAuthConfigParam param) {
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/// # 支付宝服务商通道商户管理
|
||||
///
|
||||
@PermCode(menuCode = "payment:merchant:channelMerchant")
|
||||
@PermCode(menuCode = "channel:merchant")
|
||||
@Validated
|
||||
@Tag(name = "支付宝服务商通道商户管理")
|
||||
@RestController
|
||||
@@ -29,7 +29,7 @@ public class AlipayIsvChannelMerchantController {
|
||||
|
||||
private final AlipayIsvChannelMerchantService alipayIsvChannelMerchantService;
|
||||
|
||||
@PermCode(code = "view", nameCn = "商户通道商户查看", nameEn = "Merchant Channel Merchant View")
|
||||
@PermCode(code = "view", nameCn = "通道商户查看", nameEn = "Channel Merchant View")
|
||||
@Operation(summary = "根据通道商户号查询支付宝服务商通道商户配置")
|
||||
@GetMapping("/find-by-channel-mch-no")
|
||||
public Result<AlipayIsvChannelMerchantResult> findByChannelMchNo(
|
||||
@@ -37,7 +37,7 @@ public class AlipayIsvChannelMerchantController {
|
||||
return Res.ok(alipayIsvChannelMerchantService.findByChannelMchNo(channelMchNo));
|
||||
}
|
||||
|
||||
@PermCode(code = "add", nameCn = "商户通道商户新增", nameEn = "Merchant Channel Merchant Add")
|
||||
@PermCode(code = "manage", nameCn = "通道商户管理", nameEn = "Channel Merchant Manage")
|
||||
@Operation(summary = "创建支付宝服务商通道商户")
|
||||
@PostMapping("/create")
|
||||
public Result<Void> create(@RequestBody @Validated AlipayIsvChannelMerchantCreateParam param) {
|
||||
|
||||
@@ -29,7 +29,7 @@ import java.util.List;
|
||||
///
|
||||
/// 提供直连商户应用及其授权认证配置的 REST API,支持按商户号和通道商户号查询列表。
|
||||
///
|
||||
@PermCode(menuCode = "payment:douyin:mch-app")
|
||||
@PermCode(menuCode = "channel:douyin:app")
|
||||
@Validated
|
||||
@Tag(name = "抖音直连商户应用管理")
|
||||
@RestController
|
||||
@@ -78,7 +78,7 @@ public class DouyinDirectAppController {
|
||||
return Res.ok(douyinDirectAppService.existsDouyinAppIdByChannel(mchNo, channelMchNo, douyinAppId, id));
|
||||
}
|
||||
|
||||
@PermCode(code = "add", nameCn = "通道商户新增", nameEn = "Channel Merchant Add")
|
||||
@PermCode(code = "manage", nameCn = "通道商户管理", nameEn = "Channel Merchant Manage")
|
||||
@Operation(summary = "新增直连商户应用")
|
||||
@PostMapping("/add")
|
||||
public Result<Void> add(@RequestBody @Validated(ValidationGroup.add.class) DouyinDirectAppParam param) {
|
||||
@@ -87,7 +87,7 @@ public class DouyinDirectAppController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "通道商户编辑", nameEn = "Channel Merchant Edit")
|
||||
@PermCode(code = "manage", nameCn = "通道商户管理", nameEn = "Channel Merchant Manage")
|
||||
@Operation(summary = "修改直连商户应用")
|
||||
@PostMapping("/update")
|
||||
public Result<Void> update(@RequestBody @Validated(ValidationGroup.edit.class) DouyinDirectAppParam param) {
|
||||
@@ -96,7 +96,7 @@ public class DouyinDirectAppController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "通道商户编辑", nameEn = "Channel Merchant Edit")
|
||||
@PermCode(code = "manage", nameCn = "通道商户管理", nameEn = "Channel Merchant Manage")
|
||||
@Operation(summary = "删除直连商户应用")
|
||||
@PostMapping("/delete")
|
||||
public Result<Void> delete(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
@@ -113,7 +113,7 @@ public class DouyinDirectAppController {
|
||||
return Res.ok(config.toResult());
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "通道商户编辑", nameEn = "Channel Merchant Edit")
|
||||
@PermCode(code = "manage", nameCn = "通道商户管理", nameEn = "Channel Merchant Manage")
|
||||
@Operation(summary = "保存应用授权认证配置")
|
||||
@PostMapping("/save-auth-config")
|
||||
public Result<Void> saveAuthConfig(@RequestBody @Validated DouyinDirectAppAuthConfigParam param) {
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/// # 抖音直连通道商户管理
|
||||
///
|
||||
@PermCode(menuCode = "payment:merchant:channelMerchant")
|
||||
@PermCode(menuCode = "channel:merchant")
|
||||
@Validated
|
||||
@Tag(name = "抖音直连通道商户管理")
|
||||
@RestController
|
||||
@@ -33,7 +33,7 @@ public class DouyinDirectChannelMerchantController {
|
||||
private final DouyinDirectChannelMerchantService douyinDirectChannelMerchantService;
|
||||
private final DouyinDirectKeyConfigService douyinDirectKeyConfigService;
|
||||
|
||||
@PermCode(code = "view", nameCn = "商户通道商户查看", nameEn = "Merchant Channel Merchant View")
|
||||
@PermCode(code = "view", nameCn = "通道商户查看", nameEn = "Channel Merchant View")
|
||||
@Operation(summary = "根据通道商户号查询抖音直连通道商户配置")
|
||||
@GetMapping("/find-by-channel-mch-no")
|
||||
public Result<DouyinDirectChannelMerchantResult> findByChannelMchNo(
|
||||
@@ -41,7 +41,7 @@ public class DouyinDirectChannelMerchantController {
|
||||
return Res.ok(douyinDirectChannelMerchantService.findByChannelMchNo(channelMchNo));
|
||||
}
|
||||
|
||||
@PermCode(code = "add", nameCn = "商户通道商户新增", nameEn = "Merchant Channel Merchant Add")
|
||||
@PermCode(code = "manage", nameCn = "通道商户管理", nameEn = "Channel Merchant Manage")
|
||||
@Operation(summary = "创建抖音直连通道商户")
|
||||
@PostMapping("/create")
|
||||
public Result<Void> create(@RequestBody @Validated DouyinDirectChannelMerchantCreateParam param) {
|
||||
@@ -49,7 +49,7 @@ public class DouyinDirectChannelMerchantController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "view", nameCn = "商户通道商户查看", nameEn = "Merchant Channel Merchant View")
|
||||
@PermCode(code = "view", nameCn = "通道商户查看", nameEn = "Channel Merchant View")
|
||||
@Operation(summary = "根据通道商户号查询密钥配置")
|
||||
@GetMapping("/find-key-config")
|
||||
public Result<DouyinDirectKeyConfigResult> findKeyConfig(
|
||||
@@ -61,7 +61,7 @@ public class DouyinDirectChannelMerchantController {
|
||||
return Res.ok(result);
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "商户通道商户编辑", nameEn = "Merchant Channel Merchant Edit")
|
||||
@PermCode(code = "manage", nameCn = "通道商户管理", nameEn = "Channel Merchant Manage")
|
||||
@Operation(summary = "保存密钥配置")
|
||||
@PostMapping("/save-key-config")
|
||||
public Result<Void> saveKeyConfig(@RequestBody @Validated DouyinDirectKeyConfigParam param) {
|
||||
|
||||
@@ -29,7 +29,7 @@ import java.util.List;
|
||||
///
|
||||
/// 提供直连商户应用及其密钥配置、授权认证配置的 REST API,支持按商户号和通道商户号查询列表。
|
||||
///
|
||||
@PermCode(menuCode = "payment:wechat:mch-app")
|
||||
@PermCode(menuCode = "channel:wechat:app")
|
||||
@Validated
|
||||
@Tag(name = "微信直连商户应用管理")
|
||||
@RestController
|
||||
@@ -78,7 +78,7 @@ public class WechatDirectAppController {
|
||||
return Res.ok(wechatDirectAppService.existsWxAppIdByChannel(mchNo, channelMchNo, wxAppId, id));
|
||||
}
|
||||
|
||||
@PermCode(code = "add", nameCn = "通道商户新增", nameEn = "Channel Merchant Add")
|
||||
@PermCode(code = "manage", nameCn = "通道商户管理", nameEn = "Channel Merchant Manage")
|
||||
@Operation(summary = "新增直连商户应用")
|
||||
@PostMapping("/add")
|
||||
public Result<Void> add(@RequestBody @Validated(ValidationGroup.add.class) WechatDirectAppParam param) {
|
||||
@@ -87,7 +87,7 @@ public class WechatDirectAppController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "通道商户编辑", nameEn = "Channel Merchant Edit")
|
||||
@PermCode(code = "manage", nameCn = "通道商户管理", nameEn = "Channel Merchant Manage")
|
||||
@Operation(summary = "修改直连商户应用")
|
||||
@PostMapping("/update")
|
||||
public Result<Void> update(@RequestBody @Validated(ValidationGroup.edit.class) WechatDirectAppParam param) {
|
||||
@@ -96,7 +96,7 @@ public class WechatDirectAppController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "通道商户编辑", nameEn = "Channel Merchant Edit")
|
||||
@PermCode(code = "manage", nameCn = "通道商户管理", nameEn = "Channel Merchant Manage")
|
||||
@Operation(summary = "删除直连商户应用")
|
||||
@PostMapping("/delete")
|
||||
public Result<Void> delete(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
@@ -113,7 +113,7 @@ public class WechatDirectAppController {
|
||||
return Res.ok(config.toResult());
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "通道商户编辑", nameEn = "Channel Merchant Edit")
|
||||
@PermCode(code = "manage", nameCn = "通道商户管理", nameEn = "Channel Merchant Manage")
|
||||
@Operation(summary = "保存应用授权认证配置")
|
||||
@PostMapping("/save-auth-config")
|
||||
public Result<Void> saveAuthConfig(@RequestBody @Validated WechatDirectAppAuthConfigParam param) {
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/// # 微信直连通道商户管理
|
||||
///
|
||||
@PermCode(menuCode = "payment:merchant:channelMerchant")
|
||||
@PermCode(menuCode = "channel:merchant")
|
||||
@Validated
|
||||
@Tag(name = "微信直连通道商户管理")
|
||||
@RestController
|
||||
@@ -33,7 +33,7 @@ public class WechatDirectChannelMerchantController {
|
||||
private final WechatDirectChannelMerchantService wechatDirectChannelMerchantService;
|
||||
private final WechatDirectKeyConfigService wechatDirectKeyConfigService;
|
||||
|
||||
@PermCode(code = "view", nameCn = "商户通道商户查看", nameEn = "Merchant Channel Merchant View")
|
||||
@PermCode(code = "view", nameCn = "通道商户查看", nameEn = "Channel Merchant View")
|
||||
@Operation(summary = "根据通道商户号查询微信直连通道商户配置")
|
||||
@GetMapping("/find-by-channel-mch-no")
|
||||
public Result<WechatDirectChannelMerchantResult> findByChannelMchNo(
|
||||
@@ -41,7 +41,7 @@ public class WechatDirectChannelMerchantController {
|
||||
return Res.ok(wechatDirectChannelMerchantService.findByChannelMchNo(channelMchNo));
|
||||
}
|
||||
|
||||
@PermCode(code = "add", nameCn = "商户通道商户新增", nameEn = "Merchant Channel Merchant Add")
|
||||
@PermCode(code = "manage", nameCn = "通道商户管理", nameEn = "Channel Merchant Manage")
|
||||
@Operation(summary = "创建微信直连通道商户")
|
||||
@PostMapping("/create")
|
||||
public Result<Void> create(@RequestBody @Validated WechatDirectChannelMerchantCreateParam param) {
|
||||
@@ -49,7 +49,7 @@ public class WechatDirectChannelMerchantController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "view", nameCn = "商户通道商户查看", nameEn = "Merchant Channel Merchant View")
|
||||
@PermCode(code = "view", nameCn = "通道商户查看", nameEn = "Channel Merchant View")
|
||||
@Operation(summary = "根据通道商户号查询密钥配置")
|
||||
@GetMapping("/find-key-config")
|
||||
public Result<WechatDirectKeyConfigResult> findKeyConfig(
|
||||
@@ -57,7 +57,7 @@ public class WechatDirectChannelMerchantController {
|
||||
return Res.ok(wechatDirectKeyConfigService.findByChannelMchNo(channelMchNo).toResult());
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "商户通道商户编辑", nameEn = "Merchant Channel Merchant Edit")
|
||||
@PermCode(code = "manage", nameCn = "通道商户管理", nameEn = "Channel Merchant Manage")
|
||||
@Operation(summary = "保存密钥配置")
|
||||
@PostMapping("/save-key-config")
|
||||
public Result<Void> saveKeyConfig(@RequestBody @Validated WechatDirectKeyConfigParam param) {
|
||||
|
||||
@@ -67,7 +67,7 @@ public class WechatIsvAppController {
|
||||
return Res.ok(wechatIsvAppService.existsWxAppId(wxAppId, id));
|
||||
}
|
||||
|
||||
@PermCode(code = "add", nameCn = "微信服务商新增", nameEn = "WeChat ISV Add")
|
||||
@PermCode(code = "manage", nameCn = "微信服务商管理", nameEn = "WeChat ISV Manage")
|
||||
@Operation(summary = "新增服务商应用")
|
||||
@PostMapping("/add")
|
||||
public Result<Void> add(@RequestBody @Validated(ValidationGroup.add.class) WechatIsvAppParam param) {
|
||||
@@ -76,7 +76,7 @@ public class WechatIsvAppController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "微信服务商编辑", nameEn = "WeChat ISV Edit")
|
||||
@PermCode(code = "manage", nameCn = "微信服务商管理", nameEn = "WeChat ISV Manage")
|
||||
@Operation(summary = "修改服务商应用")
|
||||
@PostMapping("/update")
|
||||
public Result<Void> update(@RequestBody @Validated(ValidationGroup.edit.class) WechatIsvAppParam param) {
|
||||
@@ -85,7 +85,7 @@ public class WechatIsvAppController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "微信服务商编辑", nameEn = "WeChat ISV Edit")
|
||||
@PermCode(code = "manage", nameCn = "微信服务商管理", nameEn = "WeChat ISV Manage")
|
||||
@Operation(summary = "删除服务商应用")
|
||||
@PostMapping("/delete")
|
||||
public Result<Void> delete(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
@@ -102,7 +102,7 @@ public class WechatIsvAppController {
|
||||
return Res.ok(WechatIsvAppAuthConfigConvert.CONVERT.toResult(config));
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "微信服务商编辑", nameEn = "WeChat ISV Edit")
|
||||
@PermCode(code = "manage", nameCn = "微信服务商管理", nameEn = "WeChat ISV Manage")
|
||||
@Operation(summary = "保存应用授权认证配置")
|
||||
@PostMapping("/save-auth-config")
|
||||
public Result<Void> saveAuthConfig(@RequestBody @Validated WechatIsvAppAuthConfigParam param) {
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/// # 微信服务商通道商户管理
|
||||
///
|
||||
@PermCode(menuCode = "payment:merchant:channelMerchant")
|
||||
@PermCode(menuCode = "channel:merchant")
|
||||
@Validated
|
||||
@Tag(name = "微信服务商通道商户管理")
|
||||
@RestController
|
||||
@@ -29,7 +29,7 @@ public class WechatIsvChannelMerchantController {
|
||||
|
||||
private final WechatIsvChannelMerchantService wechatIsvChannelMerchantService;
|
||||
|
||||
@PermCode(code = "view", nameCn = "商户通道商户查看", nameEn = "Merchant Channel Merchant View")
|
||||
@PermCode(code = "view", nameCn = "通道商户查看", nameEn = "Channel Merchant View")
|
||||
@Operation(summary = "根据通道商户号查询微信服务商通道商户配置")
|
||||
@GetMapping("/find-by-channel-mch-no")
|
||||
public Result<WechatIsvChannelMerchantResult> findByChannelMchNo(
|
||||
@@ -37,7 +37,7 @@ public class WechatIsvChannelMerchantController {
|
||||
return Res.ok(wechatIsvChannelMerchantService.findByChannelMchNo(channelMchNo));
|
||||
}
|
||||
|
||||
@PermCode(code = "add", nameCn = "商户通道商户新增", nameEn = "Merchant Channel Merchant Add")
|
||||
@PermCode(code = "manage", nameCn = "通道商户管理", nameEn = "Channel Merchant Manage")
|
||||
@Operation(summary = "创建微信服务商通道商户")
|
||||
@PostMapping("/create")
|
||||
public Result<Void> create(@RequestBody @Validated WechatIsvChannelMerchantCreateParam param) {
|
||||
|
||||
@@ -34,7 +34,7 @@ public class WechatIsvKeyConfigController {
|
||||
return Res.ok(WechatIsvKeyConfigConvert.CONVERT.toResult(wechatIsvKeyConfigService.findByProduct(product)));
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "微信服务商编辑", nameEn = "WeChat ISV Edit")
|
||||
@PermCode(code = "manage", nameCn = "微信服务商管理", nameEn = "WeChat ISV Manage")
|
||||
@Operation(summary = "保存微信服务商密钥配置")
|
||||
@PostMapping("/save-config")
|
||||
public Result<Void> saveConfig(@RequestBody @Validated WechatIsvKeyConfigParam param) {
|
||||
|
||||
@@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/// 通道商户管理(运营平台-综合管理)
|
||||
/// 全局查看和管理所有通道商户,仅支持查看和编辑
|
||||
@PermCode(menuCode = "payment:channel:merchant")
|
||||
@PermCode(menuCode = "channel:merchant")
|
||||
@Validated
|
||||
@Tag(name = "通道商户管理(运营平台-综合管理)")
|
||||
@RestController
|
||||
@@ -27,7 +27,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
public class ChannelMerchantAdminController {
|
||||
private final ChannelMerchantService channelMerchantService;
|
||||
|
||||
@PermCode(code = "edit", nameCn = "通道商户编辑", nameEn = "Channel Merchant Edit")
|
||||
@PermCode(code = "manage", nameCn = "通道商户管理", nameEn = "Channel Merchant Manage")
|
||||
@Operation(summary = "修改")
|
||||
@PostMapping("/update")
|
||||
public Result<Void> update(@RequestBody @Validated ChannelMerchantEditParam param) {
|
||||
@@ -49,7 +49,7 @@ public class ChannelMerchantAdminController {
|
||||
return Res.ok(channelMerchantService.findById(id));
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "通道商户编辑", nameEn = "Channel Merchant Edit")
|
||||
@PermCode(code = "manage", nameCn = "通道商户管理", nameEn = "Channel Merchant Manage")
|
||||
@Operation(summary = "更新启用状态")
|
||||
@PostMapping("/update-enable")
|
||||
public Result<Void> updateEnable(@NotNull(message = "{validation.field.id.notNull}") Long id, @NotNull(message = "{validation.field.enable.notNull}") Boolean enable) {
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/// 签名调试(管理)
|
||||
@PermCode(menuCode = "payment:develop:sign")
|
||||
@PermCode(menuCode = "develop:sign")
|
||||
@Tag(name = "签名调试服务")
|
||||
@RestController
|
||||
@RequestMapping("/admin/develop/sign")
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import java.util.List;
|
||||
|
||||
/// 交易开发调试(管理)
|
||||
@PermCode(menuCode = "payment:develop:trade")
|
||||
@PermCode(menuCode = "develop:trade")
|
||||
@Tag(name = "交易开发调试服务")
|
||||
@RestController
|
||||
@RequestMapping("/admin/develop/trade")
|
||||
|
||||
@@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/// # 支付能力(管理端,只读)
|
||||
@PermCode(menuCode = "payment:capability")
|
||||
@PermCode(menuCode = "payment:platform:capability")
|
||||
@Validated
|
||||
@Tag(name = "支付能力管理")
|
||||
@RestController
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.List;
|
||||
/// # 支付通道(管理端,只读)
|
||||
///
|
||||
/// 清单来自 `ChannelEnum` + `pay_channel` 表 + 产品策略推断的通道能力。
|
||||
@PermCode(menuCode = "payment:platform:channel")
|
||||
@PermCode(menuCode = "payment:platform:pay_channel")
|
||||
@Validated
|
||||
@Tag(name = "支付通道")
|
||||
@RestController
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.List;
|
||||
|
||||
/// # 支付产品配置管理
|
||||
///
|
||||
@PermCode(menuCode = "payment:product:config")
|
||||
@PermCode(menuCode = "payment:config:product_config")
|
||||
@Validated
|
||||
@Tag(name = "支付产品配置管理")
|
||||
@RestController
|
||||
@@ -35,7 +35,7 @@ public class PayProductConfigController {
|
||||
return Res.ok(payProductConfigService.listAll());
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "产品配置编辑", nameEn = "Product Config Edit")
|
||||
@PermCode(code = "manage", nameCn = "产品配置管理", nameEn = "Product Config Manage")
|
||||
@Operation(summary = "切换产品生效环境")
|
||||
@PostMapping("/switch-env")
|
||||
public Result<Void> switchEnv(
|
||||
@@ -45,7 +45,7 @@ public class PayProductConfigController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "产品配置编辑", nameEn = "Product Config Edit")
|
||||
@PermCode(code = "manage", nameCn = "产品配置管理", nameEn = "Product Config Manage")
|
||||
@Operation(summary = "保存产品配置")
|
||||
@PostMapping("/save")
|
||||
public Result<Void> save(@RequestBody @Validated PayProductConfigParam param) {
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
|
||||
/// # 支付产品管理
|
||||
///
|
||||
@PermCode(menuCode = "payment:product")
|
||||
@PermCode(menuCode = "payment:platform:product")
|
||||
@Validated
|
||||
@Tag(name = "支付产品管理")
|
||||
@RestController
|
||||
@@ -55,7 +55,7 @@ public class PayProductController {
|
||||
return Res.ok(payProductService.dropdown());
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "产品编辑", nameEn = "Product Edit")
|
||||
@PermCode(code = "manage", nameCn = "产品管理", nameEn = "Product Manage")
|
||||
@Operation(summary = "切换支付产品启停")
|
||||
@PostMapping("/switch-enabled")
|
||||
public Result<Void> switchEnabled(
|
||||
|
||||
@@ -38,7 +38,7 @@ public class PayProviderController {
|
||||
return Res.ok(payProviderService.listByProvider());
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "渠道启停编辑", nameEn = "Provider Switch Enable")
|
||||
@PermCode(code = "manage", nameCn = "支付渠道管理", nameEn = "Provider Manage")
|
||||
@Operation(summary = "切换支付渠道启停")
|
||||
@PostMapping("/switch-enabled")
|
||||
public Result<Void> switchEnabled(
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/// 商户应用配置(管理)
|
||||
@PermCode(menuCode = "payment:merchant")
|
||||
@PermCode(menuCode = "merchant:app")
|
||||
@Validated
|
||||
@Tag(name = "商户应用配置(管理)")
|
||||
@RestController
|
||||
@@ -28,7 +28,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
public class MchAppInfoAdminController {
|
||||
private final MchAppInfoService mchAppInfoService;
|
||||
|
||||
@PermCode(code = "add", nameCn = "商户新增", nameEn = "Merchant Add")
|
||||
@PermCode(code = "manage", nameCn = "商户管理", nameEn = "Merchant Manage")
|
||||
@Operation(summary = "新增商户应用")
|
||||
@PostMapping("/add")
|
||||
public Result<Void> add(@RequestBody @Validated(ValidationGroup.add.class) MchAppInfoParam param){
|
||||
@@ -37,7 +37,7 @@ public class MchAppInfoAdminController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "商户编辑", nameEn = "Merchant Edit")
|
||||
@PermCode(code = "manage", nameCn = "商户管理", nameEn = "Merchant Manage")
|
||||
@Operation(summary = "修改商户应用")
|
||||
@PostMapping("/update")
|
||||
public Result<Void> update(@RequestBody @Validated(ValidationGroup.edit.class) MchAppInfoParam param){
|
||||
@@ -60,7 +60,7 @@ public class MchAppInfoAdminController {
|
||||
return Res.ok(mchAppInfoService.findById(id));
|
||||
}
|
||||
|
||||
@PermCode(code = "delete", nameCn = "商户删除", nameEn = "Merchant Delete")
|
||||
@PermCode(code = "manage", nameCn = "商户管理", nameEn = "Merchant Manage")
|
||||
@Operation(summary = "删除商户应用")
|
||||
@PostMapping("/delete")
|
||||
public Result<Void> delete(@NotNull(message = "{validation.field.id.notNull}") Long id){
|
||||
@@ -68,7 +68,7 @@ public class MchAppInfoAdminController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "商户编辑", nameEn = "Merchant Edit")
|
||||
@PermCode(code = "manage", nameCn = "商户管理", nameEn = "Merchant Manage")
|
||||
@Operation(summary = "设置默认商户应用")
|
||||
@PostMapping("/set-default")
|
||||
public Result<Void> setDefault(@NotNull(message = "{validation.field.id.notNull}") Long id){
|
||||
@@ -76,7 +76,7 @@ public class MchAppInfoAdminController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "商户编辑", nameEn = "Merchant Edit")
|
||||
@PermCode(code = "manage", nameCn = "商户管理", nameEn = "Merchant Manage")
|
||||
@Operation(summary = "取消默认商户应用")
|
||||
@PostMapping("/clear-default")
|
||||
public Result<Void> clearDefault(@NotNull(message = "{validation.field.id.notNull}") Long id){
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.List;
|
||||
|
||||
/// 商户通道商户管理(运营平台)
|
||||
/// 从商户入口进入,管理指定商户的通道商户
|
||||
@PermCode(menuCode = "payment:merchant:channelMerchant")
|
||||
@PermCode(menuCode = "channel:merchant")
|
||||
@Validated
|
||||
@Tag(name = "商户通道商户管理(运营平台)")
|
||||
@RestController
|
||||
@@ -31,28 +31,28 @@ import java.util.List;
|
||||
public class MerchantChannelMerchantAdminController {
|
||||
private final ChannelMerchantService channelMerchantService;
|
||||
|
||||
@PermCode(code = "view", nameCn = "商户通道商户查看", nameEn = "Merchant Channel Merchant View")
|
||||
@PermCode(code = "view", nameCn = "通道商户查看", nameEn = "Channel Merchant View")
|
||||
@Operation(summary = "分页查询")
|
||||
@GetMapping("/page")
|
||||
public Result<PageResult<ChannelMerchantResult>> page(PageParam pageParam, ChannelMerchantQuery query) {
|
||||
return Res.ok(channelMerchantService.page(pageParam, query));
|
||||
}
|
||||
|
||||
@PermCode(code = "view", nameCn = "商户通道商户查看", nameEn = "Merchant Channel Merchant View")
|
||||
@PermCode(code = "view", nameCn = "通道商户查看", nameEn = "Channel Merchant View")
|
||||
@Operation(summary = "查询详情")
|
||||
@GetMapping("/get")
|
||||
public Result<ChannelMerchantResult> findById(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
return Res.ok(channelMerchantService.findById(id));
|
||||
}
|
||||
|
||||
@PermCode(code = "view", nameCn = "商户通道商户查看", nameEn = "Merchant Channel Merchant View")
|
||||
@PermCode(code = "view", nameCn = "通道商户查看", nameEn = "Channel Merchant View")
|
||||
@Operation(summary = "根据商户号查询所有通道商户")
|
||||
@GetMapping("/all-by-mch-no")
|
||||
public Result<List<ChannelMerchantResult>> findAllByMchNo(@NotBlank(message = "{validation.field.mchNo.notBlank}") String mchNo) {
|
||||
return Res.ok(channelMerchantService.findAllByMchNo(mchNo));
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "商户通道商户编辑", nameEn = "Merchant Channel Merchant Edit")
|
||||
@PermCode(code = "manage", nameCn = "通道商户管理", nameEn = "Channel Merchant Manage")
|
||||
@Operation(summary = "更新启用状态")
|
||||
@PostMapping("/update-enable")
|
||||
public Result<Void> updateEnable(@NotNull(message = "{validation.field.id.notNull}") Long id, @NotNull(message = "{validation.field.enable.notNull}") Boolean enable) {
|
||||
@@ -60,14 +60,14 @@ public class MerchantChannelMerchantAdminController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "view", nameCn = "商户通道商户查看", nameEn = "Merchant Channel Merchant View")
|
||||
@PermCode(code = "view", nameCn = "通道商户查看", nameEn = "Channel Merchant View")
|
||||
@Operation(summary = "根据商户和通道查询通道商户号列表")
|
||||
@GetMapping("/dropdown")
|
||||
public Result<List<LabelValue>> dropdown(@NotBlank(message = "{validation.field.mchNo.notBlank}") String mchNo, @NotBlank(message = "{validation.field.channel.notBlank}") String channel) {
|
||||
return Res.ok(channelMerchantService.dropdown(mchNo, channel));
|
||||
}
|
||||
|
||||
@PermCode(code = "view", nameCn = "商户通道商户查看", nameEn = "Merchant Channel Merchant View")
|
||||
@PermCode(code = "view", nameCn = "通道商户查看", nameEn = "Channel Merchant View")
|
||||
@Operation(summary = "根据商户号查询通道")
|
||||
@GetMapping("/channel/dropdown-by-mch-no")
|
||||
public Result<List<PayChannelResult>> dropdownByMchNo(@NotBlank(message = "{validation.field.mchNo.notBlank}") String mchNo) {
|
||||
|
||||
@@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/// # 商户对接配置管理控制器
|
||||
///
|
||||
@PermCode(menuCode = "payment:merchant")
|
||||
@PermCode(menuCode = "merchant:credential")
|
||||
@Validated
|
||||
@Tag(name = "商户对接配置管理")
|
||||
@RestController
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/// 商户配置(管理)
|
||||
@PermCode(menuCode = "payment:merchant")
|
||||
@PermCode(menuCode = "merchant:info")
|
||||
@Validated
|
||||
@Tag(name = "商户配置(管理)")
|
||||
@RestController
|
||||
@@ -29,7 +29,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
public class MerchantAdminController {
|
||||
private final MerchantAdminService merchantService;
|
||||
|
||||
@PermCode(code = "add", nameCn = "商户新增", nameEn = "Merchant Add")
|
||||
@PermCode(code = "manage", nameCn = "商户管理", nameEn = "Merchant Manage")
|
||||
@Operation(summary = "新增商户")
|
||||
@PostMapping("/add")
|
||||
public Result<Void> add(@RequestBody @Validated(ValidationGroup.add.class) MerchantRegisterParam param){
|
||||
@@ -37,7 +37,7 @@ public class MerchantAdminController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "商户编辑", nameEn = "Merchant Edit")
|
||||
@PermCode(code = "manage", nameCn = "商户管理", nameEn = "Merchant Manage")
|
||||
@Operation(summary = "修改商户")
|
||||
@PostMapping("/update")
|
||||
public Result<Void> update(@RequestBody @Validated(ValidationGroup.edit.class) MerchantInfoParam param){
|
||||
@@ -66,7 +66,7 @@ public class MerchantAdminController {
|
||||
return Res.ok(merchantService.findByMchNo(mchNo));
|
||||
}
|
||||
|
||||
@PermCode(code = "delete", nameCn = "商户删除", nameEn = "Merchant Delete")
|
||||
@PermCode(code = "manage", nameCn = "商户管理", nameEn = "Merchant Manage")
|
||||
@Operation(summary = "删除商户")
|
||||
@PostMapping("/delete")
|
||||
public Result<Void> delete(@NotNull(message = "{validation.field.id.notNull}") Long id){
|
||||
@@ -74,7 +74,7 @@ public class MerchantAdminController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "商户编辑", nameEn = "Merchant Edit")
|
||||
@PermCode(code = "manage", nameCn = "商户管理", nameEn = "Merchant Manage")
|
||||
@Operation(summary = "启用商户")
|
||||
@PostMapping("/enable")
|
||||
public Result<Void> enable(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
@@ -82,7 +82,7 @@ public class MerchantAdminController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "商户编辑", nameEn = "Merchant Edit")
|
||||
@PermCode(code = "manage", nameCn = "商户管理", nameEn = "Merchant Manage")
|
||||
@Operation(summary = "禁用商户")
|
||||
@PostMapping("/disable")
|
||||
public Result<Void> disable(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
|
||||
@@ -30,7 +30,7 @@ import java.util.Map;
|
||||
/// 「运营」指 Admin 运营端角色,不是支付通道 channel。提供策略、基础/场景配置及
|
||||
/// 已启用渠道支付方式扁平目录(`method-directory/flat-list`)。
|
||||
///
|
||||
@PermCode(menuCode = "payment:merchant:app:payRoute")
|
||||
@PermCode(menuCode = "merchant:app:route")
|
||||
@Validated
|
||||
@Tag(name = "应用通道路由管理")
|
||||
@RestController
|
||||
@@ -55,7 +55,7 @@ public class PayRouteAdminController {
|
||||
return Res.ok(configService.getOrInitByAppId(appId));
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "通道路由编辑", nameEn = "Pay Route Edit")
|
||||
@PermCode(code = "manage", nameCn = "通道路由管理", nameEn = "Pay Route Manage")
|
||||
@Operation(summary = "更新路由策略")
|
||||
@PostMapping("/strategy/update")
|
||||
public Result<PayRouteStrategyResult> updateStrategy(@RequestBody @Validated PayRouteStrategyParam param) {
|
||||
@@ -69,7 +69,7 @@ public class PayRouteAdminController {
|
||||
return Res.ok(configService.listSceneByAppId(appId));
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "通道路由编辑", nameEn = "Pay Route Edit")
|
||||
@PermCode(code = "manage", nameCn = "通道路由管理", nameEn = "Pay Route Manage")
|
||||
@Operation(summary = "批量保存场景模式配置")
|
||||
@PostMapping("/scene-config/save-batch")
|
||||
public Result<Void> saveSceneBatch(@RequestBody @Validated PayRouteSceneConfigBatchParam param) {
|
||||
@@ -121,7 +121,7 @@ public class PayRouteAdminController {
|
||||
return Res.ok(configService.listBasicByAppId(appId));
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "通道路由编辑", nameEn = "Pay Route Edit")
|
||||
@PermCode(code = "manage", nameCn = "通道路由管理", nameEn = "Pay Route Manage")
|
||||
@Operation(summary = "批量保存基础模式配置")
|
||||
@PostMapping("/basic-config/save-batch")
|
||||
public Result<Void> saveBasicBatch(@RequestBody @Validated PayRouteBasicConfigBatchParam param) {
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/// 门店信息管理(管理端)
|
||||
@PermCode(menuCode = "payment:merchant:store")
|
||||
@PermCode(menuCode = "merchant:store")
|
||||
@Validated
|
||||
@Tag(name = "门店信息管理(管理端)")
|
||||
@RestController
|
||||
@@ -28,7 +28,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
public class MchStoreInfoAdminController {
|
||||
private final MchStoreInfoService mchStoreInfoService;
|
||||
|
||||
@PermCode(code = "add", nameCn = "门店新增", nameEn = "Store Add")
|
||||
@PermCode(code = "manage", nameCn = "门店管理", nameEn = "Store Manage")
|
||||
@Operation(summary = "新增门店")
|
||||
@PostMapping("/add")
|
||||
public Result<Void> add(@RequestBody @Validated(ValidationGroup.add.class) MchStoreInfoParam param) {
|
||||
@@ -37,7 +37,7 @@ public class MchStoreInfoAdminController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "门店编辑", nameEn = "Store Edit")
|
||||
@PermCode(code = "manage", nameCn = "门店管理", nameEn = "Store Manage")
|
||||
@Operation(summary = "修改门店")
|
||||
@PostMapping("/update")
|
||||
public Result<Void> update(@RequestBody @Validated(ValidationGroup.edit.class) MchStoreInfoParam param) {
|
||||
@@ -60,7 +60,7 @@ public class MchStoreInfoAdminController {
|
||||
return Res.ok(mchStoreInfoService.findById(id));
|
||||
}
|
||||
|
||||
@PermCode(code = "delete", nameCn = "门店删除", nameEn = "Store Delete")
|
||||
@PermCode(code = "manage", nameCn = "门店管理", nameEn = "Store Manage")
|
||||
@Operation(summary = "删除门店")
|
||||
@PostMapping("/delete")
|
||||
public Result<Void> delete(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/// # 云打印设备管理(运营端)
|
||||
///
|
||||
@PermCode(menuCode = "payment:device:printer")
|
||||
@PermCode(menuCode = "device:printer")
|
||||
@Validated
|
||||
@Tag(name = "云打印设备管理")
|
||||
@RestController
|
||||
@@ -33,7 +33,7 @@ public class DevicePrinterAdminController {
|
||||
|
||||
private final DevicePrinterAdminService devicePrinterAdminService;
|
||||
|
||||
@PermCode(code = "add", nameCn = "云打印新增", nameEn = "Printer Add")
|
||||
@PermCode(code = "manage", nameCn = "云打印管理", nameEn = "Printer Manage")
|
||||
@Operation(summary = "新增云打印设备")
|
||||
@PostMapping("/add")
|
||||
public Result<Void> add(@RequestBody @Validated(ValidationGroup.add.class) DevicePrinterParam param) {
|
||||
@@ -41,7 +41,7 @@ public class DevicePrinterAdminController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "云打印编辑", nameEn = "Printer Edit")
|
||||
@PermCode(code = "manage", nameCn = "云打印管理", nameEn = "Printer Manage")
|
||||
@Operation(summary = "修改云打印设备")
|
||||
@PostMapping("/update")
|
||||
public Result<Void> update(@RequestBody @Validated(ValidationGroup.edit.class) DevicePrinterParam param) {
|
||||
@@ -63,7 +63,7 @@ public class DevicePrinterAdminController {
|
||||
return Res.ok(devicePrinterAdminService.findById(id));
|
||||
}
|
||||
|
||||
@PermCode(code = "delete", nameCn = "云打印删除", nameEn = "Printer Delete")
|
||||
@PermCode(code = "manage", nameCn = "云打印管理", nameEn = "Printer Manage")
|
||||
@Operation(summary = "删除云打印设备")
|
||||
@PostMapping("/delete")
|
||||
public Result<Void> delete(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
@@ -71,7 +71,7 @@ public class DevicePrinterAdminController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "云打印编辑", nameEn = "Printer Edit")
|
||||
@PermCode(code = "manage", nameCn = "云打印管理", nameEn = "Printer Manage")
|
||||
@Operation(summary = "绑定云打印设备")
|
||||
@PostMapping("/bind")
|
||||
public Result<Void> bind(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
@@ -79,7 +79,7 @@ public class DevicePrinterAdminController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "云打印编辑", nameEn = "Printer Edit")
|
||||
@PermCode(code = "manage", nameCn = "云打印管理", nameEn = "Printer Manage")
|
||||
@Operation(summary = "解绑云打印设备")
|
||||
@PostMapping("/unbind")
|
||||
public Result<Void> unbind(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/// # 云音箱设备管理(运营端)
|
||||
///
|
||||
@PermCode(menuCode = "payment:device:speaker")
|
||||
@PermCode(menuCode = "device:speaker")
|
||||
@Validated
|
||||
@Tag(name = "云音箱设备管理")
|
||||
@RestController
|
||||
@@ -33,7 +33,7 @@ public class DeviceSpeakerAdminController {
|
||||
|
||||
private final DeviceSpeakerAdminService deviceSpeakerAdminService;
|
||||
|
||||
@PermCode(code = "add", nameCn = "云音箱新增", nameEn = "Speaker Add")
|
||||
@PermCode(code = "manage", nameCn = "云音箱管理", nameEn = "Speaker Manage")
|
||||
@Operation(summary = "新增云音箱设备")
|
||||
@PostMapping("/add")
|
||||
public Result<Void> add(@RequestBody @Validated(ValidationGroup.add.class) DeviceSpeakerParam param) {
|
||||
@@ -41,7 +41,7 @@ public class DeviceSpeakerAdminController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "云音箱编辑", nameEn = "Speaker Edit")
|
||||
@PermCode(code = "manage", nameCn = "云音箱管理", nameEn = "Speaker Manage")
|
||||
@Operation(summary = "修改云音箱设备")
|
||||
@PostMapping("/update")
|
||||
public Result<Void> update(@RequestBody @Validated(ValidationGroup.edit.class) DeviceSpeakerParam param) {
|
||||
@@ -63,7 +63,7 @@ public class DeviceSpeakerAdminController {
|
||||
return Res.ok(deviceSpeakerAdminService.findById(id));
|
||||
}
|
||||
|
||||
@PermCode(code = "delete", nameCn = "云音箱删除", nameEn = "Speaker Delete")
|
||||
@PermCode(code = "manage", nameCn = "云音箱管理", nameEn = "Speaker Manage")
|
||||
@Operation(summary = "删除云音箱设备")
|
||||
@PostMapping("/delete")
|
||||
public Result<Void> delete(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
@@ -71,7 +71,7 @@ public class DeviceSpeakerAdminController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "云音箱编辑", nameEn = "Speaker Edit")
|
||||
@PermCode(code = "manage", nameCn = "云音箱管理", nameEn = "Speaker Manage")
|
||||
@Operation(summary = "绑定云音箱设备")
|
||||
@PostMapping("/bind")
|
||||
public Result<Void> bind(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
@@ -79,7 +79,7 @@ public class DeviceSpeakerAdminController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "云音箱编辑", nameEn = "Speaker Edit")
|
||||
@PermCode(code = "manage", nameCn = "云音箱管理", nameEn = "Speaker Manage")
|
||||
@Operation(summary = "解绑云音箱设备")
|
||||
@PostMapping("/unbind")
|
||||
public Result<Void> unbind(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import java.util.List;
|
||||
|
||||
/// # 设备厂商配置管理(运营端)
|
||||
@PermCode(menuCode = "payment:device:vendorConfig")
|
||||
@PermCode(menuCode = "device:vendor_config")
|
||||
@Validated
|
||||
@Tag(name = "设备厂商配置管理")
|
||||
@RestController
|
||||
@@ -34,7 +34,7 @@ public class DeviceVendorConfigAdminController {
|
||||
|
||||
private final DeviceVendorConfigAdminService deviceVendorConfigAdminService;
|
||||
|
||||
@PermCode(code = "add", nameCn = "厂商配置新增", nameEn = "Vendor Config Add")
|
||||
@PermCode(code = "manage", nameCn = "厂商配置管理", nameEn = "Vendor Config Manage")
|
||||
@Operation(summary = "新增厂商配置")
|
||||
@PostMapping("/add")
|
||||
public Result<Void> add(@RequestBody @Validated(ValidationGroup.add.class) DeviceVendorConfigParam param) {
|
||||
@@ -42,7 +42,7 @@ public class DeviceVendorConfigAdminController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "厂商配置编辑", nameEn = "Vendor Config Edit")
|
||||
@PermCode(code = "manage", nameCn = "厂商配置管理", nameEn = "Vendor Config Manage")
|
||||
@Operation(summary = "修改厂商配置")
|
||||
@PostMapping("/update")
|
||||
public Result<Void> update(@RequestBody @Validated(ValidationGroup.edit.class) DeviceVendorConfigParam param) {
|
||||
@@ -64,7 +64,7 @@ public class DeviceVendorConfigAdminController {
|
||||
return Res.ok(deviceVendorConfigAdminService.findById(id));
|
||||
}
|
||||
|
||||
@PermCode(code = "delete", nameCn = "厂商配置删除", nameEn = "Vendor Config Delete")
|
||||
@PermCode(code = "manage", nameCn = "厂商配置管理", nameEn = "Vendor Config Manage")
|
||||
@Operation(summary = "删除厂商配置")
|
||||
@PostMapping("/delete")
|
||||
public Result<Void> delete(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
||||
@PermCode(menuCode = "starter:log:login")
|
||||
@PermCode(menuCode = "system:log:login")
|
||||
@Validated
|
||||
@Tag(name = "登录日志")
|
||||
@RestController
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/// # 操作日志
|
||||
///
|
||||
@PermCode(menuCode = "starter:log:operate")
|
||||
@PermCode(menuCode = "system:log:operate")
|
||||
@Validated
|
||||
@Tag(name = "操作日志")
|
||||
@RestController
|
||||
|
||||
@@ -46,7 +46,7 @@ public class SocialConfigController {
|
||||
return Res.ok(socialConfigService.findBySource(source));
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "配置编辑", nameEn = "Config Edit")
|
||||
@PermCode(code = "manage", nameCn = "配置管理", nameEn = "Config Manage")
|
||||
@Operation(summary = "修改平台配置")
|
||||
@PostMapping("/update")
|
||||
public Result<Void> update(@RequestBody @Validated SocialConfigParam param) {
|
||||
@@ -54,7 +54,7 @@ public class SocialConfigController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "配置编辑", nameEn = "Config Edit")
|
||||
@PermCode(code = "manage", nameCn = "配置管理", nameEn = "Config Manage")
|
||||
@Operation(summary = "切换平台启用状态(仅已配置平台可启停)")
|
||||
@PostMapping("/update-enabled")
|
||||
public Result<Void> updateEnabled(
|
||||
|
||||
@@ -28,7 +28,7 @@ public class UserRoleController {
|
||||
|
||||
private final UserRoleService userRoleService;
|
||||
|
||||
@PermCode(code = "assignRole", nameCn = "分配角色", nameEn = "Assign Role")
|
||||
@PermCode(code = "assign_role", nameCn = "分配角色", nameEn = "Assign Role")
|
||||
@Operation(summary = "给用户分配角色")
|
||||
@PostMapping(value = "/save-assign")
|
||||
public Result<Void> saveAssign(@Validated @RequestBody UserRoleParam param) {
|
||||
@@ -36,7 +36,7 @@ public class UserRoleController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "assignRole", nameCn = "分配角色", nameEn = "Assign Role")
|
||||
@PermCode(code = "assign_role", nameCn = "分配角色", nameEn = "Assign Role")
|
||||
@Operation(summary = "给用户分配角色(批量)")
|
||||
@PostMapping(value = "/save-assign-batch")
|
||||
public Result<Void> saveAssignBatch(@RequestBody @Validated UserRoleBatchParam param) {
|
||||
@@ -51,14 +51,14 @@ public class UserRoleController {
|
||||
return Res.ok(userRoleService.findRolesByUser(userId));
|
||||
}
|
||||
|
||||
@PermCode(code = "assignRole", nameCn = "分配角色", nameEn = "Assign Role")
|
||||
@PermCode(code = "assign_role", nameCn = "分配角色", nameEn = "Assign Role")
|
||||
@Operation(summary = "根据用户ID获取到可分配角色集合")
|
||||
@GetMapping(value = "/find-assignable-roles-by-user")
|
||||
public Result<List<RoleResult>> findAssignableRolesByUser(@NotNull(message = "{validation.field.userId.notNull}") @Parameter(description = "用户ID") Long userId) {
|
||||
return Res.ok(userRoleService.findAssignableRolesByUser(userId));
|
||||
}
|
||||
|
||||
@PermCode(code = "assignRole", nameCn = "分配角色", nameEn = "Assign Role")
|
||||
@PermCode(code = "assign_role", nameCn = "分配角色", nameEn = "Assign Role")
|
||||
@Operation(summary = "根据用户ID获取到角色id集合")
|
||||
@GetMapping(value = "/find-role-ids-by-user")
|
||||
public Result<List<Long>> findRoleIdsByUser(@NotNull(message = "{validation.field.userId.notNull}") @Parameter(description = "用户ID") Long userId) {
|
||||
|
||||
@@ -45,7 +45,7 @@ public class UserAdminController {
|
||||
return Res.ok(userQueryService.findById(id));
|
||||
}
|
||||
|
||||
@PermCode(code = "add", nameCn = "用户新增", nameEn = "User Add")
|
||||
@PermCode(code = "manage", nameCn = "用户管理", nameEn = "User Manage")
|
||||
@Operation(summary = "添加用户")
|
||||
@PostMapping("/add")
|
||||
public Result<Void> add(@RequestBody @Validated(ValidationGroup.add.class) UserInfoParam userInfoParam) {
|
||||
@@ -53,7 +53,7 @@ public class UserAdminController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "edit", nameCn = "用户编辑", nameEn = "User Edit")
|
||||
@PermCode(code = "manage", nameCn = "用户管理", nameEn = "User Manage")
|
||||
@Operation(summary = "修改用户")
|
||||
@PostMapping("/update")
|
||||
public Result<Void> update(@RequestBody @Validated(ValidationGroup.edit.class) UserInfoParam userInfoParam) {
|
||||
@@ -61,7 +61,7 @@ public class UserAdminController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "resetPassword", nameCn = "重置密码", nameEn = "Reset Password")
|
||||
@PermCode(code = "reset_password", nameCn = "重置密码", nameEn = "Reset Password")
|
||||
@Operation(summary = "重置密码")
|
||||
@PostMapping("/restart-password")
|
||||
public Result<Void> restartPassword(@RequestBody @Validated RestartPwdParam param) {
|
||||
@@ -69,7 +69,7 @@ public class UserAdminController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "resetPassword", nameCn = "重置密码", nameEn = "Reset Password")
|
||||
@PermCode(code = "reset_password", nameCn = "重置密码", nameEn = "Reset Password")
|
||||
@Operation(summary = "批量重置密码")
|
||||
@PostMapping("/restart-password-batch")
|
||||
public Result<Void> restartPasswordBatch(@RequestBody @Validated RestartPwdBatchParam param) {
|
||||
|
||||
@@ -33,7 +33,7 @@ public class NotifyNoticeController {
|
||||
|
||||
private final NotifyNoticeService noticeService;
|
||||
|
||||
@PermCode(code = "notice:add", nameCn = "公告管理", nameEn = "Notice Manage")
|
||||
@PermCode(code = "manage", nameCn = "公告管理", nameEn = "Notice Manage")
|
||||
@Operation(summary = "新建公告")
|
||||
@PostMapping("/add")
|
||||
public Result<Void> add(@RequestBody NotifyNoticeParam param) {
|
||||
@@ -42,7 +42,7 @@ public class NotifyNoticeController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "notice:add", nameCn = "公告管理", nameEn = "Notice Manage")
|
||||
@PermCode(code = "manage", nameCn = "公告管理", nameEn = "Notice Manage")
|
||||
@Operation(summary = "编辑公告")
|
||||
@PostMapping("/update")
|
||||
public Result<Void> update(@RequestBody NotifyNoticeParam param) {
|
||||
@@ -51,7 +51,7 @@ public class NotifyNoticeController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "notice:add", nameCn = "公告管理", nameEn = "Notice Manage")
|
||||
@PermCode(code = "manage", nameCn = "公告管理", nameEn = "Notice Manage")
|
||||
@Operation(summary = "删除公告")
|
||||
@PostMapping("/delete")
|
||||
public Result<Void> delete(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
@@ -59,7 +59,7 @@ public class NotifyNoticeController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "notice:publish", nameCn = "公告发布", nameEn = "Notice Publish")
|
||||
@PermCode(code = "publish", nameCn = "公告发布", nameEn = "Notice Publish")
|
||||
@Operation(summary = "发布公告")
|
||||
@PostMapping("/publish")
|
||||
public Result<Void> publish(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
@@ -67,7 +67,7 @@ public class NotifyNoticeController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "notice:publish", nameCn = "公告发布", nameEn = "Notice Publish")
|
||||
@PermCode(code = "publish", nameCn = "公告发布", nameEn = "Notice Publish")
|
||||
@Operation(summary = "下线公告")
|
||||
@PostMapping("/offline")
|
||||
public Result<Void> offline(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
@@ -75,14 +75,14 @@ public class NotifyNoticeController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "notice:view", nameCn = "公告查看", nameEn = "Notice View")
|
||||
@PermCode(code = "view", nameCn = "公告查看", nameEn = "Notice View")
|
||||
@Operation(summary = "公告详情")
|
||||
@GetMapping("/get")
|
||||
public Result<NotifyNoticeResult> findById(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
return Res.ok(noticeService.findById(id));
|
||||
}
|
||||
|
||||
@PermCode(code = "notice:view", nameCn = "公告查看", nameEn = "Notice View")
|
||||
@PermCode(code = "view", nameCn = "公告查看", nameEn = "Notice View")
|
||||
@Operation(summary = "公告分页")
|
||||
@GetMapping("/page")
|
||||
public Result<PageResult<NotifyNoticeResult>> page(PageParam pageParam, NotifyNoticeQuery query) {
|
||||
|
||||
@@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
/// # 平台OSS配置
|
||||
///
|
||||
/// 管理对象存储配置
|
||||
@PermCode(menuCode = "system:platform:config")
|
||||
@PermCode(menuCode = "system:oss_config")
|
||||
@Validated
|
||||
@Tag(name = "平台OSS配置")
|
||||
@RestController
|
||||
@@ -24,14 +24,14 @@ import org.springframework.web.bind.annotation.*;
|
||||
public class PlatformOssConfigController {
|
||||
private final PlatformOssConfigService platformOssConfigService;
|
||||
|
||||
@PermCode(code = "platformConfig:view", nameCn = "平台配置查看", nameEn = "Platform Config View")
|
||||
@PermCode(code = "view", nameCn = "OSS配置查看", nameEn = "OSS Config View")
|
||||
@Operation(summary = "获取OSS配置")
|
||||
@GetMapping("/get")
|
||||
public Result<PlatformOssConfigResult> getOssConfig() {
|
||||
return Res.ok(platformOssConfigService.findOssConfig());
|
||||
}
|
||||
|
||||
@PermCode(code = "platformConfig:manage", nameCn = "平台配置管理", nameEn = "Platform Config Manage")
|
||||
@PermCode(code = "manage", nameCn = "OSS配置管理", nameEn = "OSS Config Manage")
|
||||
@Operation(summary = "更新OSS配置")
|
||||
@PostMapping("/update")
|
||||
public Result<Void> updateOssConfig(@RequestBody @Validated PlatformOssConfigParam param) {
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
/// # 平台安全配置
|
||||
///
|
||||
/// 管理密码策略、登录安全、会话管理、异常登录检测、双因素认证等安全类配置
|
||||
@PermCode(menuCode = "system:security:config")
|
||||
@PermCode(menuCode = "system:security_config")
|
||||
@Validated
|
||||
@Tag(name = "平台安全配置")
|
||||
@RestController
|
||||
@@ -25,7 +25,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
public class PlatformSecurityConfigController {
|
||||
private final PlatformSecurityConfigService platformSecurityConfigService;
|
||||
|
||||
@PermCode(code = "security:view", nameCn = "安全配置查看", nameEn = "Security View")
|
||||
@PermCode(code = "view", nameCn = "安全配置查看", nameEn = "Security View")
|
||||
@Operation(summary = "获取密码策略配置")
|
||||
@GetMapping("/password-policy/get")
|
||||
public Result<PlatformPasswordPolicyConfigResult> getPasswordPolicyConfig() {
|
||||
@@ -39,7 +39,7 @@ public class PlatformSecurityConfigController {
|
||||
return Res.ok(platformSecurityConfigService.findPasswordPolicyConfig());
|
||||
}
|
||||
|
||||
@PermCode(code = "security:manage", nameCn = "安全配置管理", nameEn = "Security Manage")
|
||||
@PermCode(code = "manage", nameCn = "安全配置管理", nameEn = "Security Manage")
|
||||
@Operation(summary = "更新密码策略配置")
|
||||
@PostMapping("/password-policy/update")
|
||||
public Result<Void> updatePasswordPolicyConfig(@RequestBody @Validated PlatformPasswordPolicyConfigParam param) {
|
||||
@@ -47,14 +47,14 @@ public class PlatformSecurityConfigController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "security:view", nameCn = "安全配置查看", nameEn = "Security View")
|
||||
@PermCode(code = "view", nameCn = "安全配置查看", nameEn = "Security View")
|
||||
@Operation(summary = "获取登录安全配置")
|
||||
@GetMapping("/login/get")
|
||||
public Result<PlatformLoginSecurityConfigResult> getLoginSecurityConfig() {
|
||||
return Res.ok(platformSecurityConfigService.findLoginSecurityConfig());
|
||||
}
|
||||
|
||||
@PermCode(code = "security:manage", nameCn = "安全配置管理", nameEn = "Security Manage")
|
||||
@PermCode(code = "manage", nameCn = "安全配置管理", nameEn = "Security Manage")
|
||||
@Operation(summary = "更新登录安全配置")
|
||||
@PostMapping("/login/update")
|
||||
public Result<Void> updateLoginSecurityConfig(@RequestBody @Validated PlatformLoginSecurityConfigParam param) {
|
||||
@@ -62,14 +62,14 @@ public class PlatformSecurityConfigController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "security:view", nameCn = "安全配置查看", nameEn = "Security View")
|
||||
@PermCode(code = "view", nameCn = "安全配置查看", nameEn = "Security View")
|
||||
@Operation(summary = "获取会话管理配置")
|
||||
@GetMapping("/session/get")
|
||||
public Result<PlatformSessionManagementConfigResult> getSessionManagementConfig() {
|
||||
return Res.ok(platformSecurityConfigService.findSessionManagementConfig());
|
||||
}
|
||||
|
||||
@PermCode(code = "security:manage", nameCn = "安全配置管理", nameEn = "Security Manage")
|
||||
@PermCode(code = "manage", nameCn = "安全配置管理", nameEn = "Security Manage")
|
||||
@Operation(summary = "更新会话管理配置")
|
||||
@PostMapping("/session/update")
|
||||
public Result<Void> updateSessionManagementConfig(@RequestBody @Validated PlatformSessionManagementConfigParam param) {
|
||||
@@ -77,14 +77,14 @@ public class PlatformSecurityConfigController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "security:view", nameCn = "安全配置查看", nameEn = "Security View")
|
||||
@PermCode(code = "view", nameCn = "安全配置查看", nameEn = "Security View")
|
||||
@Operation(summary = "获取异常登录检测配置")
|
||||
@GetMapping("/anomaly-detection/get")
|
||||
public Result<PlatformAnomalyDetectionConfigResult> getAnomalyDetectionConfig() {
|
||||
return Res.ok(platformSecurityConfigService.findAnomalyDetectionConfig());
|
||||
}
|
||||
|
||||
@PermCode(code = "security:manage", nameCn = "安全配置管理", nameEn = "Security Manage")
|
||||
@PermCode(code = "manage", nameCn = "安全配置管理", nameEn = "Security Manage")
|
||||
@Operation(summary = "更新异常登录检测配置")
|
||||
@PostMapping("/anomaly-detection/update")
|
||||
public Result<Void> updateAnomalyDetectionConfig(@RequestBody @Validated PlatformAnomalyDetectionConfigParam param) {
|
||||
@@ -92,14 +92,14 @@ public class PlatformSecurityConfigController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = "security:view", nameCn = "安全配置查看", nameEn = "Security View")
|
||||
@PermCode(code = "view", nameCn = "安全配置查看", nameEn = "Security View")
|
||||
@Operation(summary = "获取双因素认证配置")
|
||||
@GetMapping("/two-factor-auth/get")
|
||||
public Result<PlatformTwoFactorAuthConfigResult> getTwoFactorAuthConfig() {
|
||||
return Res.ok(platformSecurityConfigService.findTwoFactorAuthConfig());
|
||||
}
|
||||
|
||||
@PermCode(code = "security:manage", nameCn = "安全配置管理", nameEn = "Security Manage")
|
||||
@PermCode(code = "manage", nameCn = "安全配置管理", nameEn = "Security Manage")
|
||||
@Operation(summary = "更新双因素认证配置")
|
||||
@PostMapping("/two-factor-auth/update")
|
||||
public Result<Void> updateTwoFactorAuthConfig(@RequestBody @Validated PlatformTwoFactorAuthConfigParam param) {
|
||||
|
||||
@@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
/// # 平台端点配置
|
||||
///
|
||||
/// 管理系统访问地址等端点配置
|
||||
@PermCode(menuCode = "system:platform:config")
|
||||
@PermCode(menuCode = "system:platform_config")
|
||||
@Validated
|
||||
@Tag(name = "平台端点配置")
|
||||
@RestController
|
||||
@@ -24,14 +24,14 @@ import org.springframework.web.bind.annotation.*;
|
||||
public class PlatformUrlConfigController {
|
||||
private final PlatformUrlConfigService platformUrlConfigService;
|
||||
|
||||
@PermCode(code = "platformConfig:view", nameCn = "平台配置查看", nameEn = "Platform Config View")
|
||||
@PermCode(code = "view", nameCn = "平台配置查看", nameEn = "Platform Config View")
|
||||
@Operation(summary = "获取端点配置")
|
||||
@GetMapping("/get")
|
||||
public Result<PlatformUrlConfigResult> getUrlConfig() {
|
||||
return Res.ok(platformUrlConfigService.findUrlConfig());
|
||||
}
|
||||
|
||||
@PermCode(code = "platformConfig:manage", nameCn = "平台配置管理", nameEn = "Platform Config Manage")
|
||||
@PermCode(code = "manage", nameCn = "平台配置管理", nameEn = "Platform Config Manage")
|
||||
@Operation(summary = "更新端点配置")
|
||||
@PostMapping("/update")
|
||||
public Result<Void> updateUrlConfig(@RequestBody @Validated PlatformUrlConfigParam param) {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class DictController {
|
||||
/// 添加字典
|
||||
///
|
||||
/// @param param 字典参数
|
||||
@PermCode(code = "dict:manage", nameCn = "字典管理", nameEn = "Dict Manage")
|
||||
@PermCode(code = "manage", nameCn = "字典管理", nameEn = "Dict Manage")
|
||||
@Operation(summary = "添加字典")
|
||||
@PostMapping("/add")
|
||||
public Result<Void> add(@RequestBody DictParam param) {
|
||||
@@ -48,7 +48,7 @@ public class DictController {
|
||||
/// 根据主键删除字典
|
||||
///
|
||||
/// @param id 字典ID
|
||||
@PermCode(code = "dict:manage", nameCn = "字典管理", nameEn = "Dict Manage")
|
||||
@PermCode(code = "manage", nameCn = "字典管理", nameEn = "Dict Manage")
|
||||
@Operation(summary = "根据主键删除")
|
||||
@PostMapping("/delete")
|
||||
public Result<Void> delete(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
@@ -59,7 +59,7 @@ public class DictController {
|
||||
/// 更新字典
|
||||
///
|
||||
/// @param param 字典参数
|
||||
@PermCode(code = "dict:manage", nameCn = "字典管理", nameEn = "Dict Manage")
|
||||
@PermCode(code = "manage", nameCn = "字典管理", nameEn = "Dict Manage")
|
||||
@Operation(summary = "更新字典")
|
||||
@PostMapping("/update")
|
||||
public Result<Void> update(@RequestBody DictParam param) {
|
||||
@@ -72,7 +72,7 @@ public class DictController {
|
||||
///
|
||||
/// @param id 字典ID
|
||||
/// @return 字典信息
|
||||
@PermCode(code = "dict:view", nameCn = "字典查看", nameEn = "Dict View")
|
||||
@PermCode(code = "view", nameCn = "字典查看", nameEn = "Dict View")
|
||||
@Operation(summary = "根据主键获取字典")
|
||||
@GetMapping("/get")
|
||||
public Result<DictResult> findById(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
@@ -82,7 +82,7 @@ public class DictController {
|
||||
/// 查询全部字典
|
||||
///
|
||||
/// @return 字典列表
|
||||
@PermCode(code = "dict:view", nameCn = "字典查看", nameEn = "Dict View")
|
||||
@PermCode(code = "view", nameCn = "字典查看", nameEn = "Dict View")
|
||||
@Operation(summary = "查询全部字典")
|
||||
@GetMapping("/all")
|
||||
public Result<List<DictResult>> findAll() {
|
||||
@@ -94,7 +94,7 @@ public class DictController {
|
||||
/// @param pageParam 分页参数
|
||||
/// @param param 查询参数
|
||||
/// @return 字典分页结果
|
||||
@PermCode(code = "dict:view", nameCn = "字典查看", nameEn = "Dict View")
|
||||
@PermCode(code = "view", nameCn = "字典查看", nameEn = "Dict View")
|
||||
@Operation(summary = "字典分页")
|
||||
@GetMapping("/page")
|
||||
public Result<PageResult<DictResult>> page(PageParam pageParam, DictParam param) {
|
||||
@@ -105,7 +105,7 @@ public class DictController {
|
||||
///
|
||||
/// @param code 字典编码
|
||||
/// @return 是否存在
|
||||
@PermCode(code = "dict:view", nameCn = "字典查看", nameEn = "Dict View")
|
||||
@PermCode(code = "view", nameCn = "字典查看", nameEn = "Dict View")
|
||||
@Operation(summary = "字典编码是否被使用")
|
||||
@GetMapping("/exists-by-code")
|
||||
public Result<Boolean> existsByCode(@NotBlank(message = "{validation.field.code.notBlank}") String code) {
|
||||
@@ -117,7 +117,7 @@ public class DictController {
|
||||
/// @param code 字典编码
|
||||
/// @param id 字典ID
|
||||
/// @return 是否存在
|
||||
@PermCode(code = "dict:view", nameCn = "字典查看", nameEn = "Dict View")
|
||||
@PermCode(code = "view", nameCn = "字典查看", nameEn = "Dict View")
|
||||
@Operation(summary = "编码是否被使用(不包含自己)")
|
||||
@GetMapping("/exists-by-code-not-id")
|
||||
public Result<Boolean> existsByCode(@NotBlank(message = "{validation.field.code.notBlank}") String code, @NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
|
||||
@@ -37,7 +37,7 @@ public class DictItemController {
|
||||
///
|
||||
/// @param param 字典项参数
|
||||
/// @return 操作结果
|
||||
@PermCode(code = "item:manage", nameCn = "字典项管理", nameEn = "Dict Item Manage")
|
||||
@PermCode(code = "manage", nameCn = "字典管理", nameEn = "Dict Manage")
|
||||
@Operation(summary = "添加字典项")
|
||||
@PostMapping("/add")
|
||||
public Result<Void> add(@RequestBody @Validated(ValidationGroup.add.class) DictItemParam param) {
|
||||
@@ -49,7 +49,7 @@ public class DictItemController {
|
||||
///
|
||||
/// @param param 字典项参数
|
||||
/// @return 操作结果
|
||||
@PermCode(code = "item:manage", nameCn = "字典项管理", nameEn = "Dict Item Manage")
|
||||
@PermCode(code = "manage", nameCn = "字典管理", nameEn = "Dict Manage")
|
||||
@Operation(summary = "修改字典项")
|
||||
@PostMapping(value = "/update")
|
||||
public Result<Void> update(@RequestBody @Validated(ValidationGroup.edit.class) DictItemParam param) {
|
||||
@@ -61,7 +61,7 @@ public class DictItemController {
|
||||
///
|
||||
/// @param id 字典项ID
|
||||
/// @return 操作结果
|
||||
@PermCode(code = "item:manage", nameCn = "字典项管理", nameEn = "Dict Item Manage")
|
||||
@PermCode(code = "manage", nameCn = "字典管理", nameEn = "Dict Manage")
|
||||
@Operation(summary = "删除字典项")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<Void> delete(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
@@ -73,7 +73,7 @@ public class DictItemController {
|
||||
///
|
||||
/// @param id 字典项ID
|
||||
/// @return 字典项信息
|
||||
@PermCode(code = "item:view", nameCn = "字典项查看", nameEn = "Dict Item View")
|
||||
@PermCode(code = "view", nameCn = "字典查看", nameEn = "Dict View")
|
||||
@Operation(summary = "根据字典项ID查询")
|
||||
@GetMapping("/get")
|
||||
public Result<DictItemResult> findById(@NotNull(message = "{validation.field.dictItemId.notNull}") Long id) {
|
||||
@@ -84,7 +84,7 @@ public class DictItemController {
|
||||
///
|
||||
/// @param dictId 字典ID
|
||||
/// @return 字典项列表
|
||||
@PermCode(code = "item:view", nameCn = "字典项查看", nameEn = "Dict Item View")
|
||||
@PermCode(code = "view", nameCn = "字典查看", nameEn = "Dict View")
|
||||
@Operation(summary = "查询指定字典ID下的所有字典项")
|
||||
@GetMapping("/get-by-dictionary-id")
|
||||
public Result<List<DictItemResult>> findByDictionaryId(@NotNull(message = "{validation.field.dictId.notNull}") Long dictId) {
|
||||
@@ -96,7 +96,7 @@ public class DictItemController {
|
||||
/// @param pageParam 分页参数
|
||||
/// @param dictId 字典ID
|
||||
/// @return 字典项分页结果
|
||||
@PermCode(code = "item:view", nameCn = "字典项查看", nameEn = "Dict Item View")
|
||||
@PermCode(code = "view", nameCn = "字典查看", nameEn = "Dict View")
|
||||
@Operation(summary = "分页查询指定字典下的字典项")
|
||||
@GetMapping("/page-by-dictionary-id")
|
||||
public Result<PageResult<DictItemResult>> pageByDictionaryId(PageParam pageParam, @Parameter(description = "字典ID") Long dictId) {
|
||||
@@ -106,7 +106,7 @@ public class DictItemController {
|
||||
/// 获取全部字典项
|
||||
///
|
||||
/// @return 所有字典项列表
|
||||
@PermCode(code = "item:view", nameCn = "字典项查看", nameEn = "Dict Item View")
|
||||
@PermCode(code = "view", nameCn = "字典查看", nameEn = "Dict View")
|
||||
@Operation(summary = "获取全部字典项")
|
||||
@GetMapping("/all")
|
||||
public Result<List<DictItemResult>> findAll() {
|
||||
@@ -128,7 +128,7 @@ public class DictItemController {
|
||||
/// @param code 字典项编码
|
||||
/// @param dictId 字典ID
|
||||
/// @return 是否存在
|
||||
@PermCode(code = "item:view", nameCn = "字典项查看", nameEn = "Dict Item View")
|
||||
@PermCode(code = "view", nameCn = "字典查看", nameEn = "Dict View")
|
||||
@Operation(summary = "字典项编码是否被使用")
|
||||
@GetMapping("/exists-by-code")
|
||||
public Result<Boolean> existsByCode(
|
||||
@@ -143,7 +143,7 @@ public class DictItemController {
|
||||
/// @param dictId 字典ID
|
||||
/// @param id 字典项ID
|
||||
/// @return 是否存在
|
||||
@PermCode(code = "item:view", nameCn = "字典项查看", nameEn = "Dict Item View")
|
||||
@PermCode(code = "view", nameCn = "字典查看", nameEn = "Dict View")
|
||||
@Operation(summary = "字典项编码是否被使用(不包含自己)")
|
||||
@GetMapping("/exists-by-code-not-id")
|
||||
public Result<Boolean> existsByCode(@Parameter(description = "编码") @NotBlank(message = "{validation.field.code.notBlank}") String code,
|
||||
|
||||
Reference in New Issue
Block a user