Commit c97fcc31 authored by yanzg's avatar yanzg

压缩视频

parent c28c17f4
...@@ -275,11 +275,11 @@ public class TableSqlCache { ...@@ -275,11 +275,11 @@ public class TableSqlCache {
/** /**
* 生成该字段值是否存在的SQL语句 * 生成该字段值是否存在的SQL语句
* *
* @param sqlName SQL语句名称 * @param sqlName SQL语句名称
* @param fields 字段 * @param allowNullField 允许为空字段
*/ */
public void addExist(String sqlName, String... fields) { public void addExist(String sqlName, String... allowNullField) {
this.addExist(sqlName, null, new TableFieldString(fields)); this.addExist(sqlName, null, new TableFieldString(allowNullField));
} }
/** /**
......
...@@ -695,18 +695,24 @@ public class TableStruct { ...@@ -695,18 +695,24 @@ public class TableStruct {
String.format(DaoConst.CODE_WHERE_NOT_EQUALS_PARA, this.getKey().name) String.format(DaoConst.CODE_WHERE_NOT_EQUALS_PARA, this.getKey().name)
); );
for (String fieldName : mustField.getFields()) { // 必须判断的字段
TableFieldVo field = this.getField(fieldName); if (mustField != null && mustField.getFields() != null) {
sql.addConst(field.inputName, for (String fieldName : mustField.getFields()) {
String.format(DaoConst.CODE_WHERE_EQUALS_PARA, field.name) TableFieldVo field = this.getField(fieldName);
); sql.addConst(field.inputName,
String.format(DaoConst.CODE_WHERE_EQUALS_PARA, field.name)
);
}
} }
for (String fieldName : allowNullField.getFields()) { // 允许空值的字段
TableFieldVo field = this.getField(fieldName); if (allowNullField != null && allowNullField.getFields() != null) {
sql.addConst(field.inputName, for (String fieldName : allowNullField.getFields()) {
String.format(DaoConst.CODE_WHERE_EQUALS_NOT_EMPTY_PARA, field.name) TableFieldVo field = this.getField(fieldName);
); sql.addConst(field.inputName,
String.format(DaoConst.CODE_WHERE_EQUALS_NOT_EMPTY_PARA, field.name)
);
}
} }
addWhereRemove(sql); addWhereRemove(sql);
sqlTableData.add(sql); sqlTableData.add(sql);
......
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