Commit 584c7470 authored by yanzg's avatar yanzg

压缩视频

parent ed48f327
...@@ -441,6 +441,7 @@ public class TableStruct { ...@@ -441,6 +441,7 @@ public class TableStruct {
* @return 生成的语句 * @return 生成的语句
*/ */
private SqlData releaseSqlUpdate() { private SqlData releaseSqlUpdate() {
TableFieldVo remove = this.getRemove();
// 生成添加的SQL语句 // 生成添加的SQL语句
String text = DaoConst.SQL_UPDATE.replace(DaoConst.CODE_TABLE, this.name); String text = DaoConst.SQL_UPDATE.replace(DaoConst.CODE_TABLE, this.name);
SqlData sql = new SqlData(DaoConst.UPDATE, text); SqlData sql = new SqlData(DaoConst.UPDATE, text);
...@@ -458,6 +459,12 @@ public class TableStruct { ...@@ -458,6 +459,12 @@ public class TableStruct {
DaoConst.CODE_FIELD, String.format(DaoConst.CODE_UPDATE_FIELD_PARA, field.name) DaoConst.CODE_FIELD, String.format(DaoConst.CODE_UPDATE_FIELD_PARA, field.name)
); );
} }
// 设置删除标记可以通过前台传入
if (remove != null) {
sql.addCode(remove.inputName, DaoConst.CODE_FIELD, String.format(DaoConst.CODE_UPDATE_FIELD_PARA, remove.name));
}
// 添加删除字段 // 添加删除字段
// addWhereRemove(sql); // addWhereRemove(sql);
addUpdateVersion(sql); addUpdateVersion(sql);
...@@ -474,14 +481,15 @@ public class TableStruct { ...@@ -474,14 +481,15 @@ public class TableStruct {
* @return 生成的语句 * @return 生成的语句
*/ */
private SqlData releaseSqlRemove() { private SqlData releaseSqlRemove() {
if (this.getRemove() != null) { TableFieldVo remove = this.getRemove();
if (remove != null) {
// 生成添加的SQL语句 // 生成添加的SQL语句
String text = DaoConst.SQL_UPDATE.replace(DaoConst.CODE_TABLE, this.name); String text = DaoConst.SQL_UPDATE.replace(DaoConst.CODE_TABLE, this.name);
SqlData sql = new SqlData(DaoConst.REMOVE, text); SqlData sql = new SqlData(DaoConst.REMOVE, text);
sql.setSqlType(DaoConst.SQL_TYPE_REMOVE); sql.setSqlType(DaoConst.SQL_TYPE_REMOVE);
// 设置删除字段标记 // 设置删除字段标记
sql.addCode(DaoConst.CODE_FIELD, String.format(DaoConst.CODE_UPDATE_FIELD_REMOVE, this.getRemove().name)); sql.addCode(DaoConst.CODE_FIELD, String.format(DaoConst.CODE_UPDATE_FIELD_REMOVE, remove.name));
// 设置删除时需要修改的字段的值 // 设置删除时需要修改的字段的值
for (TableFieldVo field : this.getFieldActionList(DaoConst.FIELD_REMOVE_UPDATE)) { for (TableFieldVo field : this.getFieldActionList(DaoConst.FIELD_REMOVE_UPDATE)) {
......
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