Commit c97fcc31 authored by yanzg's avatar yanzg

压缩视频

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