Skip to content

Commit

Permalink
Merge branch 'master' into fix#5340
Browse files Browse the repository at this point in the history
  • Loading branch information
847850277 authored Mar 21, 2024
2 parents f7610ab + 9a3b741 commit d64f213
Show file tree
Hide file tree
Showing 16 changed files with 173 additions and 36 deletions.
4 changes: 3 additions & 1 deletion db/init/mysql/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ INSERT INTO `permission` VALUES ('1351007708736266240', '1346358560427216896', '
INSERT INTO `permission` VALUES ('1351007708740460544', '1346358560427216896', '1347048004105940992', '2022-05-25 18:02:53', '2022-05-25 18:02:53');
INSERT INTO `permission` VALUES ('1351007708744654848', '1346358560427216896', '1347048101875167232', '2022-05-25 18:02:53', '2022-05-25 18:02:53');
INSERT INTO `permission` VALUES ('1351007708744654849', '1346358560427216896', '1347048145877610496', '2022-05-25 18:02:53', '2022-05-25 18:02:53');
INSERT INTO `permission` VALUES ('1351007708748849151', '1346358560427216896', '1347048240677269503', '2022-05-25 18:02:53', '2022-05-25 18:02:53');
INSERT INTO `permission` VALUES ('1351007708748849152', '1346358560427216896', '1347048240677269504', '2022-05-25 18:02:53', '2022-05-25 18:02:53');
INSERT INTO `permission` VALUES ('1351007708753043456', '1346358560427216896', '1347048316216684544', '2022-05-25 18:02:53', '2022-05-25 18:02:53');
INSERT INTO `permission` VALUES ('1351007708757237760', '1346358560427216896', '1347048776029843456', '2022-05-25 18:02:53', '2022-05-25 18:02:53');
Expand Down Expand Up @@ -839,7 +840,7 @@ INSERT INTO `plugin` VALUES ('42', 'tcp', NULL, 'Proxy', 320, 1, '2023-05-30 18:
INSERT INTO `plugin` VALUES ('43', 'loggingHuaweiLts', '{\"totalSizeInBytes\":\"104857600\",\"maxBlockMs\":\"0\",\"ioThreadCount\":\"1\",\"batchSizeThresholdInBytes\":\"524288\",\"batchCountThreshold\":\"4096\",\"lingerMs\":\"2000\",\"retries\":\"100\",\"baseRetryBackoffMs\":\"100\",\"maxRetryBackoffMs\":\"100\",\"enableLocalTest\":\"true\",\"setGiveUpExtraLongSingleLog\":\"false\"}', 'Logging', 177, 0, '2023-07-05 14:03:53.686', '2023-07-06 12:42:07.234', NULL);
INSERT INTO `plugin` VALUES ('44', 'basicAuth', '{\"defaultHandleJson\":\"{\\\"authorization\\\":\\\"test:test123\\\"}\"}', 'Authentication', 150, 0, '2022-07-24 19:00:00', '2022-07-24 19:00:00', null);
INSERT INTO `plugin` VALUES ('45', 'loggingRabbitMQ', '{\"host\":\"127.0.0.1\",\"port\":5672,\"password\":\"admin\",\"username\":\"admin\",\"exchangeName\":\"exchange.logging.plugin\",\"queueName\":\"queue.logging.plugin\",\"routingKey\":\"topic.logging\",\"virtualHost\":\"/\",\"exchangeType\":\"direct\",\"durable\":\"true\",\"exclusive\":\"false\",\"autoDelete\":\"false\"}', 'Logging', 171, 0, '2023-11-06 15:49:56.454', '2023-11-10 10:40:58.447', NULL);

-- ----------------------------
-- Table structure for plugin_handle
-- ----------------------------
Expand Down Expand Up @@ -1257,6 +1258,7 @@ INSERT INTO `resource` VALUES ('1347047747305484288', '1346777623011880960', 'SH
INSERT INTO `resource` VALUES ('1347048004105940992', '1346777766301888512', 'SHENYU.BUTTON.SYSTEM.LIST', '', '', '', 2, 0, '', 1, 0, 'system:authen:list', 1, '2022-05-25 18:02:53', '2022-05-25 18:02:53');
INSERT INTO `resource` VALUES ('1347048101875167232', '1346777766301888512', 'SHENYU.BUTTON.SYSTEM.DELETE', '', '', '', 2, 1, '', 1, 0, 'system:authen:delete', 1, '2022-05-25 18:02:53', '2022-05-25 18:02:53');
INSERT INTO `resource` VALUES ('1347048145877610496', '1346777766301888512', 'SHENYU.BUTTON.SYSTEM.ADD', '', '', '', 2, 2, '', 1, 0, 'system:authen:add', 1, '2022-05-25 18:02:53', '2022-05-25 18:02:53');
INSERT INTO `resource` VALUES ('1347048240677269503', '1346777766301888512', 'SHENYU.PLUGIN.BATCH.OPENED', '', '', '', 2, 3, '', 1, 0, 'system:authen:open', 1, '2022-05-25 18:02:53', '2022-05-25 18:02:53');
INSERT INTO `resource` VALUES ('1347048240677269504', '1346777766301888512', 'SHENYU.BUTTON.SYSTEM.ENABLE', '', '', '', 2, 3, '', 1, 0, 'system:authen:disable', 1, '2022-05-25 18:02:53', '2022-05-25 18:02:53');
INSERT INTO `resource` VALUES ('1347048316216684544', '1346777766301888512', 'SHENYU.BUTTON.SYSTEM.SYNCHRONIZE', '', '', '', 2, 4, '', 1, 0, 'system:authen:modify', 1, '2022-05-25 18:02:53', '2022-05-25 18:02:53');
INSERT INTO `resource` VALUES ('1347048776029843456', '1346777766301888512', 'SHENYU.BUTTON.SYSTEM.EDIT', '', '', '', 2, 5, '', 1, 0, 'system:authen:edit', 1, '2022-05-25 18:02:53', '2022-05-25 18:02:53');
Expand Down
2 changes: 2 additions & 0 deletions db/init/og/create-table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ INSERT INTO "public"."permission" VALUES ('1351007708740460544', '13463585604272
INSERT INTO "public"."permission" VALUES ('1351007708614631424', '1346358560427216896', '1346777907096285184', '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."permission" VALUES ('1351007708744654848', '1346358560427216896', '1347048101875167232', '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."permission" VALUES ('1351007708744654849', '1346358560427216896', '1347048145877610496', '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."permission" VALUES ('1351007708748849151', '1346358560427216896', '1347048240677269503', '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."permission" VALUES ('1351007708748849152', '1346358560427216896', '1347048240677269504', '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."permission" VALUES ('1351007708753043456', '1346358560427216896', '1347048316216684544', '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."permission" VALUES ('1351007708757237760', '1346358560427216896', '1347048776029843456', '2022-05-25 18:08:01', '2022-05-25 18:08:01');
Expand Down Expand Up @@ -1420,6 +1421,7 @@ INSERT INTO "public"."resource" VALUES ('1347047747305484288', '1346777623011880
INSERT INTO "public"."resource" VALUES ('1347048004105940992', '1346777766301888512', 'SHENYU.BUTTON.SYSTEM.LIST', '', '', '', 2, 0, '', 1, 0, 'system:authen:list', 1, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."resource" VALUES ('1347048101875167232', '1346777766301888512', 'SHENYU.BUTTON.SYSTEM.DELETE', '', '', '', 2, 1, '', 1, 0, 'system:authen:delete', 1, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."resource" VALUES ('1347048145877610496', '1346777766301888512', 'SHENYU.BUTTON.SYSTEM.ADD', '', '', '', 2, 2, '', 1, 0, 'system:authen:add', 1, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."resource" VALUES ('1347048240677269503', '1346777766301888512', 'SHENYU.PLUGIN.BATCH.OPENED', '', '', '', 2, 3, '', 1, 0, 'system:authen:open', 1, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."resource" VALUES ('1347048240677269504', '1346777766301888512', 'SHENYU.BUTTON.SYSTEM.ENABLE', '', '', '', 2, 3, '', 1, 0, 'system:authen:disable', 1, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."resource" VALUES ('1347048316216684544', '1346777766301888512', 'SHENYU.BUTTON.SYSTEM.SYNCHRONIZE', '', '', '', 2, 4, '', 1, 0, 'system:authen:modify', 1, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."resource" VALUES ('1347048776029843456', '1346777766301888512', 'SHENYU.BUTTON.SYSTEM.EDIT', '', '', '', 2, 5, '', 1, 0, 'system:authen:edit', 1, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
Expand Down
2 changes: 2 additions & 0 deletions db/init/oracle/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2247,6 +2247,7 @@ INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX("resource" (id)) */ INTO "resource" (id,
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX("resource" (id)) */ INTO "resource" (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status) VALUES('1347048004105940992','1346777766301888512','SHENYU.BUTTON.SYSTEM.LIST','','','','2','0','','1','0','system:authen:list','1');
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX("resource" (id)) */ INTO "resource" (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status) VALUES('1347048101875167232','1346777766301888512','SHENYU.BUTTON.SYSTEM.DELETE','','','','2','1','','1','0','system:authen:delete','1');
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX("resource" (id)) */ INTO "resource" (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status) VALUES('1347048145877610496','1346777766301888512','SHENYU.BUTTON.SYSTEM.ADD','','','','2','2','','1','0','system:authen:add','1');
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX("resource" (id)) */ INTO "resource" (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status) VALUES('1347048240677269503','1346777766301888512','SHENYU.PLUGIN.BATCH.OPENED','','','','2','3','','1','0','system:authen:open','1');
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX("resource" (id)) */ INTO "resource" (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status) VALUES('1347048240677269504','1346777766301888512','SHENYU.BUTTON.SYSTEM.ENABLE','','','','2','3','','1','0','system:authen:disable','1');
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX("resource" (id)) */ INTO "resource" (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status) VALUES('1347048316216684544','1346777766301888512','SHENYU.BUTTON.SYSTEM.SYNCHRONIZE','','','','2','4','','1','0','system:authen:modify','1');
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX("resource" (id)) */ INTO "resource" (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status) VALUES('1347048776029843456','1346777766301888512','SHENYU.BUTTON.SYSTEM.EDIT','','','','2','5','','1','0','system:authen:edit','1');
Expand Down Expand Up @@ -2319,6 +2320,7 @@ INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, o
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, object_id, resource_id) VALUES ('1351007708740460544', '1346358560427216896', '1347048004105940992');
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, object_id, resource_id) VALUES ('1351007708744654848', '1346358560427216896', '1347048101875167232');
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, object_id, resource_id) VALUES ('1351007708744654849', '1346358560427216896', '1347048145877610496');
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, object_id, resource_id) VALUES ('1351007708748849151', '1346358560427216896', '1347048240677269503');
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, object_id, resource_id) VALUES ('1351007708748849152', '1346358560427216896', '1347048240677269504');
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, object_id, resource_id) VALUES ('1351007708753043456', '1346358560427216896', '1347048316216684544');
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, object_id, resource_id) VALUES ('1351007708757237760', '1346358560427216896', '1347048776029843456');
Expand Down
2 changes: 2 additions & 0 deletions db/init/pg/create-table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ INSERT INTO "public"."permission" VALUES ('1351007708740460544', '13463585604272
INSERT INTO "public"."permission" VALUES ('1351007708614631424', '1346358560427216896', '1346777907096285184', '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."permission" VALUES ('1351007708744654848', '1346358560427216896', '1347048101875167232', '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."permission" VALUES ('1351007708744654849', '1346358560427216896', '1347048145877610496', '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."permission" VALUES ('1351007708748849151', '1346358560427216896', '1347048240677269503', '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."permission" VALUES ('1351007708748849152', '1346358560427216896', '1347048240677269504', '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."permission" VALUES ('1351007708753043456', '1346358560427216896', '1347048316216684544', '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."permission" VALUES ('1351007708757237760', '1346358560427216896', '1347048776029843456', '2022-05-25 18:08:01', '2022-05-25 18:08:01');
Expand Down Expand Up @@ -1419,6 +1420,7 @@ INSERT INTO "public"."resource" VALUES ('1347047747305484288', '1346777623011880
INSERT INTO "public"."resource" VALUES ('1347048004105940992', '1346777766301888512', 'SHENYU.BUTTON.SYSTEM.LIST', '', '', '', 2, 0, '', 1, 0, 'system:authen:list', 1, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."resource" VALUES ('1347048101875167232', '1346777766301888512', 'SHENYU.BUTTON.SYSTEM.DELETE', '', '', '', 2, 1, '', 1, 0, 'system:authen:delete', 1, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."resource" VALUES ('1347048145877610496', '1346777766301888512', 'SHENYU.BUTTON.SYSTEM.ADD', '', '', '', 2, 2, '', 1, 0, 'system:authen:add', 1, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."resource" VALUES ('1347048240677269503', '1346777766301888512', 'SHENYU.PLUGIN.BATCH.OPENED', '', '', '', 2, 3, '', 1, 0, 'system:authen:open', 1, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."resource" VALUES ('1347048240677269504', '1346777766301888512', 'SHENYU.BUTTON.SYSTEM.ENABLE', '', '', '', 2, 3, '', 1, 0, 'system:authen:disable', 1, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."resource" VALUES ('1347048316216684544', '1346777766301888512', 'SHENYU.BUTTON.SYSTEM.SYNCHRONIZE', '', '', '', 2, 4, '', 1, 0, 'system:authen:modify', 1, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."resource" VALUES ('1347048776029843456', '1346777766301888512', 'SHENYU.BUTTON.SYSTEM.EDIT', '', '', '', 2, 5, '', 1, 0, 'system:authen:edit', 1, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
Expand Down
3 changes: 3 additions & 0 deletions db/upgrade/2.6.1-upgrade-2.7.0-mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ CREATE TABLE IF NOT EXISTS INT_LOCK (
`CREATED_DATE` TIMESTAMP NOT NULL,
constraint INT_LOCK_PK primary key (LOCK_KEY, REGION)
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

INSERT INTO `resource` VALUES ('1347048240677269503', '1346777766301888512', 'SHENYU.PLUGIN.BATCH.OPENED', '', '', '', 2, 3, '', 1, 0, 'system:authen:open', 1, '2022-05-25 18:02:53', '2022-05-25 18:02:53');
INSERT INTO `permission` VALUES ('1351007708748849151', '1346358560427216896', '1347048240677269503', '2022-05-25 18:02:53', '2022-05-25 18:02:53');
3 changes: 3 additions & 0 deletions db/upgrade/2.6.1-upgrade-2.7.0-og.sql
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ COMMENT ON COLUMN "public"."int_lock"."lock_key" IS 'lock_key';
COMMENT ON COLUMN "public"."int_lock"."region" IS 'region';
COMMENT ON COLUMN "public"."int_lock"."client_id" IS 'client_id';
COMMENT ON COLUMN "public"."int_lock"."created_date" IS 'created_date';

INSERT INTO "public"."resource" VALUES ('1347048240677269503', '1346777766301888512', 'SHENYU.PLUGIN.BATCH.OPENED', '', '', '', 2, 3, '', 1, 0, 'system:authen:open', 1, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."permission" VALUES ('1351007708748849151', '1346358560427216896', '1347048240677269503', '2022-05-25 18:08:01', '2022-05-25 18:08:01');
3 changes: 3 additions & 0 deletions db/upgrade/2.6.1-upgrade-2.7.0-oracle.sql
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ comment on column INT_LOCK.CLIENT_ID
is 'CLIENT_ID';
comment on column INT_LOCK.CREATED_DATE
is 'CREATED_DATE';

INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX("resource" (id)) */ INTO "resource" (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status) VALUES('1347048240677269503','1346777766301888512','SHENYU.PLUGIN.BATCH.OPENED','','','','2','3','','1','0','system:authen:open','1');
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, object_id, resource_id) VALUES ('1351007708748849151', '1346358560427216896', '1347048240677269503');
3 changes: 3 additions & 0 deletions db/upgrade/2.6.1-upgrade-2.7.0-pg.sql
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ COMMENT ON COLUMN "public"."int_lock"."lock_key" IS 'lock_key';
COMMENT ON COLUMN "public"."int_lock"."region" IS 'region';
COMMENT ON COLUMN "public"."int_lock"."client_id" IS 'client_id';
COMMENT ON COLUMN "public"."int_lock"."created_date" IS 'created_date';

INSERT INTO "public"."resource" VALUES ('1347048240677269503', '1346777766301888512', 'SHENYU.PLUGIN.BATCH.OPENED', '', '', '', 2, 3, '', 1, 0, 'system:authen:open', 1, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
INSERT INTO "public"."permission" VALUES ('1351007708748849151', '1346358560427216896', '1347048240677269503', '2022-05-25 18:08:01', '2022-05-25 18:08:01');
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@
*/
@RestApi("/appAuth")
public class AppAuthController implements PagedController<AppAuthQuery, AppAuthVO> {

private final AppAuthService appAuthService;

public AppAuthController(final AppAuthService appAuthService) {
this.appAuthService = appAuthService;
}

/**
* Apply App auth.
*
Expand All @@ -73,7 +73,7 @@ public ShenyuAdminResult apply(@Valid @RequestBody final AuthApplyDTO authApplyD
}
return appAuthService.applyCreate(authApplyDTO);
}

/**
* Update sk of App auth.
*
Expand All @@ -88,7 +88,7 @@ public ShenyuAdminResult updateSk(@RequestParam("appKey")
@RequestParam("appSecret") final String appSecret) {
return appAuthService.updateAppSecretByAppKey(appKey, appSecret);
}

/**
* Find App auth page by query.
*
Expand All @@ -110,7 +110,7 @@ public ShenyuAdminResult findPageByQuery(final String appKey, final String phone
CommonPager<AppAuthVO> commonPager = appAuthService.listByPage(query);
return ShenyuAdminResult.success(ShenyuResultMessage.QUERY_SUCCESS, commonPager);
}

/**
* Get detail of App auth.
*
Expand All @@ -124,7 +124,7 @@ public ShenyuAdminResult detail(@RequestParam("id")
provider = AppAuthMapper.class) final String id) {
return ShenyuAdminResult.success(ShenyuResultMessage.DETAIL_SUCCESS, appAuthService.findById(id));
}

/**
* Update App auth.
*
Expand All @@ -136,7 +136,7 @@ public ShenyuAdminResult detail(@RequestParam("id")
public ShenyuAdminResult updateDetail(@RequestBody @Valid final AppAuthDTO appAuthDTO) {
return appAuthService.updateDetail(appAuthDTO);
}

/**
* Detail path of App auth.
*
Expand All @@ -152,7 +152,7 @@ public ShenyuAdminResult detailPath(@RequestParam("id")
@NotBlank final String authId) {
return ShenyuAdminResult.success(ShenyuResultMessage.DETAIL_SUCCESS, appAuthService.detailPath(authId));
}

/**
* Update detail path.
*
Expand All @@ -164,7 +164,7 @@ public ShenyuAdminResult detailPath(@RequestParam("id")
public ShenyuAdminResult updateDetailPath(@RequestBody @Valid final AuthPathWarpDTO authPathWarpDTO) {
return appAuthService.updateDetailPath(authPathWarpDTO);
}

/**
* delete application authorities.
*
Expand All @@ -177,7 +177,7 @@ public ShenyuAdminResult batchDelete(@RequestBody @NotEmpty final List<@NotBlank
Integer deleteCount = appAuthService.delete(ids);
return ShenyuAdminResult.success(ShenyuResultMessage.DELETE_SUCCESS, deleteCount);
}

/**
* Batch enabled App auth.
*
Expand All @@ -193,7 +193,23 @@ public ShenyuAdminResult batchEnabled(@Valid @RequestBody final BatchCommonDTO b
}
return ShenyuAdminResult.success(ShenyuResultMessage.ENABLE_SUCCESS);
}


/**
* Batch opened App auth.
*
* @param batchCommonDTO the batch common dto
* @return the shenyu result
*/
@PostMapping("/batchOpened")
@RequiresPermissions("system:authen:open")
public ShenyuAdminResult batchOpended(@Valid @RequestBody final BatchCommonDTO batchCommonDTO) {
final String result = appAuthService.opened(batchCommonDTO.getIds(), batchCommonDTO.getEnabled());
if (StringUtils.isNoneBlank(result)) {
return ShenyuAdminResult.error(result);
}
return ShenyuAdminResult.success(ShenyuResultMessage.ENABLE_SUCCESS);
}

/**
* Sync App auth data.
*
Expand All @@ -204,7 +220,7 @@ public ShenyuAdminResult batchEnabled(@Valid @RequestBody final BatchCommonDTO b
public ShenyuAdminResult syncData() {
return appAuthService.syncData();
}

@Override
public PageService<AppAuthQuery, AppAuthVO> pageService() {
return appAuthService;
Expand Down
Loading

0 comments on commit d64f213

Please sign in to comment.