This commit is contained in:
haoxr
2024-11-19 08:21:15 +08:00
4 changed files with 7 additions and 7 deletions

View File

@@ -34,7 +34,7 @@ CREATE TABLE `sys_config` (
`create_by` bigint NOT NULL COMMENT '创建人ID', `create_by` bigint NOT NULL COMMENT '创建人ID',
`update_time` datetime DEFAULT NULL COMMENT '更新时间', `update_time` datetime DEFAULT NULL COMMENT '更新时间',
`update_by` bigint DEFAULT NULL COMMENT '更新人ID', `update_by` bigint DEFAULT NULL COMMENT '更新人ID',
`is_deleted` tinyint(1) NOT NULL COMMENT '逻辑删除标识(0-未删除 1-已删除)', `is_deleted` tinyint(4) NOT NULL DEFAULT '0' COMMENT '逻辑删除标识(0-未删除 1-已删除)',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT='系统配置'; ) ENGINE=InnoDB COMMENT='系统配置';

View File

@@ -473,7 +473,7 @@
`create_by` bigint COMMENT '创建人ID', `create_by` bigint COMMENT '创建人ID',
`update_time` datetime DEFAULT NULL COMMENT '更新时间', `update_time` datetime DEFAULT NULL COMMENT '更新时间',
`update_by` bigint DEFAULT NULL COMMENT '更新人ID', `update_by` bigint DEFAULT NULL COMMENT '更新人ID',
`is_deleted` tinyint(4) NOT NULL COMMENT '逻辑删除标识(0-未删除 1-已删除)', `is_deleted` tinyint(4) DEFAULT '0' NOT NULL COMMENT '逻辑删除标识(0-未删除 1-已删除)',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT='系统配置表'; ) ENGINE=InnoDB COMMENT='系统配置表';

View File

@@ -32,8 +32,8 @@ public class ConfigController {
private final ConfigService configService; private final ConfigService configService;
@GetMapping("/page")
@Operation(summary = "系统配置分页列表") @Operation(summary = "系统配置分页列表")
@GetMapping("/page")
@PreAuthorize("@ss.hasPerm('sys:config:query')") @PreAuthorize("@ss.hasPerm('sys:config:query')")
public PageResult<ConfigVO> page(@ParameterObject ConfigPageQuery configPageQuery) { public PageResult<ConfigVO> page(@ParameterObject ConfigPageQuery configPageQuery) {
IPage<ConfigVO> result = configService.page(configPageQuery); IPage<ConfigVO> result = configService.page(configPageQuery);
@@ -57,21 +57,21 @@ public class ConfigController {
} }
@Operation(summary = "刷新系统配置缓存") @Operation(summary = "刷新系统配置缓存")
@PatchMapping @PutMapping(value = "/refresh")
@PreAuthorize("@ss.hasPerm('sys:config:refresh')") @PreAuthorize("@ss.hasPerm('sys:config:refresh')")
public Result<ConfigForm> refreshCache() { public Result<ConfigForm> refreshCache() {
return Result.judge(configService.refreshCache()); return Result.judge(configService.refreshCache());
} }
@PutMapping(value = "/{id}")
@Operation(summary = "修改系统配置") @Operation(summary = "修改系统配置")
@PutMapping(value = "/{id}")
@PreAuthorize("@ss.hasPerm('sys:config:update')") @PreAuthorize("@ss.hasPerm('sys:config:update')")
public Result<?> update(@Valid @PathVariable Long id, @RequestBody ConfigForm configForm) { public Result<?> update(@Valid @PathVariable Long id, @RequestBody ConfigForm configForm) {
return Result.judge(configService.edit(id, configForm)); return Result.judge(configService.edit(id, configForm));
} }
@DeleteMapping("/{id}")
@Operation(summary = "删除系统配置") @Operation(summary = "删除系统配置")
@DeleteMapping("/{id}")
@PreAuthorize("@ss.hasPerm('sys:config:delete')") @PreAuthorize("@ss.hasPerm('sys:config:delete')")
public Result<?> delete(@PathVariable Long id) { public Result<?> delete(@PathVariable Long id) {
return Result.judge(configService.delete(id)); return Result.judge(configService.delete(id));

View File

@@ -47,7 +47,7 @@ public class UserPageVO {
private String roleNames; private String roleNames;
@Schema(description="创建时间") @Schema(description="创建时间")
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy/MM/dd HH:mm")
private Date createTime; private Date createTime;
} }