⚡优化代码生成
This commit is contained in:
parent
332acde5a0
commit
ea4acde028
@ -113,7 +113,7 @@ $end
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public int Update${replaceDto.ModelTypeName}(${replaceDto.ModelTypeName} model)
|
public int Update${replaceDto.ModelTypeName}(${replaceDto.ModelTypeName} model)
|
||||||
{
|
{
|
||||||
//var response = Update(w => w.${replaceDto.PKName} == model.${replaceDto.PKName}, it => new ${replaceDto.ModelTypeName}()
|
//return Update(w => w.${replaceDto.PKName} == model.${replaceDto.PKName}, it => new ${replaceDto.ModelTypeName}()
|
||||||
//{
|
//{
|
||||||
$foreach(item in genTable.Columns)
|
$foreach(item in genTable.Columns)
|
||||||
$if((item.IsEdit))
|
$if((item.IsEdit))
|
||||||
@ -121,7 +121,6 @@ $if((item.IsEdit))
|
|||||||
$end
|
$end
|
||||||
${end}
|
${end}
|
||||||
//});
|
//});
|
||||||
//return response;
|
|
||||||
$if(null != genTable.SubTableName && "" != genTable.SubTableName)
|
$if(null != genTable.SubTableName && "" != genTable.SubTableName)
|
||||||
return Context.UpdateNav(model).Include(z1 => z1.${genTable.SubTable.ClassName}Nav).ExecuteCommand() ? 1 : 0;
|
return Context.UpdateNav(model).Include(z1 => z1.${genTable.SubTable.ClassName}Nav).ExecuteCommand() ? 1 : 0;
|
||||||
$else
|
$else
|
||||||
@ -203,8 +202,8 @@ $end
|
|||||||
.ToPage(parm);
|
.ToPage(parm);
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
$end
|
|
||||||
}
|
}
|
||||||
|
$end
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查询导出表达式
|
/// 查询导出表达式
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
global using System.Collections.Generic;
|
global using System.Collections.Generic;
|
||||||
global using System;
|
global using System;
|
||||||
global using SqlSugar;
|
global using SqlSugar;
|
||||||
global using Newtonsoft.Json;
|
global using Newtonsoft.Json;
|
||||||
|
global using MiniExcelLibs.Attributes;
|
||||||
|
global using System.ComponentModel.DataAnnotations;
|
||||||
@ -706,8 +706,8 @@ namespace ZR.Service
|
|||||||
//Insert(menuList);
|
//Insert(menuList);
|
||||||
|
|
||||||
var x = Context.Storageable(menuList)
|
var x = Context.Storageable(menuList)
|
||||||
.SplitInsert(it => !it.Any())
|
//.SplitInsert(it => !it.Any())
|
||||||
.SplitUpdate(it => !it.Any())
|
//.SplitUpdate(it => !it.Any())
|
||||||
.WhereColumns(it => new { it.MenuName, it.ParentId })
|
.WhereColumns(it => new { it.MenuName, it.ParentId })
|
||||||
.ToStorage();
|
.ToStorage();
|
||||||
x.AsInsertable.ExecuteCommand();//插入可插入部分;
|
x.AsInsertable.ExecuteCommand();//插入可插入部分;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user