Commit 2ad34e83 authored by yanzg's avatar yanzg

修改实体位置

parent 30b3ccf2
......@@ -670,7 +670,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
if (this.table.getTable().getKeyType() == String.class) {
this.setKeyString(model, md5);
}
return md5Field;
return md5;
}
/**
......
......@@ -414,9 +414,6 @@ public class TableStruct {
*/
private void initAddGroup(TableSqlCache table) {
List<TableFieldVo> addGroupField = getFieldActionList(DaoConst.FIELD_ADD_GROUP);
if (addGroupField == null || addGroupField.isEmpty()) {
return;
}
List<TableFieldVo> commonField = this.getGroupLatitudeFields();
this.addGroupSql(table, commonField, addGroupField);
}
......@@ -756,13 +753,17 @@ public class TableStruct {
* @param updateFields 需要增加的值的字段
*/
private void addGroupSql(TableSqlCache sqlTableData, List<TableFieldVo> whereFields, List<TableFieldVo> updateFields) {
List<TableFieldVo> prmaryKey = this.getFieldActionList(DaoConst.FIELD_PRIMARY);
SqlData sqlLoad = this.releaseSql(DaoConst.SQL_TYPE_ADD_GROUP, DaoConst.GROUP_QUERY, DaoConst.SQL_LOAD,
StringHelper.EMPTY, new ArrayList<>(), whereFields);
sqlLoad.addParaConst(DaoConst.CODE_FIELD_DEFAULT_NAME, DaoConst.CODE_FIELD, DaoConst.CODE_FIELD_DEFAULT);
SqlData sqlGroupAdd = this.releaseSql(DaoConst.SQL_TYPE_ADD_GROUP, DaoConst.GROUP_ADD, DaoConst.SQL_UPDATE,
DaoConst.CODE_GROUP_ADD, updateFields, prmaryKey);
if (updateFields.isEmpty()) {
sqlGroupAdd.addCode(DaoConst.CODE_FIELD, String.format("%s=%s", prmaryKey.get(0).inputName, prmaryKey.get(0).inputName));
}
sqlTableData.add(sqlLoad);
sqlTableData.add(this.releaseSql(DaoConst.SQL_TYPE_ADD_GROUP, DaoConst.GROUP_ADD, DaoConst.SQL_UPDATE,
DaoConst.CODE_GROUP_ADD, updateFields, this.getFieldActionList(DaoConst.FIELD_PRIMARY)));
sqlTableData.add(sqlGroupAdd);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment