Commit f31e322c authored by yanzg's avatar yanzg

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

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