mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
添加字段
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -54,6 +54,7 @@ public class ResourceService extends BaseService<ResourceEntity, ResourceReposit
|
||||
ResourceEntity entity = mapper.toEntity(request);
|
||||
|
||||
|
||||
|
||||
this.repository.save(entity);
|
||||
return getById(entity.getId());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user