提交 8db54f1d authored 作者: ww1xhqc's avatar ww1xhqc

model layer大小写问题

上级 edd6ace4
......@@ -51,7 +51,7 @@ public class ModelController {
throwables.printStackTrace();
}
return ResultUtil.success(tableInfos);
return ResultUtil.success(tableInfos,"");
}
/**
......@@ -65,9 +65,9 @@ public class ModelController {
@GetMapping("/getAllField")
public ResponseEntity getFields(String tableName) {
if (tableName != null && tableName != "") {
return ResultUtil.failed("没有表名");
return ResultUtil.failed("表名不存在");
}
return ResultUtil.success(modelService.showModelFields(tableName));
return ResultUtil.success(modelService.showModelFields(tableName),"");
}
/**
......@@ -90,7 +90,7 @@ public class ModelController {
}
modelService.NewTable(tableVO);
return ResultUtil.success("新建成功");
return ResultUtil.success("新建成功","");
}
......@@ -106,7 +106,7 @@ public class ModelController {
@PostMapping("/insertValues")
public ResponseEntity insertValues(@RequestBody Map<String, Object> map) {
modelService.putValueByEntityName(map);
return ResultUtil.success("数据插入成功");
return ResultUtil.success("数据插入成功","");
}
......
......@@ -22,20 +22,20 @@ public class ColumnInfo {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private long Id;
private long id;
@Column(name = "name")
private String Name;
private String name;
@Column(name = "cn_name")
private String CnName;
private String cnName;
@Column(name = "type")
private String Type;
private String type;
@Column(name = "length")
private int Length;
private int length;
@Column(name = "db_name")
private String DbName;
private String dbName;
@Column(name = "db_id")
private Long DbId;
private Long dbId;
......
package com.tykj.workflowcore.model_layer.model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class QueryCondition {
private String name;
private String type;
private String value;
}
......@@ -31,23 +31,24 @@ public class TableInfo implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private long Id;
private long id;
@Column(nullable = false,name = "name")
private String Name;
private String name;
@Column(nullable = false,name = "cn_name")
private String CnName;
private String cnName;
@Column(name = "description")
private String Desc;
private String desc;
//0是扫描,1是自建
@Column(name = "type")
private String Type;
private Integer type;
@Column(name = "reviser")
private String Reviser;
private String reviser;
@Lob
@Column(name = "xml",columnDefinition="TEXT")
private String XML;
......
......@@ -89,10 +89,9 @@ public class ModelImpl implements ModelService {
public List<ColumnInfo> showModelFields(String TableName) {
Specification specification = (Specification) (root, criteriaQuery, criteriaBuilder) -> {
Path db_name = root.get("DbName");
Path db_name = root.get("dbName");
Predicate equal = criteriaBuilder.equal(db_name, TableName);
return equal;
};
List<ColumnInfo> all = columnInfoDao.findAll(specification);
return all;
......@@ -139,6 +138,7 @@ public class ModelImpl implements ModelService {
tableInfo.setCnName(tableVO.getModelTitle());
tableInfo.setXML(XML_MAPPING);
tableInfo.setType(2);
tableInfoDao.save(tableInfo);
......@@ -301,6 +301,7 @@ public class ModelImpl implements ModelService {
tableInfo.setName(tableVO.getModelName());
tableInfo.setCnName(tableVO.getModelTitle());
tableInfo.setXML(xml);
tableInfo.setType(0);
if (checkRepeat(realName)){
tableInfo = tableInfoDao.save(tableInfo);
......
package com.tykj.workflowcore.model_layer.utils;
import com.tykj.workflowcore.model_layer.model.QueryCondition;
import java.util.List;
import java.util.Objects;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论