feat(system): 添加配置项软删除标识并优化通知公告接口
- 在创建配置项时添加软删除标识,避免直接物理删除 - 合并通知公告发布和撤回接口的映射方式,简化接口设计
This commit is contained in:
@@ -83,8 +83,7 @@ public class NoticeController {
|
||||
}
|
||||
|
||||
@Operation(summary = "发布通知公告")
|
||||
@PatchMapping(value = "/{id}/publish")
|
||||
@PutMapping(value = "/{id}/publish")
|
||||
@RequestMapping(value="/{id}/publish",method = {RequestMethod.PUT,RequestMethod.PATCH})
|
||||
@PreAuthorize("@ss.hasPerm('sys:notice:publish')")
|
||||
public Result<Void> publishNotice(
|
||||
@Parameter(description = "通知公告ID") @PathVariable Long id
|
||||
@@ -94,8 +93,7 @@ public class NoticeController {
|
||||
}
|
||||
|
||||
@Operation(summary = "撤回通知公告")
|
||||
@PutMapping(value = "/{id}/revoke")
|
||||
@PatchMapping(value = "/{id}/revoke")
|
||||
@RequestMapping(value="/{id}/revoke",method = {RequestMethod.PUT,RequestMethod.PATCH})
|
||||
@PreAuthorize("@ss.hasPerm('sys:notice:revoke')")
|
||||
public Result<Void> revokeNotice(
|
||||
@Parameter(description = "通知公告ID") @PathVariable Long id
|
||||
|
||||
@@ -83,6 +83,7 @@ public class ConfigServiceImpl extends ServiceImpl<ConfigMapper, Config> impleme
|
||||
"配置键已存在");
|
||||
Config config = configConverter.toEntity(configForm);
|
||||
config.setCreateBy(SecurityUtils.getUserId());
|
||||
config.setIsDeleted(0);
|
||||
return this.save(config);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user