升级到.net 6.0
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NewLife.Core" Version="8.11.2021.1109" />
|
||||
<PackageReference Include="NewLife.Core" Version="9.0.2022.101" />
|
||||
<PackageReference Include="Senparc.Weixin" Version="6.14.0" />
|
||||
<PackageReference Include="Senparc.Weixin.MP" Version="16.17.1" />
|
||||
<PackageReference Include="Senparc.Weixin.MP" Version="16.17.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="NewLife.Core" Version="8.11.2021.1109" />
|
||||
<PackageReference Include="NewLife.Core" Version="9.0.2022.101" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="PinYinConverterCore" Version="1.0.2" />
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NewLife.XCode" Version="10.3.2021.1109" />
|
||||
<PackageReference Include="NewLife.XCode" Version="11.0.2022.101" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MailKit" Version="2.15.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.11" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.11" />
|
||||
<PackageReference Include="Microsoft.Data.Sqlite.Core" Version="5.0.11" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.11.1" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.2" />
|
||||
<PackageReference Include="MimeKit" Version="2.15.1" />
|
||||
<PackageReference Include="MailKit" Version="3.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.1" />
|
||||
<PackageReference Include="Microsoft.Data.Sqlite.Core" Version="6.0.1" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.14.0" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.1" />
|
||||
<PackageReference Include="MimeKit" Version="3.0.0" />
|
||||
<PackageReference Include="MySql.Data" Version="8.0.27" />
|
||||
<PackageReference Include="NewLife.XCode" Version="10.3.2021.1109" />
|
||||
<PackageReference Include="NewLife.XCode" Version="11.0.2022.101" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="Senparc.NeuChar" Version="2.0.0" />
|
||||
<PackageReference Include="Senparc.NeuChar" Version="2.0.1" />
|
||||
<PackageReference Include="Senparc.Weixin" Version="6.14.0" />
|
||||
<PackageReference Include="Senparc.Weixin.MP" Version="16.17.1" />
|
||||
<PackageReference Include="Senparc.Weixin.MP" Version="16.17.3" />
|
||||
<PackageReference Include="Senparc.Weixin.MP.MvcExtension" Version="4.1.1" />
|
||||
<PackageReference Include="Senparc.Weixin.TenPay" Version="1.11.0" />
|
||||
<PackageReference Include="Senparc.Weixin.WxOpen" Version="3.14.1" />
|
||||
<PackageReference Include="Senparc.Weixin.WxOpen" Version="3.14.3" />
|
||||
<PackageReference Include="System.Data.SqlClient" Version="4.8.3" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
+8
-8
@@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.30523.141
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.32014.148
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "COMCMS.Web", "COMCMS.Web\COMCMS.Web.csproj", "{BEE79494-B5B8-49D0-8040-818AE601C800}"
|
||||
EndProject
|
||||
@@ -9,14 +9,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "COMCMS.Core", "COMCMS.Core\
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "COMCMS.Common", "COMCMS.Common\COMCMS.Common.csproj", "{B282EB59-2330-4834-8F0A-6369F5A0288B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XCoder(代码生成器)", "XCoder\XCoder(代码生成器).csproj", "{71539325-194B-4D56-8D88-562B33004406}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "COMCMS.API", "COMCMS.API\COMCMS.API.csproj", "{ED1581D0-7E94-4ADC-B2B4-0A523EA3B512}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lib.Core", "Lib.Core\Lib.Core.csproj", "{D95FC3C1-B035-4A19-A706-71C31DD1E52D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NewLife.UserGroup.WebUploader", "NewLife.UserGroup.WebUploader\NewLife.UserGroup.WebUploader.csproj", "{F8D6AE11-1436-44CA-BDD9-4AFD7B489DD0}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XCoder", "XCoder\XCoder.csproj", "{F8095FB4-08DC-4DEF-9882-54850706DBC4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -35,10 +35,6 @@ Global
|
||||
{B282EB59-2330-4834-8F0A-6369F5A0288B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B282EB59-2330-4834-8F0A-6369F5A0288B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B282EB59-2330-4834-8F0A-6369F5A0288B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{71539325-194B-4D56-8D88-562B33004406}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{71539325-194B-4D56-8D88-562B33004406}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{71539325-194B-4D56-8D88-562B33004406}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{71539325-194B-4D56-8D88-562B33004406}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{ED1581D0-7E94-4ADC-B2B4-0A523EA3B512}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{ED1581D0-7E94-4ADC-B2B4-0A523EA3B512}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{ED1581D0-7E94-4ADC-B2B4-0A523EA3B512}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
@@ -51,6 +47,10 @@ Global
|
||||
{F8D6AE11-1436-44CA-BDD9-4AFD7B489DD0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F8D6AE11-1436-44CA-BDD9-4AFD7B489DD0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F8D6AE11-1436-44CA-BDD9-4AFD7B489DD0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F8095FB4-08DC-4DEF-9882-54850706DBC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F8095FB4-08DC-4DEF-9882-54850706DBC4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F8095FB4-08DC-4DEF-9882-54850706DBC4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F8095FB4-08DC-4DEF-9882-54850706DBC4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
-13904
File diff suppressed because it is too large
Load Diff
Binary file not shown.
-10245
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
// 自动选择最新的文件源
|
||||
var di = ".".AsDirectory();
|
||||
var srcs = new String[] { @"..\Bin", @"..\..\Bin", @"C:\X\DLL", @"C:\X\Bin", @"D:\X\Bin", @"..\..\..\X\Bin\net45" };
|
||||
di.CopyIfNewer(srcs, "*.dll;*.exe;*.xml;*.pdb;*.cs");
|
||||
|
||||
di = "..\\DLL20".AsDirectory();
|
||||
if (di.Exists)
|
||||
{
|
||||
srcs = new String[] { @"..\Bin\netstandard2.0", @"..\..\Bin\netstandard2.0", @"..\..\..\X\Bin\netstandard2.0" };
|
||||
di.CopyIfNewer(srcs, "*.dll;*.exe;*.xml;*.pdb;*.cs");
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Http.Features" Version="5.0.12" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Http.Features" Version="5.0.13" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
+14
-11
@@ -1,22 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--核心设置-->
|
||||
<Setting>
|
||||
<Core>
|
||||
<!--全局调试。XTrace.Debug-->
|
||||
<Debug>true</Debug>
|
||||
<!--日志等级。只输出大于等于该级别的日志,All/Debug/Info/Warn/Error/Fatal,默认Info-->
|
||||
<LogLevel>Info</LogLevel>
|
||||
<!--文件日志目录-->
|
||||
<!--文件日志目录。默认Log子目录,web上一级Log-->
|
||||
<LogPath>Log</LogPath>
|
||||
<!--网络日志。本地子网日志广播255.255.255.255:514-->
|
||||
<NetworkLog></NetworkLog>
|
||||
<!--日志文件格式。默认{0:yyyy_MM_dd}.log-->
|
||||
<!--日志文件上限。超过上限后拆分新日志文件,默认10MB,0表示不限制大小-->
|
||||
<LogFileMaxBytes>10</LogFileMaxBytes>
|
||||
<!--日志文件备份。超过备份数后,最旧的文件将被删除,默认100,0表示不限制个数-->
|
||||
<LogFileBackups>100</LogFileBackups>
|
||||
<!--日志文件格式。默认{0:yyyy_MM_dd}.log,支持日志等级如 {1}_{0:yyyy_MM_dd}.log-->
|
||||
<LogFileFormat>{0:yyyy_MM_dd}.log</LogFileFormat>
|
||||
<!--临时目录-->
|
||||
<TempPath>XTemp</TempPath>
|
||||
<!--网络日志。本地子网日志广播udp://255.255.255.255:514,或者http://xxx:80/log-->
|
||||
<NetworkLog></NetworkLog>
|
||||
<!--数据目录。本地数据库目录,默认Data子目录,web上一级Data-->
|
||||
<DataPath>Data</DataPath>
|
||||
<!--备份目录。备份数据库时存放的目录,默认Backup子目录,web上一级Backup-->
|
||||
<BackupPath>Backup</BackupPath>
|
||||
<!--插件目录-->
|
||||
<PluginPath>Plugins</PluginPath>
|
||||
<!--插件服务器。将从该网页上根据关键字分析链接并下载插件-->
|
||||
<PluginServer>http://x.newlifex.com/</PluginServer>
|
||||
<!--插件缓存目录。默认位于系统盘的X\Cache-->
|
||||
<PluginCache>C:\X\Cache</PluginCache>
|
||||
</Setting>
|
||||
</Core>
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--XCode设置-->
|
||||
<Setting>
|
||||
<XCode>
|
||||
<!--调试-->
|
||||
<Debug>true</Debug>
|
||||
<!--输出SQL。是否输出SQL语句,默认启用-->
|
||||
@@ -9,17 +8,15 @@
|
||||
<SQLPath></SQLPath>
|
||||
<!--SQL执行时间。跟踪SQL执行时间,大于该阀值将输出日志,默认1000毫秒-->
|
||||
<TraceSQLTime>1000</TraceSQLTime>
|
||||
<!--连接映射。连接名映射#,表名映射@,把实体类中的Test2和Test3连接名映射到Test去-->
|
||||
<ConnMaps></ConnMaps>
|
||||
<!--SQL最大长度。输出日志时的SQL最大长度,超长截断,默认4096,不截断用0-->
|
||||
<SQLMaxLength>4096</SQLMaxLength>
|
||||
<!--参数化添删改查。默认关闭-->
|
||||
<UseParameter>false</UseParameter>
|
||||
<!--SQLite默认目录。没有设置连接字符串的连接默认创建SQLite连接,数据库放在该目录-->
|
||||
<SQLiteDbPath>.</SQLiteDbPath>
|
||||
<!--备份目录。备份数据库时存放的目录-->
|
||||
<BackupPath>Backup</BackupPath>
|
||||
<!--命令超时。查询执行超时时间,默认0秒不限制-->
|
||||
<CommandTimeout>0</CommandTimeout>
|
||||
<!--数据层缓存。默认0秒-->
|
||||
<!--失败重试。执行命令超时后的重试次数,默认0不重试-->
|
||||
<RetryOnFailure>0</RetryOnFailure>
|
||||
<!--数据层缓存。根据sql做缓存,默认0秒-->
|
||||
<DataCacheExpire>0</DataCacheExpire>
|
||||
<!--实体缓存过期。整表缓存实体列表,默认10秒-->
|
||||
<EntityCacheExpire>10</EntityCacheExpire>
|
||||
@@ -29,4 +26,6 @@
|
||||
<ExtendExpire>10</ExtendExpire>
|
||||
<!--反向工程。Off 关闭;ReadOnly 只读不执行;On 打开,仅新建;Full 完全,修改删除-->
|
||||
<Migration>On</Migration>
|
||||
</Setting>
|
||||
<!--表名称、字段名大小写格式。Default 根据模型生成;Upper 全大写;Lower 全小写;Underline下划线-->
|
||||
<NameFormat>Default</NameFormat>
|
||||
</XCode>
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"OSName": "Windows 11 企业版",
|
||||
"OSVersion": "6.2.9200.0",
|
||||
"Product": "System Product Name",
|
||||
"Processor": "12th Gen Intel(R) Core(TM) i7-12700K",
|
||||
"CpuID": "BFEBFBFF00090672",
|
||||
"UUID": "45AA16D8-DF2F-3221-350A-04421A983F7F",
|
||||
"Guid": "5f9c0713-29c7-4621-b35e-b35efd70a57b",
|
||||
"DiskID": "0025_38DC_11B1_45AC.",
|
||||
"Memory": 34088443904,
|
||||
"AvailableMemory": 14803206144,
|
||||
"CpuRate": 0.02833942,
|
||||
"UplinkSpeed": 0,
|
||||
"DownlinkSpeed": 0,
|
||||
"Temperature": 0,
|
||||
"Battery": 0
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
<#@ template language="C#" hostSpecific="true" debug="true" #>
|
||||
<#@ assembly name="$(ProjectDir)\$(OutputPath)\NewLife.Core.dll" #>
|
||||
<#@ assembly name="$(ProjectDir)\$(OutputPath)\XCode.dll" #>
|
||||
<#@ import namespace="System.Diagnostics" #>
|
||||
<#@ import namespace="System.IO" #>
|
||||
<#@ import namespace="XCode.Code" #>
|
||||
<#@ import namespace="XCode.DataAccessLayer" #>
|
||||
<#@ output extension=".log" #>
|
||||
<#
|
||||
// 设置当前工作目录
|
||||
PathHelper.BasePath = Host.ResolvePath(".");
|
||||
|
||||
// 设置如何格式化字段名,默认去掉下划线并转驼峰命名
|
||||
//ModelResolver.Current = new ModelResolver { TrimUnderline = false, Camel = false };
|
||||
|
||||
// 加载模型文件,得到数据表
|
||||
var option = new BuilderOption();
|
||||
var tables = ClassBuilder.LoadModels(null, option, out var atts);
|
||||
EntityBuilder.FixModelFile(null, option, atts, tables);
|
||||
|
||||
// 生成实体类
|
||||
//option.BaseClass = "I{name}";
|
||||
//option.ModelNameForCopy = "I{name}";
|
||||
EntityBuilder.BuildTables(tables, option, chineseFileName: true);
|
||||
|
||||
// 生成简易模型类
|
||||
option.Output = @"Output\EntityModels\";
|
||||
option.ClassNameTemplate = "{name}Model";
|
||||
option.ModelNameForCopy = "I{name}";
|
||||
//ClassBuilder.BuildModels(tables, option);
|
||||
|
||||
// 生成简易接口
|
||||
option.BaseClass = null;
|
||||
option.ClassNameTemplate = null;
|
||||
option.Output = @"Output\EntityInterfaces\";
|
||||
//ClassBuilder.BuildInterfaces(tables, option);
|
||||
|
||||
// 精确控制生成
|
||||
/*foreach (var item in tables)
|
||||
{
|
||||
var builder = new ClassBuilder
|
||||
{
|
||||
Table = item,
|
||||
Option = option.Clone(),
|
||||
};
|
||||
builder.Execute();
|
||||
builder.Save(null, true, false);
|
||||
}*/
|
||||
#>
|
||||
@@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Setting>
|
||||
<!--全局调试。XTrace.Debug-->
|
||||
<Debug>true</Debug>
|
||||
<!--日志等级。只输出大于等于该级别的日志,All/Debug/Info/Warn/Error/Fatal,默认Info-->
|
||||
<LogLevel>Info</LogLevel>
|
||||
<!--文件日志目录。默认Log子目录,web上一级Log-->
|
||||
<LogPath>Log</LogPath>
|
||||
<!--日志文件上限。超过上限后拆分新日志文件,默认10MB,0表示不限制大小-->
|
||||
<LogFileMaxBytes>10</LogFileMaxBytes>
|
||||
<!--日志文件备份。超过备份数后,最旧的文件将被删除,默认100,0表示不限制个数-->
|
||||
<LogFileBackups>100</LogFileBackups>
|
||||
<!--日志文件格式。默认{0:yyyy_MM_dd}.log,支持日志等级如 {1}_{0:yyyy_MM_dd}.log-->
|
||||
<LogFileFormat>{0:yyyy_MM_dd}.log</LogFileFormat>
|
||||
<!--网络日志。本地子网日志广播udp://255.255.255.255:514,或者http://xxx:80/log-->
|
||||
<NetworkLog></NetworkLog>
|
||||
<!--数据目录。本地数据库目录,默认Data子目录,web上一级Data-->
|
||||
<DataPath>Data</DataPath>
|
||||
<!--备份目录。备份数据库时存放的目录,默认Backup子目录,web上一级Backup-->
|
||||
<BackupPath>Backup</BackupPath>
|
||||
<!--插件目录-->
|
||||
<PluginPath>Plugins</PluginPath>
|
||||
<!--插件服务器。将从该网页上根据关键字分析链接并下载插件-->
|
||||
<PluginServer>http://x.newlifex.com/</PluginServer>
|
||||
</Setting>
|
||||
@@ -1,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Setting>
|
||||
<!--调试-->
|
||||
<Debug>true</Debug>
|
||||
<!--输出SQL。是否输出SQL语句,默认启用-->
|
||||
<ShowSQL>true</ShowSQL>
|
||||
<!--SQL目录。设置SQL输出的单独目录,默认为空,SQL输出到当前日志中。生产环境建议输出到站点外单独的SqlLog目录-->
|
||||
<SQLPath></SQLPath>
|
||||
<!--SQL执行时间。跟踪SQL执行时间,大于该阀值将输出日志,默认1000毫秒-->
|
||||
<TraceSQLTime>1000</TraceSQLTime>
|
||||
<!--SQL最大长度。输出日志时的SQL最大长度,超长截断,默认4096,不截断用0-->
|
||||
<SQLMaxLength>4096</SQLMaxLength>
|
||||
<!--连接映射。连接名映射#,表名映射@,把实体类中的Test2和Test3连接名映射到Test去-->
|
||||
<ConnMaps></ConnMaps>
|
||||
<!--参数化添删改查。默认关闭-->
|
||||
<UseParameter>false</UseParameter>
|
||||
<!--命令超时。查询执行超时时间,默认0秒不限制-->
|
||||
<CommandTimeout>0</CommandTimeout>
|
||||
<!--失败重试。执行命令超时后的重试次数,默认0不重试-->
|
||||
<RetryOnFailure>0</RetryOnFailure>
|
||||
<!--数据层缓存。默认0秒,达到60秒后全表查询使用文件缓存-->
|
||||
<DataCacheExpire>0</DataCacheExpire>
|
||||
<!--实体缓存过期。整表缓存实体列表,默认10秒-->
|
||||
<EntityCacheExpire>10</EntityCacheExpire>
|
||||
<!--单对象缓存过期。按主键缓存实体,默认10秒-->
|
||||
<SingleCacheExpire>10</SingleCacheExpire>
|
||||
<!--扩展属性过期。扩展属性Extends缓存,默认10秒-->
|
||||
<ExtendExpire>10</ExtendExpire>
|
||||
<!--反向工程。Off 关闭;ReadOnly 只读不执行;On 打开,仅新建;Full 完全,修改删除-->
|
||||
<Migration>On</Migration>
|
||||
<!--表名称、字段名大小写格式。Default 根据模型生成;Upper 全大写;Lower 全小写-->
|
||||
<NameFormat>Default</NameFormat>
|
||||
</Setting>
|
||||
@@ -1,260 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Tables Version="9.16.7426.38239" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:schemaLocation="http://www.newlifex.com http://www.newlifex.com/Model2020.xsd" NameSpace="XCode.Membership" ConnName="Membership" Output="" BaseClass="Entity" ChineseFileName="True" IgnoreNameCase="True" xmlns="http://www.newlifex.com/Model2020.xsd">
|
||||
<Table Name="User" Description="用户">
|
||||
<Columns>
|
||||
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
|
||||
<Column Name="Name" DataType="String" Master="True" Nullable="False" Description="名称。登录用户名" />
|
||||
<Column Name="Password" DataType="String" Description="密码" />
|
||||
<Column Name="DisplayName" DataType="String" Description="昵称" />
|
||||
<Column Name="Sex" DataType="Int32" Description="性别。未知、男、女" Type="SexKinds" />
|
||||
<Column Name="Mail" DataType="String" ItemType="mail" Description="邮件" />
|
||||
<Column Name="Mobile" DataType="String" ItemType="mobile" Description="手机" />
|
||||
<Column Name="Code" DataType="String" Description="代码。身份证、员工编号等" />
|
||||
<Column Name="Avatar" DataType="String" ItemType="image" Length="200" Description="头像" />
|
||||
<Column Name="RoleID" DataType="Int32" Description="角色。主要角色" />
|
||||
<Column Name="RoleIDs" DataType="String" Length="200" Description="角色组。次要角色集合" />
|
||||
<Column Name="DepartmentID" DataType="Int32" Description="部门。组织机构" />
|
||||
<Column Name="Online" DataType="Boolean" Description="在线" />
|
||||
<Column Name="Enable" DataType="Boolean" Description="启用" />
|
||||
<Column Name="Logins" DataType="Int32" Description="登录次数" />
|
||||
<Column Name="LastLogin" DataType="DateTime" Description="最后登录" />
|
||||
<Column Name="LastLoginIP" DataType="String" Description="最后登录IP" />
|
||||
<Column Name="RegisterTime" DataType="DateTime" Description="注册时间" />
|
||||
<Column Name="RegisterIP" DataType="String" Description="注册IP" />
|
||||
<Column Name="Ex1" DataType="Int32" Description="扩展1" />
|
||||
<Column Name="Ex2" DataType="Int32" Description="扩展2" />
|
||||
<Column Name="Ex3" DataType="Double" Description="扩展3" />
|
||||
<Column Name="Ex4" DataType="String" Description="扩展4" />
|
||||
<Column Name="Ex5" DataType="String" Description="扩展5" />
|
||||
<Column Name="Ex6" DataType="String" Description="扩展6" Attribute="XmlIgnore, ScriptIgnore, IgnoreDataMember" />
|
||||
<Column Name="UpdateUser" DataType="String" Description="更新者" />
|
||||
<Column Name="UpdateUserID" DataType="Int32" Description="更新用户" />
|
||||
<Column Name="UpdateIP" DataType="String" Description="更新地址" />
|
||||
<Column Name="UpdateTime" DataType="DateTime" Nullable="False" Description="更新时间" />
|
||||
<Column Name="Remark" DataType="String" Length="200" Description="备注" />
|
||||
</Columns>
|
||||
<Indexes>
|
||||
<Index Columns="Name" Unique="True" />
|
||||
<Index Columns="RoleID" />
|
||||
<Index Columns="UpdateTime" />
|
||||
</Indexes>
|
||||
</Table>
|
||||
<Table Name="Department" Description="部门。组织机构,多级树状结构">
|
||||
<Columns>
|
||||
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
|
||||
<Column Name="Code" DataType="String" Description="代码" />
|
||||
<Column Name="Name" DataType="String" Master="True" Nullable="False" Description="名称" />
|
||||
<Column Name="FullName" DataType="String" Length="200" Description="全名" />
|
||||
<Column Name="ParentID" DataType="Int32" Description="父级" />
|
||||
<Column Name="Level" DataType="Int32" Description="层级。树状结构的层级" />
|
||||
<Column Name="Sort" DataType="Int32" Description="排序。同级内排序" />
|
||||
<Column Name="Enable" DataType="Boolean" Description="启用" />
|
||||
<Column Name="Visible" DataType="Boolean" Description="可见" />
|
||||
<Column Name="ManagerID" DataType="Int32" Description="管理者" />
|
||||
<Column Name="Ex1" DataType="Int32" Description="扩展1" />
|
||||
<Column Name="Ex2" DataType="Int32" Description="扩展2" />
|
||||
<Column Name="Ex3" DataType="Double" Description="扩展3" />
|
||||
<Column Name="Ex4" DataType="String" Description="扩展4" />
|
||||
<Column Name="Ex5" DataType="String" Description="扩展5" />
|
||||
<Column Name="Ex6" DataType="String" Description="扩展6" />
|
||||
<Column Name="CreateUser" DataType="String" Description="创建者" />
|
||||
<Column Name="CreateUserID" DataType="Int32" Description="创建用户" />
|
||||
<Column Name="CreateIP" DataType="String" Description="创建地址" />
|
||||
<Column Name="CreateTime" DataType="DateTime" Nullable="False" Description="创建时间" />
|
||||
<Column Name="UpdateUser" DataType="String" Description="更新者" />
|
||||
<Column Name="UpdateUserID" DataType="Int32" Description="更新用户" />
|
||||
<Column Name="UpdateIP" DataType="String" Description="更新地址" />
|
||||
<Column Name="UpdateTime" DataType="DateTime" Nullable="False" Description="更新时间" />
|
||||
<Column Name="Remark" DataType="String" Length="200" Description="备注" />
|
||||
</Columns>
|
||||
<Indexes>
|
||||
<Index Columns="Name" />
|
||||
<Index Columns="ParentID,Name" Unique="True" />
|
||||
<Index Columns="Code" />
|
||||
<Index Columns="UpdateTime" />
|
||||
</Indexes>
|
||||
</Table>
|
||||
<Table Name="Role" Description="角色">
|
||||
<Columns>
|
||||
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
|
||||
<Column Name="Name" DataType="String" Master="True" Nullable="False" Description="名称" />
|
||||
<Column Name="Enable" DataType="Boolean" Description="启用" />
|
||||
<Column Name="IsSystem" DataType="Boolean" Description="系统。用于业务系统开发使用,不受数据权限约束,禁止修改名称或删除" />
|
||||
<Column Name="Permission" DataType="String" Length="-1" Description="权限。对不同资源的权限,逗号分隔,每个资源的权限子项竖线分隔" />
|
||||
<Column Name="Ex1" DataType="Int32" Description="扩展1" />
|
||||
<Column Name="Ex2" DataType="Int32" Description="扩展2" />
|
||||
<Column Name="Ex3" DataType="Double" Description="扩展3" />
|
||||
<Column Name="Ex4" DataType="String" Description="扩展4" />
|
||||
<Column Name="Ex5" DataType="String" Description="扩展5" />
|
||||
<Column Name="Ex6" DataType="String" Description="扩展6" />
|
||||
<Column Name="CreateUser" DataType="String" Description="创建者" />
|
||||
<Column Name="CreateUserID" DataType="Int32" Description="创建用户" />
|
||||
<Column Name="CreateIP" DataType="String" Description="创建地址" />
|
||||
<Column Name="CreateTime" DataType="DateTime" Nullable="False" Description="创建时间" />
|
||||
<Column Name="UpdateUser" DataType="String" Description="更新者" />
|
||||
<Column Name="UpdateUserID" DataType="Int32" Description="更新用户" />
|
||||
<Column Name="UpdateIP" DataType="String" Description="更新地址" />
|
||||
<Column Name="UpdateTime" DataType="DateTime" Nullable="False" Description="更新时间" />
|
||||
<Column Name="Remark" DataType="String" Length="200" Description="备注" />
|
||||
</Columns>
|
||||
<Indexes>
|
||||
<Index Columns="Name" Unique="True" />
|
||||
</Indexes>
|
||||
</Table>
|
||||
<Table Name="Menu" Description="菜单" BaseType="EntityTree">
|
||||
<Columns>
|
||||
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
|
||||
<Column Name="Name" DataType="String" Master="True" Nullable="False" Description="名称" />
|
||||
<Column Name="DisplayName" DataType="String" Description="显示名" />
|
||||
<Column Name="FullName" DataType="String" Length="200" Description="全名" />
|
||||
<Column Name="ParentID" DataType="Int32" Description="父编号" />
|
||||
<Column Name="Url" DataType="String" Length="200" Description="链接" />
|
||||
<Column Name="Sort" DataType="Int32" Description="排序" />
|
||||
<Column Name="Icon" DataType="String" Description="图标" />
|
||||
<Column Name="Visible" DataType="Boolean" Description="可见" />
|
||||
<Column Name="Necessary" DataType="Boolean" Description="必要。必要的菜单,必须至少有角色拥有这些权限,如果没有则自动授权给系统角色" />
|
||||
<Column Name="Permission" DataType="String" Length="200" Description="权限子项。逗号分隔,每个权限子项名值竖线分隔" />
|
||||
<Column Name="Ex1" DataType="Int32" Description="扩展1" />
|
||||
<Column Name="Ex2" DataType="Int32" Description="扩展2" />
|
||||
<Column Name="Ex3" DataType="Double" Description="扩展3" />
|
||||
<Column Name="Ex4" DataType="String" Description="扩展4" />
|
||||
<Column Name="Ex5" DataType="String" Description="扩展5" />
|
||||
<Column Name="Ex6" DataType="String" Description="扩展6" />
|
||||
<Column Name="CreateUser" DataType="String" Description="创建者" />
|
||||
<Column Name="CreateUserID" DataType="Int32" Description="创建用户" />
|
||||
<Column Name="CreateIP" DataType="String" Description="创建地址" />
|
||||
<Column Name="CreateTime" DataType="DateTime" Nullable="False" Description="创建时间" />
|
||||
<Column Name="UpdateUser" DataType="String" Description="更新者" />
|
||||
<Column Name="UpdateUserID" DataType="Int32" Description="更新用户" />
|
||||
<Column Name="UpdateIP" DataType="String" Description="更新地址" />
|
||||
<Column Name="UpdateTime" DataType="DateTime" Nullable="False" Description="更新时间" />
|
||||
<Column Name="Remark" DataType="String" Length="200" Description="备注" />
|
||||
</Columns>
|
||||
<Indexes>
|
||||
<Index Columns="Name" />
|
||||
<Index Columns="ParentID,Name" Unique="True" />
|
||||
</Indexes>
|
||||
</Table>
|
||||
<Table Name="Parameter" Description="字典参数">
|
||||
<Columns>
|
||||
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
|
||||
<Column Name="UserID" DataType="Int32" Description="用户。按用户区分参数,用户0表示系统级" />
|
||||
<Column Name="Category" DataType="String" Description="类别" />
|
||||
<Column Name="Name" DataType="String" Master="True" Description="名称" />
|
||||
<Column Name="Value" DataType="String" Length="200" Description="数值" />
|
||||
<Column Name="LongValue" DataType="String" Length="2000" Description="长数值" />
|
||||
<Column Name="Kind" DataType="Int32" Description="种类。0普通,21列表,22名值" Type="XCode.Membership.ParameterKinds" />
|
||||
<Column Name="Enable" DataType="Boolean" Description="启用" />
|
||||
<Column Name="Ex1" DataType="Int32" Description="扩展1" />
|
||||
<Column Name="Ex2" DataType="Int32" Description="扩展2" />
|
||||
<Column Name="Ex3" DataType="Double" Description="扩展3" />
|
||||
<Column Name="Ex4" DataType="String" Description="扩展4" />
|
||||
<Column Name="Ex5" DataType="String" Description="扩展5" />
|
||||
<Column Name="Ex6" DataType="String" Description="扩展6" />
|
||||
<Column Name="CreateUser" DataType="String" Description="创建者" />
|
||||
<Column Name="CreateUserID" DataType="Int32" Description="创建用户" />
|
||||
<Column Name="CreateIP" DataType="String" Description="创建地址" />
|
||||
<Column Name="CreateTime" DataType="DateTime" Nullable="False" Description="创建时间" />
|
||||
<Column Name="UpdateUser" DataType="String" Description="更新者" />
|
||||
<Column Name="UpdateUserID" DataType="Int32" Description="更新用户" />
|
||||
<Column Name="UpdateIP" DataType="String" Description="更新地址" />
|
||||
<Column Name="UpdateTime" DataType="DateTime" Nullable="False" Description="更新时间" />
|
||||
<Column Name="Remark" DataType="String" Length="200" Description="备注" />
|
||||
</Columns>
|
||||
<Indexes>
|
||||
<Index Columns="UserID,Category,Name" Unique="True" />
|
||||
<Index Columns="Category,Name" />
|
||||
<Index Columns="UpdateTime" />
|
||||
</Indexes>
|
||||
</Table>
|
||||
<Table Name="Area" Description="地区。行政区划数据">
|
||||
<Columns>
|
||||
<Column Name="ID" DataType="Int32" PrimaryKey="True" Description="编码。行政区划编码" />
|
||||
<Column Name="Name" DataType="String" Master="True" Description="名称" />
|
||||
<Column Name="FullName" DataType="String" Master="True" Description="全名" />
|
||||
<Column Name="ParentID" DataType="Int32" Description="父级" />
|
||||
<Column Name="Level" DataType="Int32" Description="层级" />
|
||||
<Column Name="Longitude" DataType="Double" Description="经度" />
|
||||
<Column Name="Latitude" DataType="Double" Description="纬度" />
|
||||
<Column Name="Enable" DataType="Boolean" Description="启用" />
|
||||
<Column Name="UpdateUser" DataType="String" Description="更新者" />
|
||||
<Column Name="UpdateUserID" DataType="Int32" Description="更新用户" />
|
||||
<Column Name="UpdateIP" DataType="String" Description="更新地址" />
|
||||
<Column Name="UpdateTime" DataType="DateTime" Description="更新时间" />
|
||||
<Column Name="Remark" DataType="String" Length="200" Description="备注" />
|
||||
</Columns>
|
||||
<Indexes>
|
||||
<Index Columns="ParentID" />
|
||||
<Index Columns="Name" />
|
||||
<Index Columns="UpdateTime,ID" />
|
||||
</Indexes>
|
||||
</Table>
|
||||
<Table Name="Log" Description="日志" ConnName="Log">
|
||||
<Columns>
|
||||
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
|
||||
<Column Name="Category" DataType="String" Description="类别" />
|
||||
<Column Name="Action" DataType="String" Description="操作" />
|
||||
<Column Name="LinkID" DataType="Int32" Description="链接" />
|
||||
<Column Name="Success" DataType="Boolean" Description="成功" />
|
||||
<Column Name="UserName" DataType="String" Description="用户名" />
|
||||
<Column Name="Ex1" DataType="Int32" Description="扩展1" />
|
||||
<Column Name="Ex2" DataType="Int32" Description="扩展2" />
|
||||
<Column Name="Ex3" DataType="Double" Description="扩展3" />
|
||||
<Column Name="Ex4" DataType="String" Description="扩展4" />
|
||||
<Column Name="Ex5" DataType="String" Description="扩展5" />
|
||||
<Column Name="Ex6" DataType="String" Description="扩展6" />
|
||||
<Column Name="CreateUser" DataType="String" Description="创建者" />
|
||||
<Column Name="CreateUserID" DataType="Int32" Description="创建用户" />
|
||||
<Column Name="CreateIP" DataType="String" Description="创建地址" />
|
||||
<Column Name="CreateTime" DataType="DateTime" Nullable="False" Description="时间" />
|
||||
<Column Name="Remark" DataType="String" Length="500" Description="详细信息" />
|
||||
</Columns>
|
||||
<Indexes>
|
||||
<Index Columns="Action,Category,CreateTime" />
|
||||
<Index Columns="CreateUserID,CreateTime" />
|
||||
<Index Columns="CreateTime" />
|
||||
</Indexes>
|
||||
</Table>
|
||||
<Table Name="UserOnline" Description="用户在线" ConnName="Log">
|
||||
<Columns>
|
||||
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
|
||||
<Column Name="UserID" DataType="Int32" Description="用户" />
|
||||
<Column Name="Name" DataType="String" Master="True" Description="名称" />
|
||||
<Column Name="SessionID" DataType="String" Description="会话。Web的SessionID或Server的会话编号" />
|
||||
<Column Name="Times" DataType="Int32" Description="次数" />
|
||||
<Column Name="Page" DataType="String" Description="页面" />
|
||||
<Column Name="Status" DataType="String" Length="200" Description="状态" />
|
||||
<Column Name="OnlineTime" DataType="Int32" Description="在线时间。本次在线总时间,秒" />
|
||||
<Column Name="CreateIP" DataType="String" Description="创建地址" />
|
||||
<Column Name="CreateTime" DataType="DateTime" Nullable="False" Description="创建时间" />
|
||||
<Column Name="UpdateTime" DataType="DateTime" Nullable="False" Description="修改时间" />
|
||||
</Columns>
|
||||
<Indexes>
|
||||
<Index Columns="UserID" />
|
||||
<Index Columns="SessionID" />
|
||||
<Index Columns="CreateTime" />
|
||||
</Indexes>
|
||||
</Table>
|
||||
<Table Name="VisitStat" Description="访问统计" ConnName="Log">
|
||||
<Columns>
|
||||
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
|
||||
<Column Name="Level" DataType="Int32" Description="层级" Type="XCode.Statistics.StatLevels" />
|
||||
<Column Name="Time" DataType="DateTime" Description="时间" />
|
||||
<Column Name="Page" DataType="String" Nullable="False" Description="页面" />
|
||||
<Column Name="Title" DataType="String" Master="True" Description="标题" />
|
||||
<Column Name="Times" DataType="Int32" Description="次数" />
|
||||
<Column Name="Users" DataType="Int32" Description="用户" />
|
||||
<Column Name="IPs" DataType="Int32" Description="IP" />
|
||||
<Column Name="Error" DataType="Int32" Description="错误" />
|
||||
<Column Name="Cost" DataType="Int32" Description="耗时。毫秒" />
|
||||
<Column Name="MaxCost" DataType="Int32" Description="最大耗时。毫秒" />
|
||||
<Column Name="CreateTime" DataType="DateTime" Nullable="False" Description="创建时间" />
|
||||
<Column Name="UpdateTime" DataType="DateTime" Nullable="False" Description="更新时间" />
|
||||
<Column Name="Remark" DataType="String" Length="5000" Description="详细信息" />
|
||||
</Columns>
|
||||
<Indexes>
|
||||
<Index Columns="Page,Level,Time" Unique="True" />
|
||||
<Index Columns="Level,Time" />
|
||||
</Indexes>
|
||||
</Table>
|
||||
</Tables>
|
||||
@@ -1,24 +1,21 @@
|
||||
<#@ template language="C#" hostSpecific="true" debug="true" #>
|
||||
<#@ assembly name="netstandard" #>
|
||||
<#@ assembly name="$(ProjectDir)\$(OutputPath)\NewLife.Core.dll" #>
|
||||
<#@ assembly name="$(ProjectDir)\$(OutputPath)\XCode.dll" #>
|
||||
<#@ assembly name="$(ProjectDir)\..\DLL\NewLife.Core.dll" #>
|
||||
<#@ assembly name="$(ProjectDir)\..\DLL\XCode.dll" #>
|
||||
<#@ import namespace="System.Diagnostics" #>
|
||||
<#@ import namespace="System.IO" #>
|
||||
<#@ import namespace="XCode.Code" #>
|
||||
<#@ import namespace="XCode.DataAccessLayer" #>
|
||||
<#@ output extension=".log" #>
|
||||
<#
|
||||
// 设置当前工作目录
|
||||
PathHelper.BasePath = Host.ResolvePath(".");
|
||||
|
||||
// 设置如何格式化字段名,默认去掉下划线并转驼峰命名
|
||||
//ModelResolver.Current = new ModelResolver { TrimUnderline = false, Camel = false };
|
||||
|
||||
// 加载模型文件,得到数据表
|
||||
var option = new BuilderOption();
|
||||
var tables = ClassBuilder.LoadModels(null, option, out var atts);
|
||||
var tables = ClassBuilder.LoadModels("comcmsdata.xml", option, out var atts);
|
||||
EntityBuilder.FixModelFile(null, option, atts, tables);
|
||||
|
||||
|
||||
// 生成实体类
|
||||
//option.BaseClass = "I{name}";
|
||||
//option.ModelNameForCopy = "I{name}";
|
||||
@@ -35,16 +32,4 @@
|
||||
option.ClassNameTemplate = null;
|
||||
option.Output = @"Output\EntityInterfaces\";
|
||||
//ClassBuilder.BuildInterfaces(tables, option);
|
||||
|
||||
// 精确控制生成
|
||||
/*foreach (var item in tables)
|
||||
{
|
||||
var builder = new ClassBuilder
|
||||
{
|
||||
Table = item,
|
||||
Option = option.Clone(),
|
||||
};
|
||||
builder.Execute();
|
||||
builder.Save(null, true, false);
|
||||
}*/
|
||||
#>
|
||||
@@ -1,36 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("XCoder")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("XCoder")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("71539325-194b-4d56-8d88-562b33004406")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -1,89 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{71539325-194B-4D56-8D88-562B33004406}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>XCoder</RootNamespace>
|
||||
<AssemblyName>XCoder</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.VisualBasic" />
|
||||
<Reference Include="NewLife.Core, Version=8.11.7983.14989, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NewLife.Core.8.11.2021.1109\lib\net46\NewLife.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="XCode, Version=10.3.7983.14994, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NewLife.XCode.10.3.2021.1109\lib\net45\XCode.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Entity\Build.tt">
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>Build.log</LastGenOutput>
|
||||
</Content>
|
||||
<Content Include="Entity\Build_netcore.tt">
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>Build_netcore.log</LastGenOutput>
|
||||
</Content>
|
||||
<Content Include="Entity\data.project.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="Entity\Model.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Entity\Build.log">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Build.tt</DependentUpon>
|
||||
</None>
|
||||
<None Include="Entity\Build_netcore.log">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Build_netcore.tt</DependentUpon>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,25 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Model.log">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Model.tt</DependentUpon>
|
||||
</None>
|
||||
<None Update="Model.tt">
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>Model.log</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -22,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -61,7 +62,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化Tags[Tag标签]数据……");
|
||||
|
||||
// var entity = new Tags();
|
||||
// entity.Id = 0;
|
||||
// entity.TagName = "abc";
|
||||
// entity.Keywords = "abc";
|
||||
// entity.Description = "abc";
|
||||
@@ -115,7 +115,7 @@ namespace COMCMS.Core
|
||||
public static IList<Tags> FindAllByTagName(String tagName)
|
||||
{
|
||||
// 实体缓存
|
||||
if (Meta.Session.Count < 1000) return Meta.Cache.FindAll(e => e.TagName == tagName);
|
||||
if (Meta.Session.Count < 1000) return Meta.Cache.FindAll(e => e.TagName.EqualIgnoreCase(tagName));
|
||||
|
||||
return FindAll(_.TagName == tagName);
|
||||
}
|
||||
@@ -132,7 +132,7 @@ namespace COMCMS.Core
|
||||
var exp = new WhereExpression();
|
||||
|
||||
if (!tagName.IsNullOrEmpty()) exp &= _.TagName == tagName;
|
||||
if (!key.IsNullOrEmpty()) exp &= _.Keywords.Contains(key) | _.Description.Contains(key);
|
||||
if (!key.IsNullOrEmpty()) exp &= _.TagName.Contains(key) | _.Keywords.Contains(key) | _.Description.Contains(key);
|
||||
|
||||
return FindAll(exp, page);
|
||||
}
|
||||
@@ -22,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -61,7 +62,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化TagsDetail[Tag标签详情]数据……");
|
||||
|
||||
// var entity = new TagsDetail();
|
||||
// entity.Id = 0;
|
||||
// entity.TagsId = 0;
|
||||
// entity.TagName = "abc";
|
||||
// entity.TypeId = 0;
|
||||
@@ -95,12 +95,6 @@ namespace COMCMS.Core
|
||||
//[ScriptIgnore]
|
||||
public Tags Tags => Extends.Get(nameof(Tags), k => Tags.FindById(TagsId));
|
||||
|
||||
/// <summary>所属标签ID</summary>
|
||||
[XmlIgnore, IgnoreDataMember]
|
||||
//[ScriptIgnore]
|
||||
[DisplayName("所属标签ID")]
|
||||
[Map(nameof(TagsId), typeof(Tags), "Id")]
|
||||
public Int32 TagsId => Tags != null ? Tags.Id : 0;
|
||||
#endregion
|
||||
|
||||
#region 扩展查询
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static Coupon()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.KId);
|
||||
//df.Add(nameof(KId));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
// 货币保留6位小数
|
||||
DiscuountRates = Math.Round(DiscuountRates, 6);
|
||||
@@ -60,7 +66,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化Coupon[优惠券]数据……");
|
||||
|
||||
// var entity = new Coupon();
|
||||
// entity.Id = 0;
|
||||
// entity.ItemNO = "abc";
|
||||
// entity.KId = 0;
|
||||
// entity.CouponType = 0;
|
||||
@@ -118,6 +123,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From Coupon Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<Coupon> _CategoryCache = new FieldCache<Coupon>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static CouponUseLog()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.UId);
|
||||
//df.Add(nameof(UId));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
}
|
||||
|
||||
@@ -56,7 +62,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化CouponUseLog[优惠券使用记录]数据……");
|
||||
|
||||
// var entity = new CouponUseLog();
|
||||
// entity.Id = 0;
|
||||
// entity.UId = 0;
|
||||
// entity.CouponId = 0;
|
||||
// entity.ItemNO = "abc";
|
||||
@@ -89,27 +94,15 @@ namespace COMCMS.Core
|
||||
|
||||
#region 扩展属性
|
||||
/// <summary>优惠券ID</summary>
|
||||
[XmlIgnore]
|
||||
[XmlIgnore, IgnoreDataMember]
|
||||
//[ScriptIgnore]
|
||||
public Coupon Coupon { get { return Extends.Get(nameof(Coupon), k => Coupon.FindById(CouponId)); } }
|
||||
|
||||
/// <summary>优惠券ID</summary>
|
||||
[XmlIgnore]
|
||||
//[ScriptIgnore]
|
||||
[DisplayName("优惠券ID")]
|
||||
[Map(__.CouponId, typeof(Coupon), "Id")]
|
||||
public Int32 CouponId { get { return Coupon != null ? Coupon.Id : 0; } }
|
||||
/// <summary>订单编号</summary>
|
||||
[XmlIgnore]
|
||||
//[ScriptIgnore]
|
||||
public Order Order { get { return Extends.Get(nameof(Order), k => Order.FindById(OrderId)); } }
|
||||
public Coupon Coupon => Extends.Get(nameof(Coupon), k => Coupon.FindById(CouponId));
|
||||
|
||||
/// <summary>订单编号</summary>
|
||||
[XmlIgnore]
|
||||
[XmlIgnore, IgnoreDataMember]
|
||||
//[ScriptIgnore]
|
||||
[DisplayName("订单编号")]
|
||||
[Map(__.OrderId, typeof(Order), "Id")]
|
||||
public Int32 OrderId { get { return Order != null ? Order.Id : 0; } }
|
||||
public Order Order => Extends.Get(nameof(Order), k => Order.FindById(OrderId));
|
||||
|
||||
#endregion
|
||||
|
||||
#region 扩展查询
|
||||
@@ -131,6 +124,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From CouponUseLog Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<CouponUseLog> _CategoryCache = new FieldCache<CouponUseLog>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static CouponKind()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.IsLimit);
|
||||
//df.Add(nameof(IsLimit));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
}
|
||||
|
||||
@@ -56,7 +62,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化CouponKind[优惠券分类]数据……");
|
||||
|
||||
// var entity = new CouponKind();
|
||||
// entity.Id = 0;
|
||||
// entity.IsLimit = 0;
|
||||
// entity.KindName = "abc";
|
||||
// entity.CouponType = 0;
|
||||
@@ -107,6 +112,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From CouponKind Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<CouponKind> _CategoryCache = new FieldCache<CouponKind>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -8,6 +8,7 @@ using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -21,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -35,13 +37,16 @@ namespace COMCMS.Core
|
||||
Meta.Modules.Add<TimeModule>();
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
//if (!Dirtys[nameof(UpdateTime)]) UpdateTime = DateTime.Now;
|
||||
}
|
||||
@@ -56,7 +61,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化WeixinResponseContent[公众平台回复信息]数据……");
|
||||
|
||||
// var entity = new WeixinResponseContent();
|
||||
// entity.Id = 0;
|
||||
// entity.OpenId = "abc";
|
||||
// entity.RequestType = "abc";
|
||||
// entity.RequestContent = "abc";
|
||||
@@ -106,6 +110,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From WeixinResponseContent Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<WeixinResponseContent> _CategoryCache = new FieldCache<WeixinResponseContent>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -33,13 +36,16 @@ namespace COMCMS.Core
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
}
|
||||
|
||||
@@ -53,7 +59,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化OtherConfig[其他配置]数据……");
|
||||
|
||||
// var entity = new OtherConfig();
|
||||
// entity.Id = 0;
|
||||
// entity.ConfigName = "abc";
|
||||
// entity.ConfigValue = "abc";
|
||||
// entity.LastUpdateTime = DateTime.Now;
|
||||
@@ -99,6 +104,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From OtherConfig Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<OtherConfig> _CategoryCache = new FieldCache<OtherConfig>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static Link()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.KId);
|
||||
//df.Add(nameof(KId));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
}
|
||||
|
||||
@@ -56,7 +62,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化Link[友情连接详情]数据……");
|
||||
|
||||
// var entity = new Link();
|
||||
// entity.Id = 0;
|
||||
// entity.KId = 0;
|
||||
// entity.Title = "abc";
|
||||
// entity.LinkURL = "abc";
|
||||
@@ -106,6 +111,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From Link Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<Link> _CategoryCache = new FieldCache<Link>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static LinkKind()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.Rank);
|
||||
//df.Add(nameof(Rank));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
}
|
||||
|
||||
@@ -56,7 +62,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化LinkKind[友情链接分类]数据……");
|
||||
|
||||
// var entity = new LinkKind();
|
||||
// entity.Id = 0;
|
||||
// entity.KindName = "abc";
|
||||
// entity.KindInfo = "abc";
|
||||
// entity.Pic = "abc";
|
||||
@@ -103,6 +108,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From LinkKind Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<LinkKind> _CategoryCache = new FieldCache<LinkKind>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static AdminMenu()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.PId);
|
||||
//df.Add(nameof(PId));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
}
|
||||
|
||||
@@ -56,7 +62,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化AdminMenu[后台菜单]数据……");
|
||||
|
||||
// var entity = new AdminMenu();
|
||||
// entity.Id = 0;
|
||||
// entity.MenuKey = "abc";
|
||||
// entity.MenuName = "abc";
|
||||
// entity.PermissionKey = "abc";
|
||||
@@ -111,6 +116,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From AdminMenu Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<AdminMenu> _CategoryCache = new FieldCache<AdminMenu>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static AdminMenuEvent()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.MenuId);
|
||||
//df.Add(nameof(MenuId));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
}
|
||||
|
||||
@@ -56,7 +62,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化AdminMenuEvent[后台菜单对应的事件权限]数据……");
|
||||
|
||||
// var entity = new AdminMenuEvent();
|
||||
// entity.Id = 0;
|
||||
// entity.MenuId = 0;
|
||||
// entity.MenuKey = "abc";
|
||||
// entity.EventId = 0;
|
||||
@@ -104,6 +109,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From AdminMenuEvent Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<AdminMenuEvent> _CategoryCache = new FieldCache<AdminMenuEvent>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,21 +32,24 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static Product()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.KId);
|
||||
//df.Add(nameof(KId));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
Meta.Modules.Add<TimeModule>();
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
// 货币保留6位小数
|
||||
Price = Math.Round(Price, 6);
|
||||
@@ -64,7 +70,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化Product[商品]数据……");
|
||||
|
||||
// var entity = new Product();
|
||||
// entity.Id = 0;
|
||||
// entity.KId = 0;
|
||||
// entity.BId = 0;
|
||||
// entity.ShopId = 0;
|
||||
@@ -152,27 +157,19 @@ namespace COMCMS.Core
|
||||
|
||||
#region 扩展属性
|
||||
/// <summary>店铺ID</summary>
|
||||
[XmlIgnore]
|
||||
[XmlIgnore, IgnoreDataMember]
|
||||
//[ScriptIgnore]
|
||||
public Shop Shop { get { return Extends.Get(nameof(Shop), k => Shop.FindById(ShopId)); } }
|
||||
|
||||
/// <summary>店铺ID</summary>
|
||||
[XmlIgnore]
|
||||
//[ScriptIgnore]
|
||||
[DisplayName("店铺ID")]
|
||||
[Map(__.ShopId, typeof(Shop), "Id")]
|
||||
public Int32 ShopId { get { return Shop != null ? Shop.Id : 0; } }
|
||||
/// <summary>广告ID</summary>
|
||||
[XmlIgnore]
|
||||
//[ScriptIgnore]
|
||||
public Ads Ads { get { return Extends.Get(nameof(Ads), k => Ads.FindById(AdsId)); } }
|
||||
public Shop Shop => Extends.Get(nameof(Shop), k => Shop.FindById(ShopId));
|
||||
|
||||
/// <summary>广告ID</summary>
|
||||
[XmlIgnore]
|
||||
[XmlIgnore, IgnoreDataMember]
|
||||
//[ScriptIgnore]
|
||||
[DisplayName("广告ID")]
|
||||
[Map(__.AdsId, typeof(Ads), "Id")]
|
||||
public String AdsTitle { get { return Ads?.Title; } }
|
||||
public Ads Ads => Extends.Get(nameof(Ads), k => Ads.FindById(AdsId));
|
||||
|
||||
/// <summary>广告ID</summary>
|
||||
[Map(nameof(AdsId), typeof(Ads), "Id")]
|
||||
public String AdsTitle => Ads?.Title;
|
||||
|
||||
#endregion
|
||||
|
||||
#region 扩展查询
|
||||
@@ -194,6 +191,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From Product Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<Product> _CategoryCache = new FieldCache<Product>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static Category()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.IsList);
|
||||
//df.Add(nameof(IsList));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
}
|
||||
|
||||
@@ -56,7 +62,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化Category[商品栏目]数据……");
|
||||
|
||||
// var entity = new Category();
|
||||
// entity.Id = 0;
|
||||
// entity.KindName = "abc";
|
||||
// entity.SubTitle = "abc";
|
||||
// entity.KindTitle = "abc";
|
||||
@@ -110,16 +115,14 @@ namespace COMCMS.Core
|
||||
|
||||
#region 扩展属性
|
||||
/// <summary>广告ID</summary>
|
||||
[XmlIgnore]
|
||||
[XmlIgnore, IgnoreDataMember]
|
||||
//[ScriptIgnore]
|
||||
public Ads Ads { get { return Extends.Get(nameof(Ads), k => Ads.FindById(AdsId)); } }
|
||||
public Ads Ads => Extends.Get(nameof(Ads), k => Ads.FindById(AdsId));
|
||||
|
||||
/// <summary>广告ID</summary>
|
||||
[XmlIgnore]
|
||||
//[ScriptIgnore]
|
||||
[DisplayName("广告ID")]
|
||||
[Map(__.AdsId, typeof(Ads), "Id")]
|
||||
public String AdsTitle { get { return Ads?.Title; } }
|
||||
[Map(nameof(AdsId), typeof(Ads), "Id")]
|
||||
public String AdsTitle => Ads?.Title;
|
||||
|
||||
#endregion
|
||||
|
||||
#region 扩展查询
|
||||
@@ -141,6 +144,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From Category Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<Category> _CategoryCache = new FieldCache<Category>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static Shop()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.KId);
|
||||
//df.Add(nameof(KId));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
// 货币保留6位小数
|
||||
Latitude = Math.Round(Latitude, 6);
|
||||
@@ -66,7 +72,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化Shop[商家]数据……");
|
||||
|
||||
// var entity = new Shop();
|
||||
// entity.Id = 0;
|
||||
// entity.ShopName = "abc";
|
||||
// entity.KId = 0;
|
||||
// entity.AId = 0;
|
||||
@@ -156,6 +161,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From Shop Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<Shop> _CategoryCache = new FieldCache<Shop>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static ShopCategory()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.IsList);
|
||||
//df.Add(nameof(IsList));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
}
|
||||
|
||||
@@ -56,7 +62,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化ShopCategory[商家分类]数据……");
|
||||
|
||||
// var entity = new ShopCategory();
|
||||
// entity.Id = 0;
|
||||
// entity.KindName = "abc";
|
||||
// entity.SubTitle = "abc";
|
||||
// entity.KindTitle = "abc";
|
||||
@@ -109,16 +114,14 @@ namespace COMCMS.Core
|
||||
|
||||
#region 扩展属性
|
||||
/// <summary>广告ID</summary>
|
||||
[XmlIgnore]
|
||||
[XmlIgnore, IgnoreDataMember]
|
||||
//[ScriptIgnore]
|
||||
public Ads Ads { get { return Extends.Get(nameof(Ads), k => Ads.FindById(AdsId)); } }
|
||||
public Ads Ads => Extends.Get(nameof(Ads), k => Ads.FindById(AdsId));
|
||||
|
||||
/// <summary>广告ID</summary>
|
||||
[XmlIgnore]
|
||||
//[ScriptIgnore]
|
||||
[DisplayName("广告ID")]
|
||||
[Map(__.AdsId, typeof(Ads), "Id")]
|
||||
public String AdsTitle { get { return Ads?.Title; } }
|
||||
[Map(nameof(AdsId), typeof(Ads), "Id")]
|
||||
public String AdsTitle => Ads?.Title;
|
||||
|
||||
#endregion
|
||||
|
||||
#region 扩展查询
|
||||
@@ -140,6 +143,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From ShopCategory Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<ShopCategory> _CategoryCache = new FieldCache<ShopCategory>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static OnlinePayOrder()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.OrderId);
|
||||
//df.Add(nameof(OrderId));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
// 货币保留6位小数
|
||||
TotalPrice = Math.Round(TotalPrice, 6);
|
||||
@@ -58,7 +64,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化OnlinePayOrder[在线支付订单]数据……");
|
||||
|
||||
// var entity = new OnlinePayOrder();
|
||||
// entity.Id = 0;
|
||||
// entity.PayOrderNum = "abc";
|
||||
// entity.OrderId = 0;
|
||||
// entity.OrderNum = "abc";
|
||||
@@ -79,6 +84,7 @@ namespace COMCMS.Core
|
||||
// entity.TypeId = 0;
|
||||
// entity.MyType = 0;
|
||||
// entity.Title = "abc";
|
||||
// entity.OutTradeNo = "abc";
|
||||
// entity.Insert();
|
||||
|
||||
// if (XTrace.Debug) XTrace.WriteLine("完成初始化OnlinePayOrder[在线支付订单]数据!");
|
||||
@@ -101,16 +107,10 @@ namespace COMCMS.Core
|
||||
|
||||
#region 扩展属性
|
||||
/// <summary>订单ID</summary>
|
||||
[XmlIgnore]
|
||||
[XmlIgnore, IgnoreDataMember]
|
||||
//[ScriptIgnore]
|
||||
public Order Order { get { return Extends.Get(nameof(Order), k => Order.FindById(OrderId)); } }
|
||||
public Order Order => Extends.Get(nameof(Order), k => Order.FindById(OrderId));
|
||||
|
||||
/// <summary>订单ID</summary>
|
||||
[XmlIgnore]
|
||||
//[ScriptIgnore]
|
||||
[DisplayName("订单ID")]
|
||||
[Map(__.OrderId, typeof(Order), "Id")]
|
||||
public Int32 OrderId { get { return Order != null ? Order.Id : 0; } }
|
||||
#endregion
|
||||
|
||||
#region 扩展查询
|
||||
@@ -132,6 +132,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From OnlinePayOrder Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<OnlinePayOrder> _CategoryCache = new FieldCache<OnlinePayOrder>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static WXAppSession()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.UId);
|
||||
//df.Add(nameof(UId));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
}
|
||||
|
||||
@@ -56,7 +62,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化WXAppSession[小程序Session]数据……");
|
||||
|
||||
// var entity = new WXAppSession();
|
||||
// entity.Id = 0;
|
||||
// entity.UId = 0;
|
||||
// entity.Ip = "abc";
|
||||
// entity.Key = "abc";
|
||||
@@ -105,6 +110,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From WXAppSession Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<WXAppSession> _CategoryCache = new FieldCache<WXAppSession>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static AdsKind()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.Rank);
|
||||
//df.Add(nameof(Rank));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
}
|
||||
|
||||
@@ -56,7 +62,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化AdsKind[广告类别]数据……");
|
||||
|
||||
// var entity = new AdsKind();
|
||||
// entity.Id = 0;
|
||||
// entity.KindName = "abc";
|
||||
// entity.KindInfo = "abc";
|
||||
// entity.Rank = 0;
|
||||
@@ -102,6 +107,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From AdsKind Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<AdsKind> _CategoryCache = new FieldCache<AdsKind>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static Ads()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.KId);
|
||||
//df.Add(nameof(KId));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
}
|
||||
|
||||
@@ -56,7 +62,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化Ads[广告详情]数据……");
|
||||
|
||||
// var entity = new Ads();
|
||||
// entity.Id = 0;
|
||||
// entity.Title = "abc";
|
||||
// entity.Content = "abc";
|
||||
// entity.KId = 0;
|
||||
@@ -107,6 +112,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From Ads Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<Ads> _CategoryCache = new FieldCache<Ads>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -8,6 +8,7 @@ using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -21,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -30,21 +32,24 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static WeixinRequestRule()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.RequestType);
|
||||
//df.Add(nameof(RequestType));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
Meta.Modules.Add<TimeModule>();
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
//if (!Dirtys[nameof(UpdateTime)]) UpdateTime = DateTime.Now;
|
||||
}
|
||||
@@ -59,7 +64,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化WeixinRequestRule[微信公众号回复规则]数据……");
|
||||
|
||||
// var entity = new WeixinRequestRule();
|
||||
// entity.Id = 0;
|
||||
// entity.RuleName = "abc";
|
||||
// entity.Keywords = "abc";
|
||||
// entity.RequestType = 0;
|
||||
@@ -111,6 +115,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From WeixinRequestRule Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<WeixinRequestRule> _CategoryCache = new FieldCache<WeixinRequestRule>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,21 +32,24 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static Food()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.KId);
|
||||
//df.Add(nameof(KId));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
Meta.Modules.Add<TimeModule>();
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
// 货币保留6位小数
|
||||
Price = Math.Round(Price, 6);
|
||||
@@ -64,7 +70,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化Food[快餐]数据……");
|
||||
|
||||
// var entity = new Food();
|
||||
// entity.Id = 0;
|
||||
// entity.KId = 0;
|
||||
// entity.BId = 0;
|
||||
// entity.ShopId = 0;
|
||||
@@ -151,27 +156,19 @@ namespace COMCMS.Core
|
||||
|
||||
#region 扩展属性
|
||||
/// <summary>店铺ID</summary>
|
||||
[XmlIgnore]
|
||||
[XmlIgnore, IgnoreDataMember]
|
||||
//[ScriptIgnore]
|
||||
public Shop Shop { get { return Extends.Get(nameof(Shop), k => Shop.FindById(ShopId)); } }
|
||||
|
||||
/// <summary>店铺ID</summary>
|
||||
[XmlIgnore]
|
||||
//[ScriptIgnore]
|
||||
[DisplayName("店铺ID")]
|
||||
[Map(__.ShopId, typeof(Shop), "Id")]
|
||||
public Int32 ShopId { get { return Shop != null ? Shop.Id : 0; } }
|
||||
/// <summary>广告ID</summary>
|
||||
[XmlIgnore]
|
||||
//[ScriptIgnore]
|
||||
public Ads Ads { get { return Extends.Get(nameof(Ads), k => Ads.FindById(AdsId)); } }
|
||||
public Shop Shop => Extends.Get(nameof(Shop), k => Shop.FindById(ShopId));
|
||||
|
||||
/// <summary>广告ID</summary>
|
||||
[XmlIgnore]
|
||||
[XmlIgnore, IgnoreDataMember]
|
||||
//[ScriptIgnore]
|
||||
[DisplayName("广告ID")]
|
||||
[Map(__.AdsId, typeof(Ads), "Id")]
|
||||
public String AdsTitle { get { return Ads?.Title; } }
|
||||
public Ads Ads => Extends.Get(nameof(Ads), k => Ads.FindById(AdsId));
|
||||
|
||||
/// <summary>广告ID</summary>
|
||||
[Map(nameof(AdsId), typeof(Ads), "Id")]
|
||||
public String AdsTitle => Ads?.Title;
|
||||
|
||||
#endregion
|
||||
|
||||
#region 扩展查询
|
||||
@@ -193,6 +190,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From Food Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<Food> _CategoryCache = new FieldCache<Food>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -8,6 +8,7 @@ using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -21,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -32,18 +34,21 @@ namespace COMCMS.Core
|
||||
{
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.Rank);
|
||||
//df.Add(nameof(Rank));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
}
|
||||
|
||||
@@ -57,7 +62,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化DataDictionary[数据字典]数据……");
|
||||
|
||||
// var entity = new DataDictionary();
|
||||
// entity.Id = 0;
|
||||
// entity.Key = "abc";
|
||||
// entity.Description = "abc";
|
||||
// entity.Rank = 0;
|
||||
@@ -106,7 +110,7 @@ namespace COMCMS.Core
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From DataDictionary Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<DataDictionary> _CategoryCache = new FieldCache<DataDictionary>(_.Category)
|
||||
//static readonly FieldCache<DataDictionary> _CategoryCache = new FieldCache<DataDictionary>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
@@ -8,6 +8,7 @@ using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -21,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -32,18 +34,21 @@ namespace COMCMS.Core
|
||||
{
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.DataDictionaryId);
|
||||
//df.Add(nameof(DataDictionaryId));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
}
|
||||
|
||||
@@ -57,7 +62,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化DataDictionaryDetail[数据字典详情]数据……");
|
||||
|
||||
// var entity = new DataDictionaryDetail();
|
||||
// entity.Id = 0;
|
||||
// entity.DataDictionaryId = 0;
|
||||
// entity.Val = "abc";
|
||||
// entity.Title = "abc";
|
||||
@@ -91,12 +95,6 @@ namespace COMCMS.Core
|
||||
//[ScriptIgnore]
|
||||
public DataDictionary DataDictionary => Extends.Get(nameof(DataDictionary), k => DataDictionary.FindById(DataDictionaryId));
|
||||
|
||||
/// <summary>字典ID</summary>
|
||||
[XmlIgnore, IgnoreDataMember]
|
||||
//[ScriptIgnore]
|
||||
[DisplayName("字典ID")]
|
||||
[Map(__.DataDictionaryId, typeof(DataDictionary), "Id")]
|
||||
public Int32 DataDictionaryId => DataDictionary != null ? DataDictionary.Id : 0;
|
||||
#endregion
|
||||
|
||||
#region 扩展查询
|
||||
@@ -120,7 +118,7 @@ namespace COMCMS.Core
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From DataDictionaryDetail Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<DataDictionaryDetail> _CategoryCache = new FieldCache<DataDictionaryDetail>(_.Category)
|
||||
//static readonly FieldCache<DataDictionaryDetail> _CategoryCache = new FieldCache<DataDictionaryDetail>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,21 +32,24 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static Article()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.KId);
|
||||
//df.Add(nameof(KId));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
Meta.Modules.Add<TimeModule>();
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
//if (!Dirtys[nameof(UpdateTime)]) UpdateTime = DateTime.Now;
|
||||
}
|
||||
@@ -58,7 +64,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化Article[文章]数据……");
|
||||
|
||||
// var entity = new Article();
|
||||
// entity.Id = 0;
|
||||
// entity.KId = 0;
|
||||
// entity.Title = "abc";
|
||||
// entity.SubTitle = "abc";
|
||||
@@ -117,16 +122,14 @@ namespace COMCMS.Core
|
||||
|
||||
#region 扩展属性
|
||||
/// <summary>广告ID</summary>
|
||||
[XmlIgnore]
|
||||
[XmlIgnore, IgnoreDataMember]
|
||||
//[ScriptIgnore]
|
||||
public Ads Ads { get { return Extends.Get(nameof(Ads), k => Ads.FindById(AdsId)); } }
|
||||
public Ads Ads => Extends.Get(nameof(Ads), k => Ads.FindById(AdsId));
|
||||
|
||||
/// <summary>广告ID</summary>
|
||||
[XmlIgnore]
|
||||
//[ScriptIgnore]
|
||||
[DisplayName("广告ID")]
|
||||
[Map(__.AdsId, typeof(Ads), "Id")]
|
||||
public String AdsTitle { get { return Ads?.Title; } }
|
||||
[Map(nameof(AdsId), typeof(Ads), "Id")]
|
||||
public String AdsTitle => Ads?.Title;
|
||||
|
||||
#endregion
|
||||
|
||||
#region 扩展查询
|
||||
@@ -148,6 +151,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From Article Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<Article> _CategoryCache = new FieldCache<Article>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static ArticleCategory()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.IsList);
|
||||
//df.Add(nameof(IsList));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
}
|
||||
|
||||
@@ -56,7 +62,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化ArticleCategory[文章栏目]数据……");
|
||||
|
||||
// var entity = new ArticleCategory();
|
||||
// entity.Id = 0;
|
||||
// entity.KindName = "abc";
|
||||
// entity.SubTitle = "abc";
|
||||
// entity.KindTitle = "abc";
|
||||
@@ -110,16 +115,14 @@ namespace COMCMS.Core
|
||||
|
||||
#region 扩展属性
|
||||
/// <summary>广告ID</summary>
|
||||
[XmlIgnore]
|
||||
[XmlIgnore, IgnoreDataMember]
|
||||
//[ScriptIgnore]
|
||||
public Ads Ads { get { return Extends.Get(nameof(Ads), k => Ads.FindById(AdsId)); } }
|
||||
public Ads Ads => Extends.Get(nameof(Ads), k => Ads.FindById(AdsId));
|
||||
|
||||
/// <summary>广告ID</summary>
|
||||
[XmlIgnore]
|
||||
//[ScriptIgnore]
|
||||
[DisplayName("广告ID")]
|
||||
[Map(__.AdsId, typeof(Ads), "Id")]
|
||||
public String AdsTitle { get { return Ads?.Title; } }
|
||||
[Map(nameof(AdsId), typeof(Ads), "Id")]
|
||||
public String AdsTitle => Ads?.Title;
|
||||
|
||||
#endregion
|
||||
|
||||
#region 扩展查询
|
||||
@@ -141,6 +144,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From ArticleCategory Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<ArticleCategory> _CategoryCache = new FieldCache<ArticleCategory>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static Member()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.RoleId);
|
||||
//df.Add(nameof(RoleId));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
// 货币保留6位小数
|
||||
Balance = Math.Round(Balance, 6);
|
||||
@@ -67,7 +73,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化Member[用户]数据……");
|
||||
|
||||
// var entity = new Member();
|
||||
// entity.Id = 0;
|
||||
// entity.UserName = "abc";
|
||||
// entity.PassWord = "abc";
|
||||
// entity.Salt = "abc";
|
||||
@@ -170,6 +175,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From Member Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<Member> _CategoryCache = new FieldCache<Member>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static MemberCoupon()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.UId);
|
||||
//df.Add(nameof(UId));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
// 货币保留6位小数
|
||||
DiscuountRates = Math.Round(DiscuountRates, 6);
|
||||
@@ -60,7 +66,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化MemberCoupon[用户优惠券]数据……");
|
||||
|
||||
// var entity = new MemberCoupon();
|
||||
// entity.Id = 0;
|
||||
// entity.UId = 0;
|
||||
// entity.ItemNO = "abc";
|
||||
// entity.CouponId = 0;
|
||||
@@ -98,27 +103,15 @@ namespace COMCMS.Core
|
||||
|
||||
#region 扩展属性
|
||||
/// <summary>优惠券ID</summary>
|
||||
[XmlIgnore]
|
||||
[XmlIgnore, IgnoreDataMember]
|
||||
//[ScriptIgnore]
|
||||
public Coupon Coupon { get { return Extends.Get(nameof(Coupon), k => Coupon.FindById(CouponId)); } }
|
||||
|
||||
/// <summary>优惠券ID</summary>
|
||||
[XmlIgnore]
|
||||
//[ScriptIgnore]
|
||||
[DisplayName("优惠券ID")]
|
||||
[Map(__.CouponId, typeof(Coupon), "Id")]
|
||||
public Int32 CouponId { get { return Coupon != null ? Coupon.Id : 0; } }
|
||||
/// <summary>订单编号</summary>
|
||||
[XmlIgnore]
|
||||
//[ScriptIgnore]
|
||||
public Order Order { get { return Extends.Get(nameof(Order), k => Order.FindById(OrderId)); } }
|
||||
public Coupon Coupon => Extends.Get(nameof(Coupon), k => Coupon.FindById(CouponId));
|
||||
|
||||
/// <summary>订单编号</summary>
|
||||
[XmlIgnore]
|
||||
[XmlIgnore, IgnoreDataMember]
|
||||
//[ScriptIgnore]
|
||||
[DisplayName("订单编号")]
|
||||
[Map(__.OrderId, typeof(Order), "Id")]
|
||||
public Int32 OrderId { get { return Order != null ? Order.Id : 0; } }
|
||||
public Order Order => Extends.Get(nameof(Order), k => Order.FindById(OrderId));
|
||||
|
||||
#endregion
|
||||
|
||||
#region 扩展查询
|
||||
@@ -140,6 +133,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From MemberCoupon Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<MemberCoupon> _CategoryCache = new FieldCache<MemberCoupon>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static BalanceChangeLog()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.UId);
|
||||
//df.Add(nameof(UId));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
// 货币保留6位小数
|
||||
Reward = Math.Round(Reward, 6);
|
||||
@@ -60,7 +66,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化BalanceChangeLog[用户余额变化记录]数据……");
|
||||
|
||||
// var entity = new BalanceChangeLog();
|
||||
// entity.Id = 0;
|
||||
// entity.UId = 0;
|
||||
// entity.AdminId = 0;
|
||||
// entity.UserName = "abc";
|
||||
@@ -96,27 +101,19 @@ namespace COMCMS.Core
|
||||
|
||||
#region 扩展属性
|
||||
/// <summary>管理员ID</summary>
|
||||
[XmlIgnore]
|
||||
[XmlIgnore, IgnoreDataMember]
|
||||
//[ScriptIgnore]
|
||||
public Admin Admin { get { return Extends.Get(nameof(Admin), k => Admin.FindById(AdminId)); } }
|
||||
public Admin Admin => Extends.Get(nameof(Admin), k => Admin.FindById(AdminId));
|
||||
|
||||
/// <summary>管理员ID</summary>
|
||||
[XmlIgnore]
|
||||
//[ScriptIgnore]
|
||||
[DisplayName("管理员ID")]
|
||||
[Map(__.AdminId, typeof(Admin), "Id")]
|
||||
public String AdminUserName { get { return Admin?.UserName; } }
|
||||
/// <summary>订单ID</summary>
|
||||
[XmlIgnore]
|
||||
//[ScriptIgnore]
|
||||
public Order Order { get { return Extends.Get(nameof(Order), k => Order.FindById(OrderId)); } }
|
||||
[Map(nameof(AdminId), typeof(Admin), "Id")]
|
||||
public String AdminUserName => Admin?.UserName;
|
||||
|
||||
/// <summary>订单ID</summary>
|
||||
[XmlIgnore]
|
||||
[XmlIgnore, IgnoreDataMember]
|
||||
//[ScriptIgnore]
|
||||
[DisplayName("订单ID")]
|
||||
[Map(__.OrderId, typeof(Order), "Id")]
|
||||
public Int32 OrderId { get { return Order != null ? Order.Id : 0; } }
|
||||
public Order Order => Extends.Get(nameof(Order), k => Order.FindById(OrderId));
|
||||
|
||||
#endregion
|
||||
|
||||
#region 扩展查询
|
||||
@@ -138,6 +135,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From BalanceChangeLog Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<BalanceChangeLog> _CategoryCache = new FieldCache<BalanceChangeLog>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,21 +32,24 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static MemberAddress()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.UId);
|
||||
//df.Add(nameof(UId));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
Meta.Modules.Add<TimeModule>();
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
//if (!Dirtys[nameof(UpdateTime)]) UpdateTime = DateTime.Now;
|
||||
}
|
||||
@@ -58,7 +64,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化MemberAddress[用户地址]数据……");
|
||||
|
||||
// var entity = new MemberAddress();
|
||||
// entity.Id = 0;
|
||||
// entity.UId = 0;
|
||||
// entity.RealName = "abc";
|
||||
// entity.Tel = "abc";
|
||||
@@ -117,6 +122,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From MemberAddress Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<MemberAddress> _CategoryCache = new FieldCache<MemberAddress>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static WithdrawOrder()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.UId);
|
||||
//df.Add(nameof(UId));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
// 货币保留6位小数
|
||||
Price = Math.Round(Price, 6);
|
||||
@@ -58,7 +64,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化WithdrawOrder[用户提现订单]数据……");
|
||||
|
||||
// var entity = new WithdrawOrder();
|
||||
// entity.Id = 0;
|
||||
// entity.UId = 0;
|
||||
// entity.OrderNum = "abc";
|
||||
// entity.UserName = "abc";
|
||||
@@ -113,6 +118,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From WithdrawOrder Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<WithdrawOrder> _CategoryCache = new FieldCache<WithdrawOrder>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static MemberLog()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.UId);
|
||||
//df.Add(nameof(UId));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
}
|
||||
|
||||
@@ -56,7 +62,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化MemberLog[用户日志表]数据……");
|
||||
|
||||
// var entity = new MemberLog();
|
||||
// entity.Id = 0;
|
||||
// entity.UId = 0;
|
||||
// entity.Guid = "abc";
|
||||
// entity.UserName = "abc";
|
||||
@@ -108,6 +113,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From MemberLog Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<MemberLog> _CategoryCache = new FieldCache<MemberLog>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static MemberRoles()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.Stars);
|
||||
//df.Add(nameof(Stars));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
// 货币保留6位小数
|
||||
CashBack = Math.Round(CashBack, 6);
|
||||
@@ -64,7 +70,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化MemberRoles[用户角色]数据……");
|
||||
|
||||
// var entity = new MemberRoles();
|
||||
// entity.Id = 0;
|
||||
// entity.RoleName = "abc";
|
||||
// entity.RoleDescription = "abc";
|
||||
// entity.Stars = 0;
|
||||
@@ -123,6 +128,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From MemberRoles Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<MemberRoles> _CategoryCache = new FieldCache<MemberRoles>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static RebateChangeLog()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.UId);
|
||||
//df.Add(nameof(UId));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
// 货币保留6位小数
|
||||
Reward = Math.Round(Reward, 6);
|
||||
@@ -60,7 +66,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化RebateChangeLog[用户返现余额变化记录]数据……");
|
||||
|
||||
// var entity = new RebateChangeLog();
|
||||
// entity.Id = 0;
|
||||
// entity.UId = 0;
|
||||
// entity.AdminId = 0;
|
||||
// entity.UserName = "abc";
|
||||
@@ -97,27 +102,19 @@ namespace COMCMS.Core
|
||||
|
||||
#region 扩展属性
|
||||
/// <summary>管理员ID</summary>
|
||||
[XmlIgnore]
|
||||
[XmlIgnore, IgnoreDataMember]
|
||||
//[ScriptIgnore]
|
||||
public Admin Admin { get { return Extends.Get(nameof(Admin), k => Admin.FindById(AdminId)); } }
|
||||
public Admin Admin => Extends.Get(nameof(Admin), k => Admin.FindById(AdminId));
|
||||
|
||||
/// <summary>管理员ID</summary>
|
||||
[XmlIgnore]
|
||||
//[ScriptIgnore]
|
||||
[DisplayName("管理员ID")]
|
||||
[Map(__.AdminId, typeof(Admin), "Id")]
|
||||
public String AdminUserName { get { return Admin?.UserName; } }
|
||||
/// <summary>订单ID</summary>
|
||||
[XmlIgnore]
|
||||
//[ScriptIgnore]
|
||||
public Order Order { get { return Extends.Get(nameof(Order), k => Order.FindById(OrderId)); } }
|
||||
[Map(nameof(AdminId), typeof(Admin), "Id")]
|
||||
public String AdminUserName => Admin?.UserName;
|
||||
|
||||
/// <summary>订单ID</summary>
|
||||
[XmlIgnore]
|
||||
[XmlIgnore, IgnoreDataMember]
|
||||
//[ScriptIgnore]
|
||||
[DisplayName("订单ID")]
|
||||
[Map(__.OrderId, typeof(Order), "Id")]
|
||||
public Int32 OrderId { get { return Order != null ? Order.Id : 0; } }
|
||||
public Order Order => Extends.Get(nameof(Order), k => Order.FindById(OrderId));
|
||||
|
||||
#endregion
|
||||
|
||||
#region 扩展查询
|
||||
@@ -139,6 +136,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From RebateChangeLog Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<RebateChangeLog> _CategoryCache = new FieldCache<RebateChangeLog>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static GuestbookCategory()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.IsList);
|
||||
//df.Add(nameof(IsList));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
}
|
||||
|
||||
@@ -56,7 +62,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化GuestbookCategory[留言分类]数据……");
|
||||
|
||||
// var entity = new GuestbookCategory();
|
||||
// entity.Id = 0;
|
||||
// entity.KindName = "abc";
|
||||
// entity.SubTitle = "abc";
|
||||
// entity.KindTitle = "abc";
|
||||
@@ -109,16 +114,14 @@ namespace COMCMS.Core
|
||||
|
||||
#region 扩展属性
|
||||
/// <summary>广告ID</summary>
|
||||
[XmlIgnore]
|
||||
[XmlIgnore, IgnoreDataMember]
|
||||
//[ScriptIgnore]
|
||||
public Ads Ads { get { return Extends.Get(nameof(Ads), k => Ads.FindById(AdsId)); } }
|
||||
public Ads Ads => Extends.Get(nameof(Ads), k => Ads.FindById(AdsId));
|
||||
|
||||
/// <summary>广告ID</summary>
|
||||
[XmlIgnore]
|
||||
//[ScriptIgnore]
|
||||
[DisplayName("广告ID")]
|
||||
[Map(__.AdsId, typeof(Ads), "Id")]
|
||||
public String AdsTitle { get { return Ads?.Title; } }
|
||||
[Map(nameof(AdsId), typeof(Ads), "Id")]
|
||||
public String AdsTitle => Ads?.Title;
|
||||
|
||||
#endregion
|
||||
|
||||
#region 扩展查询
|
||||
@@ -140,6 +143,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From GuestbookCategory Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<GuestbookCategory> _CategoryCache = new FieldCache<GuestbookCategory>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static Guestbook()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.KId);
|
||||
//df.Add(nameof(KId));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
}
|
||||
|
||||
@@ -56,7 +62,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化Guestbook[留言详情]数据……");
|
||||
|
||||
// var entity = new Guestbook();
|
||||
// entity.Id = 0;
|
||||
// entity.KId = 0;
|
||||
// entity.UId = 0;
|
||||
// entity.Title = "abc";
|
||||
@@ -121,6 +126,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From Guestbook Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<Guestbook> _CategoryCache = new FieldCache<Guestbook>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static TargetEvent()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.IsDisable);
|
||||
//df.Add(nameof(IsDisable));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
}
|
||||
|
||||
@@ -56,7 +62,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化TargetEvent[目标事件]数据……");
|
||||
|
||||
// var entity = new TargetEvent();
|
||||
// entity.Id = 0;
|
||||
// entity.EventKey = "abc";
|
||||
// entity.EventName = "abc";
|
||||
// entity.IsDisable = 0;
|
||||
@@ -103,6 +108,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From TargetEvent Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<TargetEvent> _CategoryCache = new FieldCache<TargetEvent>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static Admin()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.UserLevel);
|
||||
//df.Add(nameof(UserLevel));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
}
|
||||
|
||||
@@ -56,7 +62,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化Admin[管理员]数据……");
|
||||
|
||||
// var entity = new Admin();
|
||||
// entity.Id = 0;
|
||||
// entity.UserName = "abc";
|
||||
// entity.PassWord = "abc";
|
||||
// entity.Salt = "abc";
|
||||
@@ -113,6 +118,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From Admin Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<Admin> _CategoryCache = new FieldCache<Admin>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
@@ -20,6 +22,7 @@ using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
using XCode.Membership;
|
||||
using XCode.Shards;
|
||||
|
||||
namespace COMCMS.Core
|
||||
{
|
||||
@@ -29,20 +32,23 @@ namespace COMCMS.Core
|
||||
#region 对象操作
|
||||
static AdminLog()
|
||||
{
|
||||
// 累加字段
|
||||
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
|
||||
//var df = Meta.Factory.AdditionalFields;
|
||||
//df.Add(__.UId);
|
||||
//df.Add(nameof(UId));
|
||||
|
||||
// 过滤器 UserModule、TimeModule、IPModule
|
||||
}
|
||||
|
||||
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <summary>验证并修补数据,通过抛出异常的方式提示验证失败。</summary>
|
||||
/// <param name="isNew">是否插入</param>
|
||||
public override void Valid(Boolean isNew)
|
||||
{
|
||||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
// 建议先调用基类方法,基类方法会做一些统一处理
|
||||
base.Valid(isNew);
|
||||
|
||||
// 在新插入数据或者修改了指定字段时进行修正
|
||||
}
|
||||
|
||||
@@ -56,7 +62,6 @@ namespace COMCMS.Core
|
||||
// if (XTrace.Debug) XTrace.WriteLine("开始初始化AdminLog[管理日志表]数据……");
|
||||
|
||||
// var entity = new AdminLog();
|
||||
// entity.Id = 0;
|
||||
// entity.UId = 0;
|
||||
// entity.Guid = "abc";
|
||||
// entity.UserName = "abc";
|
||||
@@ -108,6 +113,16 @@ namespace COMCMS.Core
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
||||
// Select Count(Id) as Id,Category From AdminLog Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<AdminLog> _CategoryCache = new FieldCache<AdminLog>(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
||||
///// <summary>获取类别列表,字段缓存10分钟,分组统计数据最多的前20种,用于魔方前台下拉选择</summary>
|
||||
///// <returns></returns>
|
||||
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
|
||||
#endregion
|
||||
|
||||
#region 业务操作
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user