From ea4acde0285da8d12428626881a9dcda9ce5d503 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com>
Date: Wed, 22 Nov 2023 21:37:26 +0800
Subject: [PATCH] =?UTF-8?q?:zap:=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?=
=?UTF-8?q?=E7=94=9F=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplService.txt | 5 ++---
ZR.Model/GlobalUsing.cs | 4 +++-
ZR.ServiceCore/Services/SysMenuService.cs | 4 ++--
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplService.txt b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplService.txt
index cd8715e..9c48c1d 100644
--- a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplService.txt
+++ b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplService.txt
@@ -113,7 +113,7 @@ $end
///
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)
$if((item.IsEdit))
@@ -121,7 +121,6 @@ $if((item.IsEdit))
$end
${end}
//});
- //return response;
$if(null != genTable.SubTableName && "" != genTable.SubTableName)
return Context.UpdateNav(model).Include(z1 => z1.${genTable.SubTable.ClassName}Nav).ExecuteCommand() ? 1 : 0;
$else
@@ -203,8 +202,8 @@ $end
.ToPage(parm);
return response;
-$end
}
+$end
///
/// 查询导出表达式
diff --git a/ZR.Model/GlobalUsing.cs b/ZR.Model/GlobalUsing.cs
index 9845705..6980dcc 100644
--- a/ZR.Model/GlobalUsing.cs
+++ b/ZR.Model/GlobalUsing.cs
@@ -1,4 +1,6 @@
global using System.Collections.Generic;
global using System;
global using SqlSugar;
-global using Newtonsoft.Json;
\ No newline at end of file
+global using Newtonsoft.Json;
+global using MiniExcelLibs.Attributes;
+global using System.ComponentModel.DataAnnotations;
\ No newline at end of file
diff --git a/ZR.ServiceCore/Services/SysMenuService.cs b/ZR.ServiceCore/Services/SysMenuService.cs
index 06858f7..42da926 100644
--- a/ZR.ServiceCore/Services/SysMenuService.cs
+++ b/ZR.ServiceCore/Services/SysMenuService.cs
@@ -706,8 +706,8 @@ namespace ZR.Service
//Insert(menuList);
var x = Context.Storageable(menuList)
- .SplitInsert(it => !it.Any())
- .SplitUpdate(it => !it.Any())
+ //.SplitInsert(it => !it.Any())
+ //.SplitUpdate(it => !it.Any())
.WhereColumns(it => new { it.MenuName, it.ParentId })
.ToStorage();
x.AsInsertable.ExecuteCommand();//插入可插入部分;