Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/src/main/resources/sql/mysql/update_all_tables_ddl.sql
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@ ALTER TABLE t_platform_history MODIFY tenant_id varchar(60) NULL;
ALTER TABLE t_task_record MODIFY tenant_id varchar(60) NULL;
ALTER TABLE t_user MODIFY tenant_id varchar(60) NULL;

ALTER TABLE t_component_library ADD app_id int NULL;

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.validation.Valid;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
Expand Down Expand Up @@ -115,7 +114,7 @@ public Result<Page> getPageById(@PathVariable Integer id) throws Exception {
/**
* 创建页面
*
* @param page the page
* @param request the request
* @return result
* @throws Exception the exception
*/
Expand All @@ -128,7 +127,8 @@ public Result<Page> getPageById(@PathVariable Integer id) throws Exception {
})
@SystemControllerLog(description = "创建页面")
@PostMapping("/pages/create")
public Result<Page> createPage(@Valid @RequestBody Page page) throws Exception {
public Result<Page> createPage(HttpServletRequest request) throws IOException {
Page page = JsonUtils.decode(request.getInputStream(), Page.class);
if (page.getIsPage()) {
// 创建页面
return pageService.createPage(page);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public class Component extends BaseEntity {
private Map<String, String> name;

@Schema(name = "component", description = "组件")
@TableField(value = "name_en")
private String component;

@Schema(name = "icon", description = "组件图标")
Expand Down Expand Up @@ -75,6 +76,7 @@ public class Component extends BaseEntity {
private Map<String, Object> npm;

@Schema(name = "group", description = "分组")
@TableField(value = "`group`")
private String group;

@Schema(name = "category", description = "分类")
Expand All @@ -98,9 +100,11 @@ public class Component extends BaseEntity {

@JsonProperty("public")
@Schema(name = "public", description = "公开状态:0,1,2")
@TableField(value = "public")
private Integer publicStatus;

@Schema(name = "framework", description = "技术栈")
@TableField(value = "framework")
private String framework;

@Schema(name = "isOfficial", description = "标识官方组件")
Expand All @@ -110,6 +114,7 @@ public class Component extends BaseEntity {
private Boolean isDefault;

@Schema(name = "isTinyReserved", description = "是否tiny自有")
@TableField(value = "tiny_reserved")
private Boolean isTinyReserved;

@JsonProperty("component_metadata")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ public class ComponentLibrary extends BaseEntity {
private String name;

@Schema(name = "appId", description = "关联应用id")
@TableField(value = "app_id")
private Integer appId;

@JsonProperty("package")
@Schema(name = "package", description = "包名")
@TableField(value = "package")
private String packageName;

@Schema(name = "registry", description = "注册")
Expand Down Expand Up @@ -82,17 +84,22 @@ public class ComponentLibrary extends BaseEntity {

@JsonProperty("public")
@Schema(name = "public", description = "公开状态:0,1,2")
@TableField(value = "public")
private Integer publicStatus;

@Schema(name = "isStarted", description = "标识启用")
@TableField(value = "is_started")
private Boolean isStarted;

@Schema(name = "isOfficial", description = "标识官方组件")
@TableField(value = "is_official")
private Boolean isOfficial;

@Schema(name = "isDefault", description = "标识默认组件")
@TableField(value = "is_default")
private Boolean isDefault;

@Schema(name = "components", description = "组件库组件")
@TableField(exist = false)
private List<Component> components;
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@ public class PageHistory {
private String name;

@Schema(name = "page", description = "关联page表Id")
@TableField(value = "ref_id")
private Integer page;

@Schema(name = "version", description = "版本")
private String version;

@Schema(name = "app", description = "关联app表Id")
@TableField(value = "app_id")
private Integer app;

@Schema(name = "route", description = "页面路由")
Expand All @@ -74,6 +76,7 @@ public class PageHistory {
@Schema(name = "parentId", description = "父文件夹id")
private String parentId;

@TableField(value = "`group`")
private String group;

@Schema(name = "depth", description = "*页面/文件夹深度,更改层级时服务端校验用(校验可有可无)*")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
public class Tenant {
@Schema(name = "id", description = "主键id")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private String id;

@Schema(name = "nameCn", description = "组织唯一代码")
private String orgCode;
Expand Down
Loading
Loading