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

model layer大小写问题

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