From 480843147fed920a4bb3375d10c9d766dabe1851 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: Sun, 20 Mar 2022 19:26:33 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ZR.CodeGenerator/CodeGenerateTemplate.cs | 91 ------------------------
ZR.Repository/BaseRepository.cs | 61 ----------------
2 files changed, 152 deletions(-)
diff --git a/ZR.CodeGenerator/CodeGenerateTemplate.cs b/ZR.CodeGenerator/CodeGenerateTemplate.cs
index def1212..03fcdbc 100644
--- a/ZR.CodeGenerator/CodeGenerateTemplate.cs
+++ b/ZR.CodeGenerator/CodeGenerateTemplate.cs
@@ -166,97 +166,6 @@ namespace ZR.CodeGenerator
return sb.ToString();
}
- /////
- ///// Vue 查询表单
- /////
- /////
- /////
- //public static string TplQueryFormHtml(GenTableColumn dbFieldInfo)
- //{
- // StringBuilder sb = new();
- // string columnName = dbFieldInfo.CsharpFieldFl;
- // string labelName = CodeGeneratorTool.GetLabelName(dbFieldInfo.ColumnComment, dbFieldInfo.CsharpField);
- // if (!dbFieldInfo.IsQuery) return sb.ToString();
- // if (dbFieldInfo.HtmlType == GenConstants.HTML_DATETIME)
- // {
- // sb.AppendLine($" ");
- // sb.AppendLine($" ");
- // sb.AppendLine(" ");
- // }
- // else if (dbFieldInfo.HtmlType == GenConstants.HTML_SELECT || dbFieldInfo.HtmlType == GenConstants.HTML_RADIO)
- // {
- // sb.AppendLine($" ");
- // sb.AppendLine($" ");
- // sb.AppendLine($" ");
- // sb.AppendLine(" ");
- // sb.AppendLine(" ");
- // }
- // else
- // {
- // string inputNumTxt = CodeGeneratorTool.IsNumber(dbFieldInfo.CsharpType) ? ".number" : "";
- // sb.AppendLine($" ");
- // sb.AppendLine($" ");
- // sb.AppendLine(" ");
- // }
-
- // return sb.ToString();
- //}
-
- /////
- ///// Vue 查询列表
- /////
- /////
- /////
- /////
- //public static string TplTableColumn(GenTableColumn dbFieldInfo, GenTable genTable)
- //{
- // string columnName = dbFieldInfo.CsharpFieldFl;
- // string label = CodeGeneratorTool.GetLabelName(dbFieldInfo.ColumnComment, columnName);
- // string showToolTip = ShowToolTip(dbFieldInfo);
- // string formatter = GetFormatter(dbFieldInfo.HtmlType, columnName);
- // StringBuilder sb = new StringBuilder();
- // //自定义排序字段
- // if (GenConstants.HTML_CUSTOM_INPUT.Equals(dbFieldInfo.HtmlType) && !dbFieldInfo.IsPk)
- // {
- // sb.AppendLine($@" ");
- // sb.AppendLine(@" ");
- // sb.AppendLine($@" {{{{scope.row.{columnName}}}}}");
- // sb.AppendLine(@" ");
- // sb.AppendLine(@" ");
- // sb.AppendLine(@" ");
- // }
- // else if (dbFieldInfo.IsList && dbFieldInfo.HtmlType.Equals(GenConstants.HTML_IMAGE_UPLOAD))
- // {
- // sb.AppendLine($" ");
- // sb.AppendLine(" ");
- // sb.AppendLine($" ");
- // sb.AppendLine("
");
- // sb.AppendLine(" ");
- // sb.AppendLine(" ");
- // sb.AppendLine(" ");
- // }
- // else if (dbFieldInfo.IsList && !string.IsNullOrEmpty(formatter))
- // {
- // sb.AppendLine($@" ");
- // sb.AppendLine(@" ");
- // string checkboxHtml = string.Empty;
- // if (dbFieldInfo.HtmlType == GenConstants.HTML_CHECKBOX)
- // {
- // checkboxHtml = $" ? scope.row.{columnName}.split(',') : []";
- // }
- // sb.AppendLine($" ");
- // sb.AppendLine(@" ");
- // sb.AppendLine(@" ");
- // }
- // else if (dbFieldInfo.IsList)
- // {
- // sb.AppendLine($" ");
- // }
- // return sb.ToString();
- //}
-
#endregion
//模板调用
diff --git a/ZR.Repository/BaseRepository.cs b/ZR.Repository/BaseRepository.cs
index 19d59f6..48a9f49 100644
--- a/ZR.Repository/BaseRepository.cs
+++ b/ZR.Repository/BaseRepository.cs
@@ -45,75 +45,14 @@ namespace ZR.Repository
return Context.Insertable(t).IgnoreColumns(true).ExecuteCommand();
}
- //public int Insert(SqlSugarClient client, T t)
- //{
- // return client.Insertable(t).ExecuteCommand();
- //}
-
public int Insert(List t)
{
return Context.Insertable(t).ExecuteCommand();
}
- //public long InsertReturnBigIdentity(T t)
- //{
- // return Context.Insertable(t).ExecuteReturnBigIdentity();
- //}
-
- //public int InsertIgnoreNullColumn(List t)
- //{
- // return base.Context.Insertable(t).IgnoreColumns(true).ExecuteCommand();
- //}
-
- //public int InsertIgnoreNullColumn(List t, params string[] columns)
- //{
- // return base.Context.Insertable(t).IgnoreColumns(columns).ExecuteCommand();
- //}
public int Insert(T parm, Expression> iClumns = null, bool ignoreNull = true)
{
return Context.Insertable(parm).InsertColumns(iClumns).IgnoreColumns(ignoreNullColumn: ignoreNull).ExecuteCommand();
}
- //public DbResult InsertTran(T t)
- //{
- // var result = base.Context.Ado.UseTran(() =>
- // {
- // base.Context.Insertable(t).ExecuteCommand();
- // });
- // return result;
- //}
-
- //public DbResult InsertTran(List t)
- //{
- // var result = base.Context.Ado.UseTran(() =>
- // {
- // base.Context.Insertable(t).ExecuteCommand();
- // });
- // return result;
- //}
-
- //public T InsertReturnEntity(T t)
- //{
- // return base.Context.Insertable(t).ExecuteReturnEntity();
- //}
-
- //public T InsertReturnEntity(T t, string sqlWith = SqlWith.UpdLock)
- //{
- // return base.Context.Insertable(t).With(sqlWith).ExecuteReturnEntity();
- //}
-
- //public bool ExecuteCommand(string sql, object parameters)
- //{
- // return base.Context.Ado.ExecuteCommand(sql, parameters) > 0;
- //}
-
- //public bool ExecuteCommand(string sql, params SugarParameter[] parameters)
- //{
- // return base.Context.Ado.ExecuteCommand(sql, parameters) > 0;
- //}
-
- //public bool ExecuteCommand(string sql, List parameters)
- //{
- // return base.Context.Ado.ExecuteCommand(sql, parameters) > 0;
- //}
public IInsertable Insertable(T t)
{
return Context.Insertable(t);