fix 代码生成编辑表前端排序bug
This commit is contained in:
@@ -64,31 +64,26 @@ namespace ZR.Repository.System
|
||||
/// <returns></returns>
|
||||
public int UpdateGenTableColumn(List<GenTableColumn> tableColumn)
|
||||
{
|
||||
foreach (var item in tableColumn)
|
||||
{
|
||||
Context.Updateable<GenTableColumn>()
|
||||
.Where(f => f.TableId == item.TableId)
|
||||
.SetColumns(it => new GenTableColumn()
|
||||
{
|
||||
ColumnComment = item.ColumnComment,
|
||||
CsharpField = item.CsharpField,
|
||||
CsharpType = item.CsharpType,
|
||||
IsQuery = item.IsQuery,
|
||||
IsEdit = item.IsEdit,
|
||||
IsInsert = item.IsInsert,
|
||||
IsList = item.IsList,
|
||||
QueryType = item.QueryType,
|
||||
HtmlType = item.HtmlType,
|
||||
IsRequired = item.IsRequired,
|
||||
Sort = item.Sort,
|
||||
Update_time = DateTime.Now,
|
||||
DictType = item.DictType
|
||||
})
|
||||
.Where(f => f.ColumnId == item.ColumnId)
|
||||
.ExecuteCommand();
|
||||
}
|
||||
|
||||
return 1;
|
||||
return Context.Updateable(tableColumn)
|
||||
.WhereColumns(it => new { it.ColumnId, it.TableId})
|
||||
.UpdateColumns(it => new
|
||||
{
|
||||
it.ColumnComment,
|
||||
it.CsharpField,
|
||||
it.CsharpType,
|
||||
it.IsQuery,
|
||||
it.IsEdit,
|
||||
it.IsInsert,
|
||||
it.IsList,
|
||||
it.QueryType,
|
||||
it.HtmlType,
|
||||
it.IsRequired,
|
||||
it.Sort,
|
||||
it.Update_time,
|
||||
it.DictType,
|
||||
it.Update_by
|
||||
})
|
||||
.ExecuteCommand();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user