diff --git a/CoreCms.Net.Configuration/AppSettingsConstVars.cs b/CoreCms.Net.Configuration/AppSettingsConstVars.cs
index 0f315abb..13c5771a 100644
--- a/CoreCms.Net.Configuration/AppSettingsConstVars.cs
+++ b/CoreCms.Net.Configuration/AppSettingsConstVars.cs
@@ -132,40 +132,6 @@ namespace CoreCms.Net.Configuration
public static readonly string PayCallBackAlipayRefundUrl = AppSettingsHelper.GetContent("PayCallBack", "AlipayRefundUrl");
#endregion
-
- #region 易联云打印机================================================================================
-
- ///
- /// 是否开启
- ///
- public static readonly bool YiLianYunConfigEnabled = AppSettingsHelper.GetContent("YiLianYunConfig", "Enabled").ObjToBool();
- ///
- /// 应用ID
- ///
- public static readonly string YiLianYunConfigClientId = AppSettingsHelper.GetContent("YiLianYunConfig", "ClientId");
- ///
- /// 应用密钥
- ///
- public static readonly string YiLianYunConfigClientSecret = AppSettingsHelper.GetContent("YiLianYunConfig", "ClientSecret");
- ///
- /// 打印机设备号
- ///
- public static readonly string YiLianYunConfigMachineCode = AppSettingsHelper.GetContent("YiLianYunConfig", "MachineCode");
- ///
- /// 打印机终端密钥
- ///
- public static readonly string YiLianYunConfigMsign = AppSettingsHelper.GetContent("YiLianYunConfig", "Msign");
- ///
- /// 打印机名称
- ///
- public static readonly string YiLianYunConfigPrinterName = AppSettingsHelper.GetContent("YiLianYunConfig", "PrinterName");
- ///
- /// 打印机设置联系方式
- ///
- public static readonly string YiLianYunConfigPhone = AppSettingsHelper.GetContent("YiLianYunConfig", "Phone");
-
- #endregion
-
#region HangFire定时任务================================================================================
///
/// 登录账号
diff --git a/CoreCms.Net.Configuration/GlobalConstVars.cs b/CoreCms.Net.Configuration/GlobalConstVars.cs
index 9eb6597b..9390fa59 100644
--- a/CoreCms.Net.Configuration/GlobalConstVars.cs
+++ b/CoreCms.Net.Configuration/GlobalConstVars.cs
@@ -413,10 +413,7 @@ namespace CoreCms.Net.Configuration
/// 微信自定义交易组件-同步创建售后单
///
public const string TransactionComponentAfterSaleCreateSync = "TransactionComponentAfterSaleCreateSyncQueue";
-
-
-
-
+
//用户相关
@@ -428,6 +425,10 @@ namespace CoreCms.Net.Configuration
//发送微信模板消息
public const string MessageSendWxMessageTemplet = "MessageSendWxMessageTempletQueue";
+ ///
+ /// 支付宝支付成功后推送到接口进行数据处理
+ ///
+ public const string AliPayNotice = "AliPayNoticeQueue";
}
diff --git a/CoreCms.Net.Configuration/GlobalEnumVars.cs b/CoreCms.Net.Configuration/GlobalEnumVars.cs
index 7d577538..70e13a7e 100644
--- a/CoreCms.Net.Configuration/GlobalEnumVars.cs
+++ b/CoreCms.Net.Configuration/GlobalEnumVars.cs
@@ -617,7 +617,7 @@ namespace CoreCms.Net.Configuration
/// 秒杀
///
[Description("秒杀")]
- Skill = 4,
+ Seckill = 4,
///
/// 砍价
///
@@ -1043,7 +1043,7 @@ namespace CoreCms.Net.Configuration
/// 秒杀
///
[Description("秒杀")]
- Skill = 4,
+ Seckill = 4,
///
/// 砍价
///
diff --git a/CoreCms.Net.Configuration/GlobalErrorCodeVars.cs b/CoreCms.Net.Configuration/GlobalErrorCodeVars.cs
index 362bbcf8..29dbbdf6 100644
--- a/CoreCms.Net.Configuration/GlobalErrorCodeVars.cs
+++ b/CoreCms.Net.Configuration/GlobalErrorCodeVars.cs
@@ -431,6 +431,7 @@ namespace CoreCms.Net.Configuration
public const string Code15611 = "您已超过该活动最大购买量";
public const string Code15612 = "货品折扣后价格已经小于0元";
public const string Code15613 = "您不能参加自己的开团";
+
//微信消息
public const string Code16001 = "请输入标题";
@@ -546,6 +547,7 @@ namespace CoreCms.Net.Configuration
public const string Code21006 = "货品折扣后价格已经小于0";
+
//会员管理 -21000
//商品管理 -22000
diff --git a/CoreCms.Net.Core/AOP/RedisCacheAop.cs b/CoreCms.Net.Core/AOP/RedisCacheAop.cs
index ea4ca252..03b643b7 100644
--- a/CoreCms.Net.Core/AOP/RedisCacheAop.cs
+++ b/CoreCms.Net.Core/AOP/RedisCacheAop.cs
@@ -78,7 +78,7 @@ namespace CoreCms.Net.Core.AOP
}
response ??= string.Empty;
- _cache.Set(cacheKey, response, TimeSpan.FromMinutes(qCachingAttribute.AbsoluteExpiration)).Wait();
+ _cache.SetAsync(cacheKey, response, TimeSpan.FromMinutes(qCachingAttribute.AbsoluteExpiration)).Wait();
}
}
else
diff --git a/CoreCms.Net.Core/Config/CorsSetup.cs b/CoreCms.Net.Core/Config/CorsSetup.cs
index 4c41a503..e46a1b11 100644
--- a/CoreCms.Net.Core/Config/CorsSetup.cs
+++ b/CoreCms.Net.Core/Config/CorsSetup.cs
@@ -34,7 +34,8 @@ namespace CoreCms.Net.Core.Config
c.AddPolicy(AppSettingsConstVars.CorsPolicyName, policy =>
{
policy.WithOrigins(AppSettingsConstVars.CorsIPs.Split(','));
- policy.AllowAnyHeader();//Ensures that the policy allows any header.
+ //policy.AllowAnyOrigin();
+ policy.AllowAnyHeader();
policy.AllowAnyMethod();
policy.AllowCredentials();
});
diff --git a/CoreCms.Net.Core/Config/IpPolicyRateLimitSetup.cs b/CoreCms.Net.Core/Config/IpPolicyRateLimitSetup.cs
index 9367748a..94dc8abb 100644
--- a/CoreCms.Net.Core/Config/IpPolicyRateLimitSetup.cs
+++ b/CoreCms.Net.Core/Config/IpPolicyRateLimitSetup.cs
@@ -35,8 +35,8 @@ namespace CoreCms.Net.Core.Config
services.AddSingleton
();
// 配置(解析器、计数器密钥生成器)
services.AddSingleton();
-
services.AddSingleton();
+
}
}
}
diff --git a/CoreCms.Net.Core/Config/RedisMessageQueueSetup.cs b/CoreCms.Net.Core/Config/RedisMessageQueueSetup.cs
index 43a52fc9..84400a9a 100644
--- a/CoreCms.Net.Core/Config/RedisMessageQueueSetup.cs
+++ b/CoreCms.Net.Core/Config/RedisMessageQueueSetup.cs
@@ -1,11 +1,7 @@
using System;
using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using CoreCms.Net.Configuration;
-using CoreCms.Net.RedisMQ.Subscribe;
-using CoreCms.Net.Utility.Extensions;
+using CoreCms.Net.RedisMQ;
using InitQ;
using Microsoft.Extensions.DependencyInjection;
@@ -32,6 +28,7 @@ namespace CoreCms.Net.Core.Config
m.ConnectionString = AppSettingsConstVars.RedisConfigConnectionString;
//对应的订阅者类,需要new一个实例对象,当然你也可以传参,比如日志对象
m.ListSubscribe = new List() {
+ typeof(MessagePushSubscribe),
typeof(OrderAgentOrDistributionSubscribe),
typeof(OrderAutomaticDeliverySubscribe),
typeof(OrderFinishCommandSubscribe),
@@ -45,6 +42,7 @@ namespace CoreCms.Net.Core.Config
typeof(SendWxTemplateMessageSubscribe),
typeof(AfterSalesReviewSubscribe),
typeof(AfterSalesReviewForPointSubscribe),
+ typeof(AliPayNoticeSubscribe),
};
//显示日志
m.ShowLog = false;
diff --git a/CoreCms.Net.Core/Config/SqlSugarSetup.cs b/CoreCms.Net.Core/Config/SqlSugarSetup.cs
index 6128ba4f..3bd6e7d4 100644
--- a/CoreCms.Net.Core/Config/SqlSugarSetup.cs
+++ b/CoreCms.Net.Core/Config/SqlSugarSetup.cs
@@ -39,18 +39,18 @@ namespace CoreCms.Net.Core.Config
//判断数据库类型
DbType = AppSettingsConstVars.DbDbType == IocDbType.MySql.ToString() ? IocDbType.MySql : IocDbType.SqlServer,
//是否开启自动关闭数据库连接-//不设成true要手动close
- IsAutoCloseConnection = true,
+ IsAutoCloseConnection = false,
});
//设置参数
services.ConfigurationSugar(db =>
{
db.CurrentConnectionConfig.InitKeyType = InitKeyType.Attribute;
- //db.CurrentConnectionConfig.ConfigureExternalServices = new ConfigureExternalServices()
- //{
- // //判断是否开启redis设置二级缓存方式
- // DataInfoCacheService = AppSettingsConstVars.RedisUseCache ? (ICacheService)new SqlSugarRedisCache() : new SqlSugarMemoryCache()
- //};
+ db.CurrentConnectionConfig.ConfigureExternalServices = new ConfigureExternalServices()
+ {
+ //判断是否开启redis设置二级缓存方式
+ DataInfoCacheService = AppSettingsConstVars.RedisUseCache ? (ICacheService)new SqlSugarRedisCache() : new SqlSugarMemoryCache()
+ };
//执行SQL 错误事件,可监控sql(暂时屏蔽,需要可开启)
//db.Aop.OnLogExecuting = (sql, p) =>
diff --git a/CoreCms.Net.Core/Config/YiLianYunSetup.cs b/CoreCms.Net.Core/Config/YiLianYunSetup.cs
deleted file mode 100644
index 6ff6d21c..00000000
--- a/CoreCms.Net.Core/Config/YiLianYunSetup.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using CoreCms.Net.Configuration;
-using CoreCms.Net.RedisMQ.Subscribe;
-using CoreCms.Net.Utility.Extensions;
-using InitQ;
-using Microsoft.Extensions.DependencyInjection;
-using Qc.YilianyunSdk;
-
-namespace CoreCms.Net.Core.Config
-{
- ///
- /// 易联云打印机 启动服务
- ///
- public static class YiLianYunSetup
- {
- public static void AddYiLianYunSetup(this IServiceCollection services)
- {
- if (services == null) throw new ArgumentNullException(nameof(services));
-
- services.AddYilianyunSdk(opt =>
- {
- // 应用ID请自行前往 dev.10ss.net 获取
- opt.ClientId = AppSettingsConstVars.YiLianYunConfigClientId;
- opt.ClientSecret = AppSettingsConstVars.YiLianYunConfigClientSecret;
- opt.YilianyunClientType = YilianyunClientType.自有应用;
- opt.SaveTokenDirPath = "./App_Data/YiLianYunLogs";
- });
- }
- }
-}
diff --git a/CoreCms.Net.Core/CoreCms.Net.Core.csproj b/CoreCms.Net.Core/CoreCms.Net.Core.csproj
index db1d40a3..01f43ae5 100644
--- a/CoreCms.Net.Core/CoreCms.Net.Core.csproj
+++ b/CoreCms.Net.Core/CoreCms.Net.Core.csproj
@@ -14,21 +14,20 @@
-
-
-
-
+
+
+
+
-
+
-
-
-
-
-
+
+
+
+
diff --git a/CoreCms.Net.IRepository/Agent/ICoreCmsAgentGoodsRepository.cs b/CoreCms.Net.IRepository/Agent/ICoreCmsAgentGoodsRepository.cs
index c19f1ef2..f2ec593b 100644
--- a/CoreCms.Net.IRepository/Agent/ICoreCmsAgentGoodsRepository.cs
+++ b/CoreCms.Net.IRepository/Agent/ICoreCmsAgentGoodsRepository.cs
@@ -34,7 +34,7 @@ namespace CoreCms.Net.IRepository
///
/// 是否使用WITH(NOLOCK)
///
- new Task> QueryPageAsync(
+ Task> QueryPageAsync(
Expression> predicate,
Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
int pageSize = 20, bool blUseNoLock = false);
@@ -59,14 +59,6 @@ namespace CoreCms.Net.IRepository
Task UpdateAsync(CoreCmsAgentGoods entity, List products);
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- new Task UpdateAsync(List entity);
-
-
///
/// 重写删除指定ID的数据
///
@@ -74,14 +66,6 @@ namespace CoreCms.Net.IRepository
///
Task DeleteByIdAsync(int id);
-
- ///
- /// 重写删除指定ID集合的数据(批量删除)
- ///
- ///
- ///
- new Task DeleteByIdsAsync(int[] ids);
-
#endregion
}
}
\ No newline at end of file
diff --git a/CoreCms.Net.IRepository/Agent/ICoreCmsAgentGradeRepository.cs b/CoreCms.Net.IRepository/Agent/ICoreCmsAgentGradeRepository.cs
index c1210f94..57b9baac 100644
--- a/CoreCms.Net.IRepository/Agent/ICoreCmsAgentGradeRepository.cs
+++ b/CoreCms.Net.IRepository/Agent/ICoreCmsAgentGradeRepository.cs
@@ -34,10 +34,10 @@ namespace CoreCms.Net.IRepository
///
/// 是否使用WITH(NOLOCK)
///
- new Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
+ Task> QueryPageAsync(
+ Expression> predicate,
+ Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
+ int pageSize = 20, bool blUseNoLock = false);
#region 重写增删改查操作===========================================================
@@ -46,7 +46,7 @@ namespace CoreCms.Net.IRepository
///
///
///
- new Task InsertAsync(CoreCmsAgentGrade entity);
+ Task InsertAsync(CoreCmsAgentGrade entity);
///
@@ -54,15 +54,7 @@ namespace CoreCms.Net.IRepository
///
///
///
- new Task UpdateAsync(CoreCmsAgentGrade entity);
-
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- new Task UpdateAsync(List entity);
+ Task UpdateAsync(CoreCmsAgentGrade entity);
///
@@ -81,12 +73,6 @@ namespace CoreCms.Net.IRepository
///
///
Task> GetCaChe();
-
- ///
- /// 更新cache
- ///
- Task> UpdateCaChe();
-
#endregion
}
}
\ No newline at end of file
diff --git a/CoreCms.Net.IRepository/Agent/ICoreCmsAgentOrderDetailsRepository.cs b/CoreCms.Net.IRepository/Agent/ICoreCmsAgentOrderDetailsRepository.cs
index e18aebb9..870aaf40 100644
--- a/CoreCms.Net.IRepository/Agent/ICoreCmsAgentOrderDetailsRepository.cs
+++ b/CoreCms.Net.IRepository/Agent/ICoreCmsAgentOrderDetailsRepository.cs
@@ -20,68 +20,10 @@ using SqlSugar;
namespace CoreCms.Net.IRepository
{
- ///
+ ///
/// 代理佣金明细 工厂接口
///
public interface ICoreCmsAgentOrderDetailsRepository : IBaseRepository
{
- #region 重写增删改查操作===========================================================
-
- ///
- /// 重写异步插入方法
- ///
- ///
- ///
- new Task InsertAsync(CoreCmsAgentOrderDetails entity);
-
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- new Task UpdateAsync(CoreCmsAgentOrderDetails entity);
-
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- new Task UpdateAsync(List entity);
-
-
- ///
- /// 重写删除指定ID的数据
- ///
- ///
- ///
- new Task DeleteByIdAsync(object id);
-
-
- ///
- /// 重写删除指定ID集合的数据(批量删除)
- ///
- ///
- ///
- new Task DeleteByIdsAsync(int[] ids);
-
- #endregion
-
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- new Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
-
}
}
diff --git a/CoreCms.Net.IRepository/Agent/ICoreCmsAgentOrderRepository.cs b/CoreCms.Net.IRepository/Agent/ICoreCmsAgentOrderRepository.cs
index dfad58a5..8ad81aa2 100644
--- a/CoreCms.Net.IRepository/Agent/ICoreCmsAgentOrderRepository.cs
+++ b/CoreCms.Net.IRepository/Agent/ICoreCmsAgentOrderRepository.cs
@@ -34,11 +34,11 @@ namespace CoreCms.Net.IRepository
///
/// 是否使用WITH(NOLOCK)
///
- new Task> QueryPageAsync(
+ Task> QueryPageAsync(
Expression> predicate,
Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
int pageSize = 20, bool blUseNoLock = false);
-
+
}
}
\ No newline at end of file
diff --git a/CoreCms.Net.IRepository/Agent/ICoreCmsAgentProductsRepository.cs b/CoreCms.Net.IRepository/Agent/ICoreCmsAgentProductsRepository.cs
index bc5a9af5..a208d868 100644
--- a/CoreCms.Net.IRepository/Agent/ICoreCmsAgentProductsRepository.cs
+++ b/CoreCms.Net.IRepository/Agent/ICoreCmsAgentProductsRepository.cs
@@ -33,7 +33,7 @@ namespace CoreCms.Net.IRepository
///
/// 是否使用WITH(NOLOCK)
///
- new Task> QueryPageAsync(
+ Task> QueryPageAsync(
Expression> predicate,
Expression> orderByExpression, OrderByType orderByType,
int pageIndex = 1,
diff --git a/CoreCms.Net.IRepository/Agent/ICoreCmsAgentRepository.cs b/CoreCms.Net.IRepository/Agent/ICoreCmsAgentRepository.cs
index 7ece3630..5f39a368 100644
--- a/CoreCms.Net.IRepository/Agent/ICoreCmsAgentRepository.cs
+++ b/CoreCms.Net.IRepository/Agent/ICoreCmsAgentRepository.cs
@@ -13,7 +13,7 @@ using System.Linq.Expressions;
using System.Threading.Tasks;
using CoreCms.Net.Model.Entities;
using CoreCms.Net.Model.ViewModels.Basics;
-using CoreCms.Net.Model.ViewModels.DTO.Agent;
+using CoreCms.Net.Model.ViewModels.DTO;
using SqlSugar;
namespace CoreCms.Net.IRepository
@@ -34,7 +34,6 @@ namespace CoreCms.Net.IRepository
Task> QueryOrderPageAsync(int userId, int pageIndex = 1, int pageSize = 20,
int typeId = 0);
-
///
/// 重写根据条件查询分页数据
///
@@ -45,7 +44,7 @@ namespace CoreCms.Net.IRepository
///
/// 是否使用WITH(NOLOCK)
///
- new Task> QueryPageAsync(
+ Task> QueryPageAsync(
Expression> predicate,
Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
int pageSize = 20, bool blUseNoLock = false);
diff --git a/CoreCms.Net.IRepository/Api/ICoreCmsPrinterRepository.cs b/CoreCms.Net.IRepository/Api/ICoreCmsPrinterRepository.cs
new file mode 100644
index 00000000..621c8708
--- /dev/null
+++ b/CoreCms.Net.IRepository/Api/ICoreCmsPrinterRepository.cs
@@ -0,0 +1,82 @@
+/***********************************************************************
+ * Project: CoreCms
+ * ProjectName: 核心内容管理系统
+ * Web: https://www.corecms.net
+ * Author: 大灰灰
+ * Email: jianweie@163.com
+ * CreateTime: 2022/9/16 20:41:09
+ * Description: 暂无
+ ***********************************************************************/
+
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Threading.Tasks;
+using CoreCms.Net.Model.Entities;
+using CoreCms.Net.Model.ViewModels.Basics;
+using CoreCms.Net.Model.ViewModels.UI;
+using SqlSugar;
+
+
+namespace CoreCms.Net.IRepository
+{
+ ///
+ /// 打印机列表 工厂接口
+ ///
+ public interface ICoreCmsPrinterRepository : IBaseRepository
+ {
+ #region 重写增删改查操作===========================================================
+
+ ///
+ /// 重写异步插入方法
+ ///
+ ///
+ ///
+ Task InsertAsync(CoreCmsPrinter entity);
+
+
+ ///
+ /// 重写异步更新方法
+ ///
+ ///
+ ///
+ Task UpdateAsync(CoreCmsPrinter entity);
+
+
+ ///
+ /// 重写删除指定ID的数据
+ ///
+ ///
+ ///
+ Task DeleteByIdAsync(object id);
+
+ #endregion
+
+ #region 获取缓存的所有数据==========================================================
+
+ ///
+ /// 获取缓存的所有数据
+ ///
+ ///
+ Task> GetCaChe();
+
+ #endregion
+
+
+ ///
+ /// 重写根据条件查询分页数据
+ ///
+ /// 判断集合
+ /// 排序方式
+ /// 当前页面索引
+ /// 分布大小
+ ///
+ /// 是否使用WITH(NOLOCK)
+ ///
+ Task> QueryPageAsync(
+ Expression> predicate,
+ Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
+ int pageSize = 20, bool blUseNoLock = false);
+
+ }
+}
diff --git a/CoreCms.Net.IRepository/Bill/ICoreCmsBillDeliveryRepository.cs b/CoreCms.Net.IRepository/Bill/ICoreCmsBillDeliveryRepository.cs
index d1b4f867..d257e700 100644
--- a/CoreCms.Net.IRepository/Bill/ICoreCmsBillDeliveryRepository.cs
+++ b/CoreCms.Net.IRepository/Bill/ICoreCmsBillDeliveryRepository.cs
@@ -20,6 +20,7 @@ namespace CoreCms.Net.IRepository
///
public interface ICoreCmsBillDeliveryRepository : IBaseRepository
{
+
///
/// 发货单统计7天统计
///
diff --git a/CoreCms.Net.IRepository/Bill/ICoreCmsBillPaymentsRepository.cs b/CoreCms.Net.IRepository/Bill/ICoreCmsBillPaymentsRepository.cs
index 2f2373e8..bf6a1a19 100644
--- a/CoreCms.Net.IRepository/Bill/ICoreCmsBillPaymentsRepository.cs
+++ b/CoreCms.Net.IRepository/Bill/ICoreCmsBillPaymentsRepository.cs
@@ -42,7 +42,7 @@ namespace CoreCms.Net.IRepository
///
/// 是否使用WITH(NOLOCK)
///
- new Task> QueryPageAsync(
+ Task> QueryPageAsync(
Expression> predicate,
Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
int pageSize = 20, bool blUseNoLock = false);
diff --git a/CoreCms.Net.IRepository/Bill/ICoreCmsBillRefundRepository.cs b/CoreCms.Net.IRepository/Bill/ICoreCmsBillRefundRepository.cs
index 0b11c350..cae0b9fb 100644
--- a/CoreCms.Net.IRepository/Bill/ICoreCmsBillRefundRepository.cs
+++ b/CoreCms.Net.IRepository/Bill/ICoreCmsBillRefundRepository.cs
@@ -32,7 +32,7 @@ namespace CoreCms.Net.IRepository
///
/// 是否使用WITH(NOLOCK)
///
- new Task> QueryPageAsync(
+ Task> QueryPageAsync(
Expression> predicate,
Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
int pageSize = 20, bool blUseNoLock = false);
diff --git a/CoreCms.Net.IRepository/Cart/ICoreCmsCartRepository.cs b/CoreCms.Net.IRepository/Cart/ICoreCmsCartRepository.cs
index c96a1555..d014f08b 100644
--- a/CoreCms.Net.IRepository/Cart/ICoreCmsCartRepository.cs
+++ b/CoreCms.Net.IRepository/Cart/ICoreCmsCartRepository.cs
@@ -23,5 +23,12 @@ namespace CoreCms.Net.IRepository
///
///
Task GetCountAsync(int userId);
+
+ ///
+ /// 获取购物车商品总价格
+ ///
+ ///
+ Task GetMoneyAsync(int userId);
+
}
}
\ No newline at end of file
diff --git a/CoreCms.Net.IRepository/CheckIn/ICoreCmsContinuousCheckInRulesRepository.cs b/CoreCms.Net.IRepository/CheckIn/ICoreCmsContinuousCheckInRulesRepository.cs
index 264d4919..34c1cb39 100644
--- a/CoreCms.Net.IRepository/CheckIn/ICoreCmsContinuousCheckInRulesRepository.cs
+++ b/CoreCms.Net.IRepository/CheckIn/ICoreCmsContinuousCheckInRulesRepository.cs
@@ -20,7 +20,7 @@ using SqlSugar;
namespace CoreCms.Net.IRepository
{
- ///
+ ///
/// 连续签到规则 工厂接口
///
public interface ICoreCmsContinuousCheckInRulesRepository : IBaseRepository
@@ -31,10 +31,7 @@ namespace CoreCms.Net.IRepository
///
///
///
- new Task InsertAsync(List entity);
-
-
- #region 获取缓存的所有数据==========================================================
+ Task InsertAsync(List entity);
///
/// 获取缓存的所有数据
@@ -42,12 +39,5 @@ namespace CoreCms.Net.IRepository
///
Task> GetCaChe();
- ///
- /// 更新cache
- ///
- Task> UpdateCaChe();
-
- #endregion
-
}
}
diff --git a/CoreCms.Net.IRepository/CheckIn/ICoreCmsCumulativeCheckInRulesRepository.cs b/CoreCms.Net.IRepository/CheckIn/ICoreCmsCumulativeCheckInRulesRepository.cs
index 2dd85a43..0cfc12e6 100644
--- a/CoreCms.Net.IRepository/CheckIn/ICoreCmsCumulativeCheckInRulesRepository.cs
+++ b/CoreCms.Net.IRepository/CheckIn/ICoreCmsCumulativeCheckInRulesRepository.cs
@@ -25,57 +25,12 @@ namespace CoreCms.Net.IRepository
///
public interface ICoreCmsCumulativeCheckInRulesRepository : IBaseRepository
{
- #region 重写增删改查操作===========================================================
-
- ///
- /// 重写异步插入方法
- ///
- ///
- ///
- new Task InsertAsync(CoreCmsCumulativeCheckInRules entity);
-
-
///
/// 重写异步更新方法
///
///
///
- new Task InsertAsync(List entity);
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- new Task UpdateAsync(CoreCmsCumulativeCheckInRules entity);
-
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- new Task UpdateAsync(List entity);
-
-
- ///
- /// 重写删除指定ID的数据
- ///
- ///
- ///
- new Task DeleteByIdAsync(object id);
-
-
- ///
- /// 重写删除指定ID集合的数据(批量删除)
- ///
- ///
- ///
- new Task DeleteByIdsAsync(int[] ids);
-
- #endregion
-
- #region 获取缓存的所有数据==========================================================
+ Task InsertAsync(List entity);
///
/// 获取缓存的所有数据
@@ -83,28 +38,5 @@ namespace CoreCms.Net.IRepository
///
Task> GetCaChe();
- ///
- /// 更新cache
- ///
- Task> UpdateCaChe();
-
- #endregion
-
-
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- new Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
-
}
}
diff --git a/CoreCms.Net.IRepository/CheckIn/ICoreCmsUserCheckInRepository.cs b/CoreCms.Net.IRepository/CheckIn/ICoreCmsUserCheckInRepository.cs
index 851d621f..9ce1c0a5 100644
--- a/CoreCms.Net.IRepository/CheckIn/ICoreCmsUserCheckInRepository.cs
+++ b/CoreCms.Net.IRepository/CheckIn/ICoreCmsUserCheckInRepository.cs
@@ -35,7 +35,7 @@ namespace CoreCms.Net.IRepository
///
/// 是否使用WITH(NOLOCK)
///
- new Task> QueryPageAsync(
+ Task> QueryPageAsync(
Expression> predicate,
Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
int pageSize = 20, bool blUseNoLock = false);
diff --git a/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionConditionRepository.cs b/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionConditionRepository.cs
index f5d74a03..b7dc7304 100644
--- a/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionConditionRepository.cs
+++ b/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionConditionRepository.cs
@@ -34,11 +34,11 @@ namespace CoreCms.Net.IRepository
///
/// 是否使用WITH(NOLOCK)
///
- new Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType,
- int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
+ Task> QueryPageAsync(
+ Expression> predicate,
+ Expression> orderByExpression, OrderByType orderByType,
+ int pageIndex = 1,
+ int pageSize = 20, bool blUseNoLock = false);
#region 重写增删改查操作===========================================================
@@ -47,7 +47,7 @@ namespace CoreCms.Net.IRepository
///
///
///
- new Task InsertAsync(CoreCmsDistributionCondition entity);
+ Task InsertAsync(CoreCmsDistributionCondition entity);
///
@@ -55,15 +55,7 @@ namespace CoreCms.Net.IRepository
///
///
///
- new Task UpdateAsync(CoreCmsDistributionCondition entity);
-
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- new Task UpdateAsync(List entity);
+ Task UpdateAsync(CoreCmsDistributionCondition entity);
///
@@ -71,31 +63,9 @@ namespace CoreCms.Net.IRepository
///
///
///
- new Task DeleteByIdAsync(object id);
-
-
- ///
- /// 重写删除指定ID集合的数据(批量删除)
- ///
- ///
- ///
- new Task DeleteByIdsAsync(int[] ids);
+ Task DeleteByIdAsync(object id);
#endregion
- #region 获取缓存的所有数据==========================================================
-
- ///
- /// 获取缓存的所有数据
- ///
- ///
- Task> GetCaChe();
-
- ///
- /// 更新cache
- ///
- Task> UpdateCaChe();
-
- #endregion
}
}
\ No newline at end of file
diff --git a/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionGradeRepository.cs b/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionGradeRepository.cs
index e0e96391..b95feb49 100644
--- a/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionGradeRepository.cs
+++ b/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionGradeRepository.cs
@@ -22,14 +22,14 @@ namespace CoreCms.Net.IRepository
///
///
///
- new Task InsertAsync(CoreCmsDistributionGrade entity);
+ Task InsertAsync(CoreCmsDistributionGrade entity);
///
/// 重写异步更新方法
///
///
///
- new Task UpdateAsync(CoreCmsDistributionGrade entity);
+ Task UpdateAsync(CoreCmsDistributionGrade entity);
///
/// 重写删除指定ID的数据
@@ -48,11 +48,6 @@ namespace CoreCms.Net.IRepository
///
Task> GetCaChe();
- ///
- /// 更新cache
- ///
- Task> UpdateCaChe();
-
#endregion
@@ -66,9 +61,9 @@ namespace CoreCms.Net.IRepository
///
/// 是否使用WITH(NOLOCK)
///
- new Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
+ Task> QueryPageAsync(
+ Expression> predicate,
+ Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
+ int pageSize = 20, bool blUseNoLock = false);
}
}
diff --git a/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionOrderDetailsRepository.cs b/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionOrderDetailsRepository.cs
index 13c448f4..0e5fa2ae 100644
--- a/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionOrderDetailsRepository.cs
+++ b/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionOrderDetailsRepository.cs
@@ -25,63 +25,6 @@ namespace CoreCms.Net.IRepository
///
public interface ICoreCmsDistributionOrderDetailsRepository : IBaseRepository
{
- #region 重写增删改查操作===========================================================
-
- ///
- /// 重写异步插入方法
- ///
- ///
- ///
- new Task InsertAsync(CoreCmsDistributionOrderDetails entity);
-
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- new Task UpdateAsync(CoreCmsDistributionOrderDetails entity);
-
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- new Task UpdateAsync(List entity);
-
-
- ///
- /// 重写删除指定ID的数据
- ///
- ///
- ///
- new Task DeleteByIdAsync(object id);
-
-
- ///
- /// 重写删除指定ID集合的数据(批量删除)
- ///
- ///
- ///
- new Task DeleteByIdsAsync(int[] ids);
-
- #endregion
-
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- new Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
-
+
}
}
diff --git a/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionOrderRepository.cs b/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionOrderRepository.cs
index f4c4b165..fccae68c 100644
--- a/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionOrderRepository.cs
+++ b/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionOrderRepository.cs
@@ -15,8 +15,6 @@ namespace CoreCms.Net.IRepository
///
public interface ICoreCmsDistributionOrderRepository : IBaseRepository
{
-
-
///
/// 重写根据条件查询分页数据
///
@@ -27,10 +25,10 @@ namespace CoreCms.Net.IRepository
///
/// 是否使用WITH(NOLOCK)
///
- new Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
+ Task> QueryPageAsync(
+ Expression> predicate,
+ Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
+ int pageSize = 20, bool blUseNoLock = false);
///
diff --git a/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionRepository.cs b/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionRepository.cs
index 9142fabb..75313e46 100644
--- a/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionRepository.cs
+++ b/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionRepository.cs
@@ -47,7 +47,7 @@ namespace CoreCms.Net.IRepository
///
/// 是否使用WITH(NOLOCK)
///
- new Task> QueryPageAsync(
+ Task> QueryPageAsync(
Expression> predicate,
Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
int pageSize = 20, bool blUseNoLock = false);
diff --git a/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionResultRepository.cs b/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionResultRepository.cs
index ae652a29..ab709148 100644
--- a/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionResultRepository.cs
+++ b/CoreCms.Net.IRepository/Distribution/ICoreCmsDistributionResultRepository.cs
@@ -10,7 +10,7 @@ using SqlSugar;
namespace CoreCms.Net.IRepository
{
- ///
+ ///
/// 等级佣金表 工厂接口
///
public interface ICoreCmsDistributionResultRepository : IBaseRepository
@@ -22,7 +22,7 @@ namespace CoreCms.Net.IRepository
///
///
///
- new Task InsertAsync(CoreCmsDistributionResult entity);
+ Task InsertAsync(CoreCmsDistributionResult entity);
///
@@ -30,15 +30,7 @@ namespace CoreCms.Net.IRepository
///
///
///
- new Task UpdateAsync(CoreCmsDistributionResult entity);
-
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- new Task UpdateAsync(List entity);
+ Task UpdateAsync(CoreCmsDistributionResult entity);
///
@@ -46,7 +38,7 @@ namespace CoreCms.Net.IRepository
///
///
///
- new Task DeleteByIdAsync(object id);
+ Task DeleteByIdAsync(object id);
///
@@ -54,26 +46,10 @@ namespace CoreCms.Net.IRepository
///
///
///
- new Task DeleteByIdsAsync(int[] ids);
+ Task DeleteByIdsAsync(int[] ids);
#endregion
- #region 获取缓存的所有数据==========================================================
-
- ///
- /// 获取缓存的所有数据
- ///
- ///
- Task> GetCaChe();
-
- ///
- /// 更新cache
- ///
- Task> UpdateCaChe();
-
- #endregion
-
-
///
/// 重写根据条件查询分页数据
///
@@ -84,10 +60,10 @@ namespace CoreCms.Net.IRepository
///
/// 是否使用WITH(NOLOCK)
///
- new Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
+ Task> QueryPageAsync(
+ Expression> predicate,
+ Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
+ int pageSize = 20, bool blUseNoLock = false);
}
}
diff --git a/CoreCms.Net.IRepository/Financial/ICoreCmsInvoiceRepository.cs b/CoreCms.Net.IRepository/Financial/ICoreCmsInvoiceRepository.cs
index 02d842c6..497a81fa 100644
--- a/CoreCms.Net.IRepository/Financial/ICoreCmsInvoiceRepository.cs
+++ b/CoreCms.Net.IRepository/Financial/ICoreCmsInvoiceRepository.cs
@@ -32,9 +32,9 @@ namespace CoreCms.Net.IRepository
///
/// 是否使用WITH(NOLOCK)
///
- new Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
+ Task> QueryPageAsync(
+ Expression> predicate,
+ Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
+ int pageSize = 20, bool blUseNoLock = false);
}
}
\ No newline at end of file
diff --git a/CoreCms.Net.IRepository/Good/ICoreCmsGoodsCategoryRepository.cs b/CoreCms.Net.IRepository/Good/ICoreCmsGoodsCategoryRepository.cs
index 67b34803..9b438ea2 100644
--- a/CoreCms.Net.IRepository/Good/ICoreCmsGoodsCategoryRepository.cs
+++ b/CoreCms.Net.IRepository/Good/ICoreCmsGoodsCategoryRepository.cs
@@ -37,39 +37,21 @@ namespace CoreCms.Net.IRepository
///
///
///
- new Task InsertAsync(CoreCmsGoodsCategory entity);
-
+ Task InsertAsync(CoreCmsGoodsCategory entity);
///
/// 重写异步更新方法方法
///
///
///
- new Task UpdateAsync(CoreCmsGoodsCategory entity);
-
-
- ///
- /// 重写异步更新方法方法
- ///
- ///
- ///
- new Task UpdateAsync(List entity);
-
+ Task UpdateAsync(CoreCmsGoodsCategory entity);
///
/// 重写删除指定ID的数据
///
///
///
- new Task DeleteByIdAsync(object id);
-
-
- ///
- /// 重写删除指定ID集合的数据(批量删除)
- ///
- ///
- ///
- new Task DeleteByIdsAsync(int[] ids);
+ Task DeleteByIdAsync(object id);
#endregion
}
diff --git a/CoreCms.Net.IRepository/Good/ICoreCmsGoodsCommentRepository.cs b/CoreCms.Net.IRepository/Good/ICoreCmsGoodsCommentRepository.cs
index 74bf2cc9..28981d1d 100644
--- a/CoreCms.Net.IRepository/Good/ICoreCmsGoodsCommentRepository.cs
+++ b/CoreCms.Net.IRepository/Good/ICoreCmsGoodsCommentRepository.cs
@@ -52,35 +52,19 @@ namespace CoreCms.Net.IRepository
///
/// 是否使用WITH(NOLOCK)
///
- new Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
+ Task> QueryPageAsync(
+ Expression> predicate,
+ Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
+ int pageSize = 20, bool blUseNoLock = false);
#region 重写增删改查操作===========================================================
- ///
- /// 重写异步插入方法
- ///
- ///
- ///
- new Task InsertAsync(CoreCmsGoodsComment entity);
-
-
///
/// 重写异步更新方法
///
///
///
- new Task UpdateAsync(CoreCmsGoodsComment entity);
-
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- new Task UpdateAsync(List entity);
+ Task UpdateAsync(CoreCmsGoodsComment entity);
///
@@ -88,15 +72,7 @@ namespace CoreCms.Net.IRepository
///
///
///
- new Task DeleteByIdAsync(object id);
-
-
- ///
- /// 重写删除指定ID集合的数据(批量删除)
- ///
- ///
- ///
- new Task DeleteByIdsAsync(int[] ids);
+ Task DeleteByIdAsync(object id);
#endregion
}
diff --git a/CoreCms.Net.IRepository/Good/ICoreCmsGoodsRepository.cs b/CoreCms.Net.IRepository/Good/ICoreCmsGoodsRepository.cs
index 704e0b62..d9761bc6 100644
--- a/CoreCms.Net.IRepository/Good/ICoreCmsGoodsRepository.cs
+++ b/CoreCms.Net.IRepository/Good/ICoreCmsGoodsRepository.cs
@@ -44,7 +44,7 @@ namespace CoreCms.Net.IRepository
///
///
///
- new Task DeleteByIdsAsync(int[] ids);
+ Task DeleteByIdsAsync(int[] ids);
///
/// 获取商品重量
@@ -92,10 +92,10 @@ namespace CoreCms.Net.IRepository
///
/// 是否使用WITH(NOLOCK)
///
- new Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
+ Task> QueryPageAsync(
+ Expression> predicate,
+ Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
+ int pageSize = 20, bool blUseNoLock = false);
///
@@ -107,8 +107,8 @@ namespace CoreCms.Net.IRepository
/// 排序顺序
/// 是否使用WITH(NOLOCK)
///
- new Task> QueryListByClauseAsync(Expression> predicate, int take,
- Expression> orderByPredicate, OrderByType orderByType, bool blUseNoLock = false);
+ Task> QueryListByClauseAsync(Expression> predicate, int take,
+ Expression> orderByPredicate, OrderByType orderByType, bool blUseNoLock = false);
///
@@ -118,13 +118,13 @@ namespace CoreCms.Net.IRepository
/// 排序
/// 是否使用WITH(NOLOCK)
/// 泛型实体集合
- new Task> QueryListByClauseAsync(Expression> predicate,
- string orderBy = "",
- bool blUseNoLock = false);
+ Task> QueryListByClauseAsync(Expression> predicate,
+ string orderBy = "",
+ bool blUseNoLock = false);
///
- /// 重写根据条件查询分页数据
+ /// 重写根据条件及自定义排序查询分页数据
///
///
///
@@ -132,9 +132,9 @@ namespace CoreCms.Net.IRepository
/// 分布大小
/// 是否使用WITH(NOLOCK)
///
- new Task> QueryPageAsync(Expression> predicate,
- string orderBy = "", int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
+ Task> QueryPageAsync(Expression> predicate,
+ string orderBy = "", int pageIndex = 1,
+ int pageSize = 20, bool blUseNoLock = false);
///
@@ -165,7 +165,6 @@ namespace CoreCms.Net.IRepository
Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
int pageSize = 20, bool blUseNoLock = false);
-
///
/// 获取下拉商品数据
///
diff --git a/CoreCms.Net.IRepository/Good/ICoreCmsGoodsTypeSpecRepository.cs b/CoreCms.Net.IRepository/Good/ICoreCmsGoodsTypeSpecRepository.cs
index 38c7e195..cea1c27b 100644
--- a/CoreCms.Net.IRepository/Good/ICoreCmsGoodsTypeSpecRepository.cs
+++ b/CoreCms.Net.IRepository/Good/ICoreCmsGoodsTypeSpecRepository.cs
@@ -31,6 +31,6 @@ namespace CoreCms.Net.IRepository
///
///
///
- new Task DeleteByIdAsync(object id);
+ Task DeleteByIdAsync(object id);
}
}
\ No newline at end of file
diff --git a/CoreCms.Net.IRepository/IBaseRepository.cs b/CoreCms.Net.IRepository/IBaseRepository.cs
index 7b01261c..f8a8cb9c 100644
--- a/CoreCms.Net.IRepository/IBaseRepository.cs
+++ b/CoreCms.Net.IRepository/IBaseRepository.cs
@@ -24,104 +24,130 @@ namespace CoreCms.Net.IRepository
/// 泛型实体类
public interface IBaseRepository where T : class
{
+ #region 查询数据
+
///
/// 根据主值查询单条数据
///
/// 主键值
- /// 是否使用WITH(NOLOCK)
+ /// 是否使用WITH(NoLock)
+ /// 是否启用缓存
+ /// 缓存时长(秒)
/// 泛型实体
- T QueryById(object pkValue, bool blUseNoLock = false);
+ T QueryById(object pkValue, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
///
/// 根据主值查询单条数据
///
///
- /// 是否使用WITH(NOLOCK)
+ /// 是否使用WITH(NoLock)
+ /// 是否启用缓存
+ /// 缓存时长(秒)
///
- Task QueryByIdAsync(object objId, bool blUseNoLock = false);
+ Task QueryByIdAsync(object objId, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
///
/// 根据主值列表查询单条数据
///
///
- /// 是否使用WITH(NOLOCK)
+ /// 是否使用WITH(NoLock)
+ /// 是否启用缓存
+ /// 缓存时长(秒)
///
- List QueryByIDs(object[] lstIds, bool blUseNoLock = false);
+ List QueryByIDs(object[] lstIds, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
///
/// 根据主值列表查询单条数据
///
///
- /// 是否使用WITH(NOLOCK)
+ /// 是否使用WITH(NoLock)
+ /// 是否启用缓存
+ /// 缓存时长(秒)
///
- Task> QueryByIDsAsync(object[] lstIds, bool blUseNoLock = false);
+ Task> QueryByIDsAsync(object[] lstIds, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
///
/// 根据主值列表查询单条数据
///
///
- /// 是否使用WITH(NOLOCK)
+ /// 是否使用WITH(NoLock)
+ /// 是否启用缓存
+ /// 缓存时长(秒)
///
- List QueryByIDs(int[] lstIds, bool blUseNoLock = false);
+ List QueryByIDs(int[] lstIds, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
///
/// 根据主值列表查询单条数据
///
///
- /// 是否使用WITH(NOLOCK)
+ /// 是否使用WITH(NoLock)
+ /// 是否启用缓存
+ /// 缓存时长(秒)
///
- Task> QueryByIDsAsync(int[] lstIds, bool blUseNoLock = false);
+ Task> QueryByIDsAsync(int[] lstIds, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
///
/// 查询所有数据(无分页,请慎用)
///
- /// 是否使用WITH(NOLOCK)
+ /// 是否使用WITH(NoLock)
+ /// 是否启用缓存
+ /// 缓存时长(秒)
///
- List Query(bool blUseNoLock = false);
+ List Query(bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
///
/// 查询所有数据(无分页,请慎用)
///
- /// 是否使用WITH(NOLOCK)
+ /// 是否使用WITH(NoLock)
+ /// 是否启用缓存
+ /// 缓存时长(秒)
///
- Task> QueryAsync(bool blUseNoLock = false);
+ Task> QueryAsync(bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
///
/// 根据条件查询数据
///
/// 条件
/// 排序
- /// 是否使用WITH(NOLOCK)
+ /// 是否使用WITH(NoLock)
+ /// 是否启用缓存
+ /// 缓存时长(秒)
/// 泛型实体集合
- List QueryListByClause(string strWhere, string orderBy = "", bool blUseNoLock = false);
+ List QueryListByClause(string strWhere, string orderBy = "", bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
///
/// 根据条件查询数据
///
/// 条件
/// 排序
- /// 是否使用WITH(NOLOCK)
+ /// 是否使用WITH(NoLock)
+ /// 是否启用缓存
+ /// 缓存时长(秒)
/// 泛型实体集合
- Task> QueryListByClauseAsync(string strWhere, string orderBy = "", bool blUseNoLock = false);
+ Task> QueryListByClauseAsync(string strWhere, string orderBy = "", bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
///
/// 根据条件查询数据
///
/// 条件表达式树
/// 排序
- /// 是否使用WITH(NOLOCK)
+ /// 是否使用WITH(NoLock)
+ /// 是否启用缓存
+ /// 缓存时长(秒)
/// 泛型实体集合
- List QueryListByClause(Expression> predicate, string orderBy = "", bool blUseNoLock = false);
+ List QueryListByClause(Expression> predicate, string orderBy = "", bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
///
/// 根据条件查询数据
///
/// 条件表达式树
/// 排序
- /// 是否使用WITH(NOLOCK)
+ /// 是否使用WITH(NoLock)
+ /// 是否启用缓存
+ /// 缓存时长(秒)
/// 泛型实体集合
Task> QueryListByClauseAsync(Expression> predicate, string orderBy = "",
- bool blUseNoLock = false);
+ bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
///
/// 根据条件查询数据
@@ -129,10 +155,12 @@ namespace CoreCms.Net.IRepository
/// 条件表达式树
/// 排序字段
/// 排序顺序
- /// 是否使用WITH(NOLOCK)
+ /// 是否使用WITH(NoLock)
+ /// 是否启用缓存
+ /// 缓存时长(秒)
/// 泛型实体集合
List QueryListByClause(Expression> predicate, Expression> orderByPredicate,
- OrderByType orderByType, bool blUseNoLock = false);
+ OrderByType orderByType, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
///
/// 根据条件查询数据
@@ -140,10 +168,12 @@ namespace CoreCms.Net.IRepository
/// 条件表达式树
/// 排序字段
/// 排序顺序
- /// 是否使用WITH(NOLOCK)
+ /// 是否使用WITH(NoLock)
+ /// 是否启用缓存
+ /// 缓存时长(秒)
/// 泛型实体集合
Task> QueryListByClauseAsync(Expression> predicate,
- Expression> orderByPredicate, OrderByType orderByType, bool blUseNoLock = false);
+ Expression> orderByPredicate, OrderByType orderByType, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
///
/// 根据条件查询一定数量数据
@@ -152,10 +182,12 @@ namespace CoreCms.Net.IRepository
/// 获取数量
/// 排序字段
/// 排序顺序
- /// 是否使用WITH(NOLOCK)
+ /// 是否使用WITH(NoLock)
+ /// 是否启用缓存
+ /// 缓存时长(秒)
///
List QueryListByClause(Expression> predicate, int take,
- Expression> orderByPredicate, OrderByType orderByType, bool blUseNoLock = false);
+ Expression> orderByPredicate, OrderByType orderByType, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
///
/// 根据条件查询一定数量数据
@@ -164,48 +196,58 @@ namespace CoreCms.Net.IRepository
/// 获取数量
/// 排序字段
/// 排序顺序
- /// 是否使用WITH(NOLOCK)
+ /// 是否使用WITH(NoLock)
+ /// 是否启用缓存
+ /// 缓存时长(秒)
///
Task> QueryListByClauseAsync(Expression> predicate, int take,
- Expression> orderByPredicate, OrderByType orderByType, bool blUseNoLock = false);
+ Expression> orderByPredicate, OrderByType orderByType, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
///
/// 根据条件查询一定数量数据
///
/// 条件表达式树
/// 获取数量
- /// 排序字段,如name asc,age desc
- /// 是否使用WITH(NOLOCK)
+ /// 排序字段,如name asc,age desc
+ /// 是否使用WITH(NoLock)
+ /// 是否启用缓存
+ /// 缓存时长(秒)
///
- List QueryListByClause(Expression> predicate, int take, string strOrderByFileds = "",
- bool blUseNoLock = false);
+ List QueryListByClause(Expression> predicate, int take, string strOrderByFields = "",
+ bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
///
/// 根据条件查询一定数量数据
///
/// 条件表达式树
/// 获取数量
- /// 排序字段,如name asc,age desc
- /// 是否使用WITH(NOLOCK)
+ /// 排序字段,如name asc,age desc
+ /// 是否使用WITH(NoLock)
+ /// 是否启用缓存
+ /// 缓存时长(秒)
///
Task> QueryListByClauseAsync(Expression> predicate, int take,
- string strOrderByFileds = "", bool blUseNoLock = false);
+ string strOrderByFields = "", bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
///
/// 根据条件查询数据
///
/// 条件表达式树
- /// 是否使用WITH(NOLOCK)
+ /// 是否使用WITH(NoLock)
+ /// 是否启用缓存
+ /// 缓存时长(秒)
///
- T QueryByClause(Expression> predicate, bool blUseNoLock = false);
+ T QueryByClause(Expression> predicate, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
///
/// 根据条件查询数据
///
/// 条件表达式树
- /// 是否使用WITH(NOLOCK)
+ /// 是否使用WITH(NoLock)
+ /// 是否启用缓存
+ /// 缓存时长(秒)
///
- Task QueryByClauseAsync(Expression> predicate, bool blUseNoLock = false);
+ Task QueryByClauseAsync(Expression> predicate, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
///
/// 根据条件查询数据
@@ -213,10 +255,12 @@ namespace CoreCms.Net.IRepository
/// 条件表达式树
/// 排序字段
/// 排序顺序
- /// 是否使用WITH(NOLOCK)
+ /// 是否使用WITH(NoLock)
+ /// 是否启用缓存
+ /// 缓存时长(秒)
///
T QueryByClause(Expression> predicate, Expression> orderByPredicate,
- OrderByType orderByType, bool blUseNoLock = false);
+ OrderByType orderByType, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
///
/// 根据条件查询数据
@@ -224,10 +268,12 @@ namespace CoreCms.Net.IRepository
/// 条件表达式树
/// 排序字段
/// 排序顺序
- /// 是否使用WITH(NOLOCK)
+ /// 是否使用WITH(NoLock)
+ /// 是否启用缓存
+ /// 缓存时长(秒)
///
Task QueryByClauseAsync(Expression> predicate, Expression> orderByPredicate,
- OrderByType orderByType, bool blUseNoLock = false);
+ OrderByType orderByType, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
///
@@ -237,116 +283,145 @@ namespace CoreCms.Net.IRepository
/// 排序字段
/// 排序顺序
/// 是否使用TranLock
+ /// 是否启用缓存
+ /// 缓存时长(秒)
///
Task QueryByClauseWithTranLockAsync(Expression> predicate,
- Expression> orderByPredicate, OrderByType orderByType, bool blUseTranLock = false);
+ Expression> orderByPredicate, OrderByType orderByType, bool blUseTranLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
+
+ #endregion
+
+ #region 新闻数据
///
/// 写入实体数据
///
/// 实体类
+ /// 是否清除缓存
///
- int Insert(T entity);
+ int Insert(T entity, bool isRemoveDataCache = false);
///
/// 写入实体数据
///
/// 实体类
+ /// 是否清除缓存
///
- Task InsertAsync(T entity);
+ Task InsertAsync(T entity, bool isRemoveDataCache = false);
///