添加字段

This commit is contained in:
2023-08-26 22:33:50 +08:00
parent b1bde50f9c
commit 7eefb3b683
5 changed files with 60 additions and 0 deletions

View File

@@ -30,4 +30,18 @@ public class CreateResourceDto extends CommonDto {
@Comment("匿名用户可以访问")
private Boolean anonymous;
@Comment("图标")
private String icon;
@Comment("是否可见")
private Boolean visible;
@Comment("其他数据")
private String metadata;
}

View File

@@ -29,4 +29,17 @@ public class ResourceDto extends CommonDto {
@Comment("匿名用户可以访问")
private Boolean anonymous;
@Comment("图标")
private String icon;
@Comment("是否可见")
private Boolean visible;
@Comment("其他数据")
private String metadata;
}

View File

@@ -27,4 +27,18 @@ public class UpdateResourceDto extends CommonDto {
@Comment("匿名用户可以访问")
private Boolean anonymous;
@Comment("图标")
private String icon;
@Comment("是否可见")
private Boolean visible;
@Comment("其他数据")
private String metadata;
}

View File

@@ -49,6 +49,24 @@ public class ResourceEntity extends CommonEntity {
private Boolean anonymous = false;
@Comment("图标")
private String icon;
@Comment("是否可见")
private Boolean visible;
@Comment("其他数据")
private String metadata;
public void addChildren(ResourceEntity newRs) {
// log.info("addChildren1 {} {}", this.getUrl(), newRs.getUrl());

View File

@@ -54,6 +54,7 @@ public class ResourceService extends BaseService<ResourceEntity, ResourceReposit
ResourceEntity entity = mapper.toEntity(request);
this.repository.save(entity);
return getById(entity.getId());