Commit cbc824d5 authored by yanzg's avatar yanzg

压缩视频

parent 69b4c718
......@@ -362,7 +362,14 @@ public class TableStruct {
public void init(TableSqlCache table) {
table.setTable(this);
if (!StringHelper.isEmpty(this.name)) {
table.add(releaseSqlReplace(), releaseSqlCreate(), releaseSqlUpdate(), releaseSqlRemove(), releaseSqlLoad());
table.add(
releaseSqlReplace(),
releaseSqlCreate(),
releaseSqlUpdate(),
releaseSqlRemove(),
releaseSqlLoad(),
releaseSqlQuery()
);
}
initSaveWith(table);
initAddGroup(table);
......@@ -511,22 +518,36 @@ public class TableStruct {
}
}
/**
* 生成加载的SQL语句
*
* @return 生成的语句
*/
private SqlData releaseSqlLoad() {
private SqlData releaseSqlQuery(String sqlName, int sqlType) {
// 生成添加的SQL语句
String text = DaoConst.SQL_LOAD.replace(DaoConst.CODE_TABLE, this.name);
SqlData sql = new SqlData(DaoConst.LOAD, text);
SqlData sql = new SqlData(sqlName, text);
sql.addParaConst(DaoConst.CODE_FIELD_DEFAULT_NAME, DaoConst.CODE_FIELD, DaoConst.CODE_FIELD_DEFAULT);
sql.setSqlType(DaoConst.SQL_TYPE_LOAD);
sql.setSqlType(sqlType);
// 生成加载语句的WHERE条件
addWhereField(sql, DaoConst.CODE_TAG, false);
return sql;
}
/**
* 生成加载的SQL语句
*
* @return 生成的语句
*/
private SqlData releaseSqlLoad() {
return releaseSqlQuery(DaoConst.LOAD, DaoConst.SQL_TYPE_LOAD);
}
/**
* 生成查询语句
*
* @return
*/
private SqlData releaseSqlQuery() {
return releaseSqlQuery(DaoConst.QUERY, DaoConst.SQL_TYPE_COMMON);
}
/**
* 当前当前表所有字段的等于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