增加权限码
This commit is contained in:
@@ -39,6 +39,7 @@ public class KeyManageController {
|
||||
* @return 分页列表
|
||||
*/
|
||||
@PostMapping("/pageList")
|
||||
@AuthCode(AuthCodeConst.key_list)
|
||||
public R<Page<KeyInfoResp>> queryPageList(@RequestBody KeyInfoQuery query) {
|
||||
Page<KeyInfoResp> page = keyManageService.queryPageList(query);
|
||||
return R.data(page);
|
||||
@@ -51,6 +52,7 @@ public class KeyManageController {
|
||||
* @return 分页列表
|
||||
*/
|
||||
@PostMapping("/info")
|
||||
@AuthCode(AuthCodeConst.key_info)
|
||||
public R<KeyInfoResp> queryInfo(@RequestBody Long id) {
|
||||
Assert.notNull(id, "密钥id不能为空");
|
||||
KeyInfoResp resp = keyManageService.queryInfo(id);
|
||||
@@ -63,6 +65,7 @@ public class KeyManageController {
|
||||
* @return id
|
||||
*/
|
||||
@PostMapping("/gen")
|
||||
@AuthCode(AuthCodeConst.key_create)
|
||||
public R<Long> save(@Valid @RequestBody KeyCreateReq req) {
|
||||
Long id = keyManageService.create(req);
|
||||
return R.data(id);
|
||||
@@ -75,6 +78,7 @@ public class KeyManageController {
|
||||
* @return id
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
@AuthCode(AuthCodeConst.key_update)
|
||||
public R<Void> update(@Valid @RequestBody KeyUpdateReq req) {
|
||||
keyManageService.update(req);
|
||||
return R.ok();
|
||||
@@ -100,6 +104,7 @@ public class KeyManageController {
|
||||
* @return id
|
||||
*/
|
||||
@PostMapping("/disable")
|
||||
@AuthCode(AuthCodeConst.key_disable)
|
||||
public R<Void> disableKey(@Valid @RequestBody KeyManageReq req) {
|
||||
keyManageService.disableKey(req.getIds());
|
||||
return R.ok();
|
||||
@@ -112,6 +117,7 @@ public class KeyManageController {
|
||||
* @return id
|
||||
*/
|
||||
@PostMapping("/archive")
|
||||
@AuthCode(AuthCodeConst.key_archive)
|
||||
public R<Void> archiveKey(@Valid @RequestBody KeyManageReq req) {
|
||||
keyManageService.archiveKey(req.getIds());
|
||||
return R.ok();
|
||||
@@ -124,6 +130,7 @@ public class KeyManageController {
|
||||
* @return id
|
||||
*/
|
||||
@PostMapping("/destroy")
|
||||
@AuthCode(AuthCodeConst.key_destroy)
|
||||
public R<Void> destroyKey(@Valid @RequestBody KeyManageReq req) {
|
||||
keyManageService.destroyKey(req.getIds());
|
||||
return R.ok();
|
||||
|
||||
Reference in New Issue
Block a user