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
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ create table `t_app`
`id` int not null auto_increment comment '主键id',
`name` varchar(255) not null comment '应用名称',
`platform_id` int not null comment '关联设计器id',
`platform_history_id` int not null comment '关联设计器历史版本id',
`platform_history_id` int comment '关联设计器历史版本id',
`publish_url` varchar(255) comment '应用静态资源托管地址',
`editor_url` varchar(255) comment '设计器地址',
`visit_url` varchar(255) comment '访问地址',
Expand Down
14 changes: 9 additions & 5 deletions base/src/main/java/com/tinyengine/it/model/entity/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
import lombok.Setter;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

Expand All @@ -47,6 +49,7 @@ public class App extends BaseEntity {
private String appWebsite;

@Schema(name = "platformId", description = "设计器id")
@JsonProperty("platform")
private Integer platformId;

@Schema(name = "platformHistoryId", description = "关联设计器的历史版本ID")
Expand All @@ -62,6 +65,7 @@ public class App extends BaseEntity {
private String visitUrl;

@Schema(name = "imageUrl", description = "封面图地址")
@JsonProperty("image_url")
private String imageUrl;

@Schema(name = "assetsUrl", description = "应用资源url")
Expand All @@ -82,14 +86,14 @@ public class App extends BaseEntity {

@Schema(name = "config", description = "*设计预留字段*")
@TableField(typeHandler = MapTypeHandler.class)
private Map<String, Object> config;
private Map<String, Object> config = new HashMap<>();

@Schema(name = "constants", description = "*设计预留字段*")
private String constants;

@Schema(name = "dataHandler", description = "数据源的拦截器")
@TableField(typeHandler = MapTypeHandler.class)
private Map<String, Object> dataHandler;
private Map<String, Object> dataHandler = new HashMap<>();

@Schema(name = "description", description = "描述")
private String description;
Expand Down Expand Up @@ -130,14 +134,14 @@ public class App extends BaseEntity {
@Schema(name = "globalState", description = "应用全局状态")
@JsonProperty("global_state")
@TableField(typeHandler = ListTypeHandler.class)
private List<Map<String, Object>> globalState;
private List<Map<String, Object>> globalState = new ArrayList<>();

@Schema(name = "defaultLang", description = "默认语言")
private String defaultLang;

@Schema(name = "extendConfig", description = "应用扩展config")
@TableField(typeHandler = MapTypeHandler.class)
private Map<String, Object> extendConfig;
private Map<String, Object> extendConfig = new HashMap<>();

@Schema(name = "dataHash", description = "应用内容哈希值")
private String dataHash;
Expand All @@ -148,5 +152,5 @@ public class App extends BaseEntity {
@Schema(name = "dataSourceGlobal", description = "数据源全局配置")
@JsonProperty("data_source_global")
@TableField(typeHandler = MapTypeHandler.class)
private Map<String, Object> dataSourceGlobal;
private Map<String, Object> dataSourceGlobal = new HashMap<>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ public Result<App> createApp(App app) {
if (!appResult.isEmpty()) {
return Result.failed(ExceptionEnum.CM003);
}
app.setIsPublish(false);
int result = appMapper.createApp(app);
if (result < 1) {
return Result.failed(ExceptionEnum.CM001);
Expand Down
Loading