提交 5afab766 authored 作者: ww1xhqc's avatar ww1xhqc

[数据模型] 字段修改和更新方法添加

上级 f980ee6e
......@@ -30,7 +30,7 @@ import java.util.Map;
*/
@RestController
@RequestMapping("/model")
@Api("数据模型层接口")
@Api(tags = "数据模型层接口")
public class ModelController {
@Autowired
......@@ -82,7 +82,7 @@ public class ModelController {
public ResponseEntity addModel(@RequestBody TableVO tableVO) throws Exception {
List<TableInfo> tableInfos = modelService.listAllEntities();
for (TableInfo tableInfo : tableInfos) {
if (tableVO.getModelName().equals(tableInfo.getName())) {
if (tableVO.getModelName().equals(tableInfo.getModelName())) {
return ResultUtil.failed("表已经存在!");
}
}
......@@ -142,7 +142,7 @@ public class ModelController {
throwables.printStackTrace();
}
for (TableInfo tableInfo : tableInfos) {
if (tableName.equals(tableInfo.getName())) {
if (tableName.equals(tableInfo.getModelName())) {
return ResultUtil.failed("表已经存在!");
}
}
......
......@@ -31,13 +31,13 @@ public class ColumnInfo extends BaseEntity {
private Integer primaryKey;
@ApiModelProperty("列名")
private String name;
private String fieldName;
@ApiModelProperty("列名中文描述")
private String cnName;
private String fieldTitle;
@ApiModelProperty("列类型")
private String type;
private String fieldType;
@ApiModelProperty("长度")
private Integer length;
private Integer fieldLength;
@ApiModelProperty("所属表名")
private String dbName;
@ApiModelProperty("所属表id")
......
......@@ -30,10 +30,10 @@ public class TableInfo extends BaseEntity implements Serializable {
@ApiModelProperty("表名,不能为空")
@Column(nullable = false)
private String name;
private String modelName;
@ApiModelProperty("表中文名,不能为空")
@Column(nullable = false)
private String cnName;
private String modelTitle;
@ApiModelProperty("详细描述")
private String description;
......
......@@ -22,7 +22,7 @@ public class ColumnVO {
@ApiModelProperty("字段名")
private String fieldName;
@ApiModelProperty("中文描述")
private String fieldDescription;
private String fieldTitle;
@ApiModelProperty("字段长度,有默认值")
private Integer fieldLength;
......
......@@ -19,9 +19,9 @@ public class SearchTableInfoVo extends JpaCustomPage {
private Integer id;
private String tableName;
private String modelName;
private String tableCnName;
private String modelTitle;
private Integer modelType;
}
......@@ -19,15 +19,15 @@ public class ClassTypeLength {
if (STRING.equals(genericType)){
columnInfo.setLength(255);
columnInfo.setFieldLength(255);
} else if (Integer.equals(genericType)) {
columnInfo.setLength(11);
columnInfo.setFieldLength(11);
} else if (Double.equals(genericType)) {
columnInfo.setLength(10);
columnInfo.setFieldLength(10);
}
else {
columnInfo.setLength(0);
columnInfo.setFieldLength(0);
}
}
}
package com.tykj.workflowcore.workflow_editer.service;
import com.tykj.workflowcore.workflow_editer.entity.VariableStorage;
import com.tykj.workflowcore.workflow_editer.entity.vo.SearchVariableStorageVo;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.RequestBody;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论