应用管理

This commit is contained in:
liulu
2024-11-01 15:51:47 +08:00
parent b5df4c2406
commit c82f7d8013
12 changed files with 296 additions and 42 deletions
@@ -62,6 +62,20 @@ public class ApplicationController {
return R.data(String.valueOf(id));
}
/**
* 修改应用
*
* @param update 参数
* @return 应用
*/
@PutMapping
@AuditControllerLog(description = "修改应用", operateType = AuditLogConst.UPDATE)
public R<Void> update(@Valid @RequestBody AppSave update) {
Assert.notNull(update.getId(), "应用id不能为空");
applicationService.update(update);
return R.ok();
}
/**
* 启用应用
*
@@ -91,18 +105,20 @@ public class ApplicationController {
}
/**
* 修改应用
* 更新访问凭证
*
* @param update 参数
* @return 应用
* @param id 应用id
* @return
*/
@PutMapping
public R<Void> update(@Valid @RequestBody AppSave update) {
Assert.notNull(update.getId(), "应用id不能为空");
applicationService.update(update);
@PostMapping("/reset/credential")
@AuditControllerLog(description = "更新访问凭证", operateType = AuditLogConst.UPDATE)
public R<Void> resetCredential(Long id) {
Assert.notNull(id, "应用id不能为空");
applicationService.resetCredential(id);
return R.ok();
}
/**
* 删除应用
*