Commit 7d537779 authored by yanzg's avatar yanzg

常规BUG的修改

parent 8ddd11c1
...@@ -405,16 +405,14 @@ public class TableStruct { ...@@ -405,16 +405,14 @@ public class TableStruct {
* @return * @return
*/ */
private SqlData releaseSqlRemove() { private SqlData releaseSqlRemove() {
TableFieldVo removeField = this.getRemove(); if (this.getRemove() != null) {
TableFieldVo versionField = this.getVersion();
if (removeField != null) {
// 生成添加的SQL语句 // 生成添加的SQL语句
String text = DaoConst.UPDATE_MODEL.replace(DaoConst.TABLE_CODE, this.name); String text = DaoConst.UPDATE_MODEL.replace(DaoConst.TABLE_CODE, this.name);
SqlData sql = new SqlData(DaoConst.REMOVE, text); SqlData sql = new SqlData(DaoConst.REMOVE, text);
sql.setSqlType(DaoConst.SQL_TYPE_REMOVE); sql.setSqlType(DaoConst.SQL_TYPE_REMOVE);
// 设置删除字段标记 // 设置删除字段标记
sql.addCode(DaoConst.FIELD_CODE, String.format(DaoConst.CODE_UPDATE_FIELD_REMOVE, removeField.name)); sql.addCode(DaoConst.FIELD_CODE, String.format(DaoConst.CODE_UPDATE_FIELD_REMOVE, this.getRemove().name));
// 设置删除时需要修改的字段的值 // 设置删除时需要修改的字段的值
for (TableFieldVo field : this.getFieldActionList(DaoConst.FIELD_REMOVE_UPDATE)) { for (TableFieldVo field : this.getFieldActionList(DaoConst.FIELD_REMOVE_UPDATE)) {
......
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