Commit f31e322c authored by yanzg's avatar yanzg

1.3版本修改,增加删除功能

parent ac95193f
...@@ -479,10 +479,13 @@ public class SqlData { ...@@ -479,10 +479,13 @@ public class SqlData {
* @return * @return
*/ */
public SqlData removeField(SqlCond sqlCond) { public SqlData removeField(SqlCond sqlCond) {
SqlDataField field = this.getField(sqlCond); SqlDataField field;
if (field != null) { do {
this.sqlDataFields.remove(field); field = this.getField(sqlCond);
} if (field != null) {
this.sqlDataFields.remove(field);
}
} while (field != null);
return this; return this;
} }
......
...@@ -675,8 +675,7 @@ public class TableStruct { ...@@ -675,8 +675,7 @@ public class TableStruct {
sql.addPara(new SqlCondEquals(remove.inputName + OLD_FLAG, 0, 1, 2), sql.addPara(new SqlCondEquals(remove.inputName + OLD_FLAG, 0, 1, 2),
CODE_WHERE, CODE_WHERE,
String.format(CODE_WHERE_EQUALS_NOT_REMOVE, this.getRemove().name) String.format(CODE_WHERE_EQUALS_NOT_REMOVE, this.getRemove().name)
); ).addPara(new SqlCondEquals(remove.inputName + OLD_FLAG, 3),
sql.addPara(new SqlCondEquals(remove.inputName + OLD_FLAG, 3),
CODE_WHERE, CODE_WHERE,
String.format(CODE_WHERE_REMOVE, this.getRemove().name) String.format(CODE_WHERE_REMOVE, this.getRemove().name)
); );
......
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