From 5494608f7a2797384cfefea0b05d76470392ceaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E7=81=B0=E7=81=B0?= Date: Thu, 15 Sep 2022 01:28:34 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=B0=83=E6=95=B4=E3=80=91=E4=BC=98?= =?UTF-8?q?=E5=8C=96redis=E4=BB=93=E5=82=A8=EF=BC=8C=E5=AE=9E=E7=8E=B0Lock?= =?UTF-8?q?Take/LockRelease=E9=94=81=E5=A4=84=E7=90=86=E5=B9=B6=E5=8F=91?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RedisCache/IRedisOperationRepository.cs | 142 ++++++++- .../RedisCache/RedisOperationRepository.cs | 287 ++++++++++++++++-- CoreCms.Net.Core/AOP/RedisCacheAop.cs | 2 +- .../RefreshWeChatAccessTokenJob.cs | 4 +- CoreCms.Net.Web.Admin/appsettings.json | 14 +- .../Controllers/OrderController.cs | 105 ++++--- CoreCms.Net.Web.WebApi/appsettings.json | 14 +- 7 files changed, 478 insertions(+), 90 deletions(-) diff --git a/CoreCms.Net.Caching/AutoMate/RedisCache/IRedisOperationRepository.cs b/CoreCms.Net.Caching/AutoMate/RedisCache/IRedisOperationRepository.cs index 1b586f27..21f0473a 100644 --- a/CoreCms.Net.Caching/AutoMate/RedisCache/IRedisOperationRepository.cs +++ b/CoreCms.Net.Caching/AutoMate/RedisCache/IRedisOperationRepository.cs @@ -10,21 +10,110 @@ namespace CoreCms.Net.Caching.AutoMate.RedisCache /// public interface IRedisOperationRepository { + /// + /// 延长锁(续约) + /// + /// + /// + /// + /// + bool LockExtend(string key, string value, TimeSpan cacheTime); - //获取 Reids 缓存值 + /// + /// 延长锁(续约) + /// + /// + /// + /// + /// + Task LockExtendAsync(string key, string value, TimeSpan cacheTime); + + /// + /// 释放锁 + /// + /// + /// + /// + bool LockRelease(string key, string value); + + /// + /// 释放锁 + /// + /// + /// + /// + Task LockReleaseAsync(string key, string value); + + /// + /// 获取锁 + /// + /// + /// + /// + /// + public bool LockTake(string key, string value, TimeSpan cacheTime); + + /// + /// 获取锁 + /// + /// + /// + /// + /// + public Task LockTakeAsync(string key, string value, TimeSpan cacheTime); + + + /// + /// 获取值 + /// + /// + /// Task Get(string key); + RedisValue StringGet(string key); + + /// + /// 搜索获取匹配Key + /// + /// + /// + List SearchKey(string pattern); + //获取值,并序列化 Task Get(string key); //保存 - Task Set(string key, object value, TimeSpan cacheTime); + Task StringSetAsync(string key, string value, TimeSpan cacheTime); + + bool StringSet(string key, string value, TimeSpan cacheTime); + + bool StringSet(string key, string value); + + bool StringSet(string key, RedisValue value); + + bool StringSet(string key, RedisValue value, TimeSpan cacheTime); + + + Task SetAsync(string key, object value, TimeSpan cacheTime); + + Task StringIncrement(string key, long value=1); + //判断是否存在 - Task Exist(string key); + Task KeyExistsAsync(string key); + + bool KeyExists(string key); + + /// + /// 获取键 过期时间 + /// + /// + /// + Task KeyTime(string key); //移除某一个缓存值 - Task Remove(string key); + Task KeyDeleteAsync(string key); + void KeyDelete(string key); //全部清除 Task Clear(); @@ -131,26 +220,46 @@ namespace CoreCms.Net.Caching.AutoMate.RedisCache Task ListClearAsync(string redisKey); - /// - /// 有序集合/定时任务延迟队列用的多(直接传分钟) + /// 有序集合/定时任务延迟队列用的多 /// /// key /// 元素 /// 分数 - Task SortedSetAddAsync(string redisKey, string redisValue, double score); - + Task SortedSetAddAsync(string redisKey, string redisValue, double score); /// - /// 有序集合/定时任务延迟队列用的多(直接传时间) + /// 插入zset /// - /// key - /// 元素 - /// 时间 - Task SortedSetAddAsync(string redisKey, string redisValue, DateTime dt); + /// key + /// 消息 + /// 延迟执行时间 + /// + Task SortedSetAddAsync(string key, string msg, DateTime time); - #region 会员陌小北(QQ:1078350533) 添加的 几个有序集合功能 + /// + /// 返回有序集合中指定成员的索引 + /// + /// + /// + /// + Task SortedSetRankAsync(string key, string value); + /// + /// 返回有序集合中的分数 + /// + /// + /// + /// + Task SortedSetScoreAsync(string key, string value); + + /// + /// 返回有序集合中的分数 + /// + /// + /// + /// + double? SortedSetScore(string key, string value); /// /// 返回有序列表里的数据 /// @@ -170,6 +279,7 @@ namespace CoreCms.Net.Caching.AutoMate.RedisCache Task SortedSetRemoveRangeByRankAsync(string redisKey, int start, int stop); + /// /// 返回有序列表里的指定范围数量 /// @@ -177,9 +287,9 @@ namespace CoreCms.Net.Caching.AutoMate.RedisCache /// 0 是第一个 /// 最大分数值 /// - Task SortedSetLengthAsync(string redisKey, int start, int stop); + Task SortedSetLengthAsync(string redisKey, long min, long max); - #endregion + } } diff --git a/CoreCms.Net.Caching/AutoMate/RedisCache/RedisOperationRepository.cs b/CoreCms.Net.Caching/AutoMate/RedisCache/RedisOperationRepository.cs index 42d23b3e..df6b2c98 100644 --- a/CoreCms.Net.Caching/AutoMate/RedisCache/RedisOperationRepository.cs +++ b/CoreCms.Net.Caching/AutoMate/RedisCache/RedisOperationRepository.cs @@ -6,6 +6,7 @@ using Microsoft.Extensions.Logging; using Newtonsoft.Json; using StackExchange.Redis; + namespace CoreCms.Net.Caching.AutoMate.RedisCache { public class RedisOperationRepository : IRedisOperationRepository @@ -39,22 +40,162 @@ namespace CoreCms.Net.Caching.AutoMate.RedisCache } } - public async Task Exist(string key) + + /// + /// 获取锁 + /// + /// + /// + /// + /// + public bool LockTake(string key, string value, TimeSpan cacheTime) { + return _database.LockTake(key, value, cacheTime); + + } + + /// + /// 异步获取锁 + /// + /// + /// + /// + /// + public async Task LockTakeAsync(string key, string value, TimeSpan cacheTime) + { + return await _database.LockTakeAsync(key, value, cacheTime); + } + + /// + /// 延长锁(续约) + /// + /// + /// + /// + /// + + public bool LockExtend(string key, string value, TimeSpan cacheTime) + { + return _database.LockExtend(key, value, cacheTime); + } + + /// + /// 延长锁(续约) + /// + /// + /// + /// + /// + + public async Task LockExtendAsync(string key, string value, TimeSpan cacheTime) + { + return await _database.LockExtendAsync(key, value, cacheTime); + } + + /// + /// 释放锁 + /// + /// + /// + /// + public bool LockRelease(string key, string value) + { + return _database.LockRelease(key, value); + } + + /// + /// 异步释放锁 + /// + /// + /// + /// + public async Task LockReleaseAsync(string key, string value) + { + return await _database.LockReleaseAsync(key, value); + } + + + /// + /// 判断key是否存在 + /// + /// + /// + public async Task KeyExistsAsync(string key) + { + return await _database.KeyExistsAsync(key); } + /// + /// 判断key是否存在 + /// + /// + /// + public bool KeyExists(string key) + { + + return _database.KeyExists(key); + } + + + /// + /// 获取键过期时间 + /// + /// + /// + public async Task KeyTime(string key) + { + + return await _database.KeyTimeToLiveAsync(key); + } + + public async Task Get(string key) { return await _database.StringGetAsync(key); } - public async Task Remove(string key) + public RedisValue StringGet(string key) + { + return _database.StringGet(key); + } + + /// + /// 搜索匹配Key + /// + /// + /// + public List SearchKey(string pattern) + { + + var list = new List(); + var script = "return redis.call('keys',@pattern)"; + var prepared = LuaScript.Prepare(script); + var redisResult = _database.ScriptEvaluate(prepared, new { pattern }); + if (!redisResult.IsNull) + { + foreach (var key in (RedisKey[])redisResult) + { + + list.Add(key); + } + } + return list; + + } + + public async Task KeyDeleteAsync(string key) { await _database.KeyDeleteAsync(key); } - public async Task Set(string key, object value, TimeSpan cacheTime) + public void KeyDelete(string key) + { + _database.KeyDelete(key); + } + + + public async Task SetAsync(string key, object value, TimeSpan cacheTime) { if (value != null) { @@ -63,6 +204,65 @@ namespace CoreCms.Net.Caching.AutoMate.RedisCache } } + + public async Task StringSetAsync(string key, string value, TimeSpan cacheTime) + { + + return await _database.StringSetAsync(key, value, cacheTime); + + } + + + + public bool StringSet(string key, string value, TimeSpan cacheTime) + { + + return _database.StringSet(key, value, cacheTime); + + } + + + public bool StringSet(string key, string value) + { + + return _database.StringSet(key, value); + + } + + + public bool StringSet(string key, RedisValue value, TimeSpan cacheTime) + { + + return _database.StringSet(key, value, cacheTime); + + } + + + public bool StringSet(string key, RedisValue value) + { + + return _database.StringSet(key, value); + + } + + + + /// + /// Increment 递增 + /// + /// + /// + /// + public async Task StringIncrement(string key, long value=1) + { + + return await _database.StringIncrementAsync(key, value); + + } + + + + public async Task Get(string key) { var value = await _database.StringGetAsync(key); @@ -77,6 +277,9 @@ namespace CoreCms.Net.Caching.AutoMate.RedisCache } } + + + /// /// 根据key获取RedisValue /// @@ -229,29 +432,70 @@ namespace CoreCms.Net.Caching.AutoMate.RedisCache /// - /// 有序集合/定时任务延迟队列用的多(直接传分钟) + /// 有序集合/定时任务延迟队列用的多 /// /// key /// 元素 /// 分数 - public async Task SortedSetAddAsync(string redisKey, string redisValue, double score) + public async Task SortedSetAddAsync(string redisKey, string redisValue, double score) { - await _database.SortedSetAddAsync(redisKey, redisValue, score); + return await _database.SortedSetAddAsync(redisKey, redisValue, score); } /// - /// 有序集合/定时任务延迟队列用的多(直接传时间) + /// 添加到有序集合 用时间 /// - /// key - /// 元素 - /// 时间 - public async Task SortedSetAddAsync(string redisKey, string redisValue, DateTime dt) + /// + /// + /// + /// + + public async Task SortedSetAddAsync(string key, string msg, DateTime time) { - var score = (dt.ToUniversalTime().Ticks - 621355968000000000) / 10000000; - await _database.SortedSetAddAsync(redisKey, redisValue, score); + var score = (time.ToUniversalTime().Ticks - 621355968000000000) / 10000000; + var bl = await _database.SortedSetAddAsync(key, msg, score); + //When.NotExists 不更新 直接添加 + return bl; + } + + + + #region 小北 添加的 几个有序集合功能 + + /// + /// 获取有序集合索引 + /// + /// + /// + /// + public async Task SortedSetRankAsync(string key, string value) + { + var result= await _database.SortedSetRankAsync(key,value); + + return result; + } + + /// + /// 返回有序集中,成员的分数值。 如果成员元素不是有序集 key 的成员,或 key 不存在,返回 null + /// + /// + /// + /// + public async Task SortedSetScoreAsync(string key, string value) + { + var result = await _database.SortedSetScoreAsync(key, value); + + return result; + } + + + public double? SortedSetScore(string key, string value) + { + var result = _database.SortedSetScore(key, value); + + return result; } - #region 会员陌小北(QQ:1078350533) 添加的 几个有序集合功能 /// /// 返回有序列表里的数据 @@ -262,12 +506,16 @@ namespace CoreCms.Net.Caching.AutoMate.RedisCache /// public async Task> SortedSetRangeByRankAsync(string redisKey, int start, int stop) { - var result = await _database.SortedSetRangeByRankAsync(redisKey, start, stop); + var result= await _database.SortedSetRangeByRankAsync(redisKey, start, stop); + + return result.Select(o => o.ToString()); } + + /// /// 移出序列表里的指定范围数量 /// @@ -275,7 +523,7 @@ namespace CoreCms.Net.Caching.AutoMate.RedisCache /// 0 是第一个 /// 最大分数值 /// - public async Task SortedSetRemoveRangeByRankAsync(string redisKey, int start, int stop) + public async Task SortedSetRemoveRangeByRankAsync(string redisKey, int start, int stop) { return await _database.SortedSetRemoveRangeByRankAsync(redisKey, start, stop); } @@ -287,13 +535,12 @@ namespace CoreCms.Net.Caching.AutoMate.RedisCache /// 0 是第一个 /// 最大分数值 /// - public async Task SortedSetLengthAsync(string redisKey, int start, int stop) + public async Task SortedSetLengthAsync(string redisKey, long min, long max) { - return await _database.SortedSetLengthAsync(redisKey, start, stop); + return await _database.SortedSetLengthAsync(redisKey, min, max); } - #endregion 会员陌小北(QQ:1078350533) 添加的 几个有序集合功能 - + #endregion 小北 添加的 几个有序集合功能 } } 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.Task/RefreshWeChatAccessTokenJob.cs b/CoreCms.Net.Task/RefreshWeChatAccessTokenJob.cs index c324781d..fe394989 100644 --- a/CoreCms.Net.Task/RefreshWeChatAccessTokenJob.cs +++ b/CoreCms.Net.Task/RefreshWeChatAccessTokenJob.cs @@ -100,7 +100,7 @@ namespace CoreCms.Net.Task entity.updateTimestamp = DateTimeOffset.Now.ToUnixTimeSeconds(); await _weChatAccessTokenServices.UpdateAsync(entity); } - await _redisOperationRepository.Set(GlobalEnumVars.AccessTokenEnum.WeiXinAccessToken.ToString(), entity, TimeSpan.FromMinutes(120)); + await _redisOperationRepository.SetAsync(GlobalEnumVars.AccessTokenEnum.WeiXinAccessToken.ToString(), entity, TimeSpan.FromMinutes(120)); //插入日志 var model = new SysTaskLog @@ -162,7 +162,7 @@ namespace CoreCms.Net.Task await _weChatAccessTokenServices.UpdateAsync(entity); } - await _redisOperationRepository.Set( + await _redisOperationRepository.SetAsync( GlobalEnumVars.AccessTokenEnum.WxOpenAccessToken.ToString(), entity, TimeSpan.FromMinutes(120)); diff --git a/CoreCms.Net.Web.Admin/appsettings.json b/CoreCms.Net.Web.Admin/appsettings.json index f2d5d004..26c82390 100644 --- a/CoreCms.Net.Web.Admin/appsettings.json +++ b/CoreCms.Net.Web.Admin/appsettings.json @@ -14,16 +14,16 @@ "PassWord": "CoreShopProfessional" }, "AppConfig": { - "AppUrl": "https://admin.pro.coreshop.cn/", //后端管理地址 - "AppInterFaceUrl": "https://api.pro.coreshop.cn/", //接口请求地址 - "AppVersion": "CoreShopProfessional v0.5.5" + "AppUrl": "https://admin.test.pro.coreshop.cn/", //后端管理地址 + "AppInterFaceUrl": "https://api.test.pro.coreshop.cn/", //接口请求地址 + "AppVersion": "CoreShopProfessional v0.6.0" }, //redis为必须启动项,请保持redis为正常可用 "RedisConfig": { "UseCache": true, //启用redis作为内存选择 "UseTimedTask": true, //启用redis作为定时任务 // 如果采用容器化部署Service 要写成redis的服务名,否则写地址 - "ConnectionString": "127.0.0.1:6379,password=CoreShop,connectTimeout=3000,connectRetry=1,syncTimeout=10000,DefaultDatabase=9,abortConnect=false" //redis数据库连接字符串 + "ConnectionString": "127.0.0.1:6379,password=coreshop,connectTimeout=30000,responseTimeout=30000,abortConnect=false,connectRetry=1,syncTimeout=10000,DefaultDatabase=9" //redis数据库连接字符串 }, //jwt授权认证的一些设置 "JwtConfig": { @@ -220,11 +220,11 @@ }, "PayCallBack": { //微信支付回调 - "WeChatPayUrl": "https://api.pro.coreshop.cn/Notify/WeChatPay/Unifiedorder", + "WeChatPayUrl": "https://api.test.pro.coreshop.cn/Notify/WeChatPay/Unifiedorder", //微信退款回调 - "WeChatRefundUrl": "https://api.pro.coreshop.cn/Notify/WeChatPay/Refund", + "WeChatRefundUrl": "https://api.test.pro.coreshop.cn/Notify/WeChatPay/Refund", //支付宝支付回调 - "AlipayUrl": "https://api.pro.coreshop.cn/Notify/AliPay/Unifiedorder", + "AlipayUrl": "https://api.test.pro.coreshop.cn/Notify/AliPay/Unifiedorder", //支付宝退款回调 "AlipayRefundUrl": "" }, diff --git a/CoreCms.Net.Web.WebApi/Controllers/OrderController.cs b/CoreCms.Net.Web.WebApi/Controllers/OrderController.cs index c2a3f047..21d59466 100644 --- a/CoreCms.Net.Web.WebApi/Controllers/OrderController.cs +++ b/CoreCms.Net.Web.WebApi/Controllers/OrderController.cs @@ -13,6 +13,7 @@ using System; using System.Linq; using System.Threading.Tasks; using CoreCms.Net.Auth.HttpContextUser; +using CoreCms.Net.Caching.AutoMate.RedisCache; using CoreCms.Net.Configuration; using CoreCms.Net.IServices; using CoreCms.Net.Model.Entities; @@ -47,6 +48,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers private readonly ICoreCmsGoodsServices _goodsServices; private readonly ICoreCmsStoreServices _storeServices; private readonly ICoreCmsOrderDistributionModelServices _orderDistributionModelServices; + private readonly IRedisOperationRepository _redisOperationRepository; @@ -59,7 +61,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers , ICoreCmsSettingServices settingServices , ICoreCmsAreaServices areaServices , ICoreCmsBillReshipServices reshipServices, ICoreCmsShipServices shipServices - , ICoreCmsBillDeliveryServices billDeliveryServices, ICoreCmsLogisticsServices logisticsServices, ICoreCmsGoodsServices goodsServices, ICoreCmsStoreServices storeServices, ICoreCmsOrderDistributionModelServices orderDistributionModelServices) + , ICoreCmsBillDeliveryServices billDeliveryServices, ICoreCmsLogisticsServices logisticsServices, ICoreCmsGoodsServices goodsServices, ICoreCmsStoreServices storeServices, ICoreCmsOrderDistributionModelServices orderDistributionModelServices, IRedisOperationRepository redisOperationRepository) { _user = user; _orderServices = orderServices; @@ -73,6 +75,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers _goodsServices = goodsServices; _storeServices = storeServices; _orderDistributionModelServices = orderDistributionModelServices; + _redisOperationRepository = redisOperationRepository; } @@ -155,53 +158,81 @@ namespace CoreCms.Net.Web.WebApi.Controllers { var jm = new WebApiCallBack(); - var type = entity.receiptType; - if (type == (int)GlobalEnumVars.OrderReceiptType.Logistics || type == (int)GlobalEnumVars.OrderReceiptType.IntraCityService) + var lockKey = "LOCK_CreateOrder:user_" + _user.ID; + var redisUserLock = await _redisOperationRepository.LockTakeAsync(lockKey, _user.ID.ToString(), TimeSpan.FromSeconds(10)); + if (redisUserLock) { - //收货地址id - if (entity.ushipId == 0) + try { - jm.data = 13001; - jm.msg = GlobalErrorCodeVars.Code13001; + var type = entity.receiptType; + switch (type) + { + case (int)GlobalEnumVars.OrderReceiptType.Logistics: + case (int)GlobalEnumVars.OrderReceiptType.IntraCityService: + { + //收货地址id + if (entity.ushipId == 0) + { + jm.data = 13001; + jm.msg = GlobalErrorCodeVars.Code13001; + } + break; + } + case (int)GlobalEnumVars.OrderReceiptType.SelfDelivery: + { + //提货门店 + if (entity.storeId == 0) + { + jm.data = 13001; + jm.msg = GlobalErrorCodeVars.Code13001; + } + + //提货人姓名 提货人电话 + if (string.IsNullOrEmpty(entity.ladingName)) + { + jm.data = 13001; + jm.msg = "请输入姓名"; + } + + if (string.IsNullOrEmpty(entity.ladingMobile)) + { + jm.data = 13001; + jm.msg = "请输入电话"; + } + break; + } + default: + jm.data = 13001; + jm.msg = "未查询到配送方式"; + break; + } + + if (string.IsNullOrEmpty(entity.cartIds)) + { + jm.data = 10000; + jm.msg = GlobalErrorCodeVars.Code10000; + } + + jm = await _orderServices.ToAdd(_user.ID, entity.orderType, entity.cartIds, entity.receiptType, + entity.ushipId, entity.storeId, entity.ladingName, entity.ladingMobile, entity.memo, + entity.point, entity.couponCode, entity.source, entity.scene, entity.taxType, entity.taxName, + entity.taxCode, entity.objectId, entity.teamId, entity.requireOrder, entity.requiredFundType, + entity.traceId); } - } - else if (type == (int)GlobalEnumVars.OrderReceiptType.SelfDelivery) - { - //提货门店 - if (entity.storeId == 0) + catch (Exception e) { - jm.data = 13001; - jm.msg = GlobalErrorCodeVars.Code13001; + jm.msg = "数据处理异常"; + jm.otherData = e; } - //提货人姓名 提货人电话 - if (string.IsNullOrEmpty(entity.ladingName)) + finally { - jm.data = 13001; - jm.msg = "请输入姓名"; - } - if (string.IsNullOrEmpty(entity.ladingMobile)) - { - jm.data = 13001; - jm.msg = "请输入电话"; + await _redisOperationRepository.LockReleaseAsync(lockKey, _user.ID.ToString()); } } else { - jm.data = 13001; - jm.msg = "未查询到配送方式"; + jm.msg = "当前请求太频繁_请稍后再试"; } - - if (string.IsNullOrEmpty(entity.cartIds)) - { - jm.data = 10000; - jm.msg = GlobalErrorCodeVars.Code10000; - } - jm = await _orderServices.ToAdd(_user.ID, entity.orderType, entity.cartIds, entity.receiptType, - entity.ushipId, entity.storeId, entity.ladingName, entity.ladingMobile, entity.memo, - entity.point, entity.couponCode, entity.source, entity.scene, entity.taxType, entity.taxName, - entity.taxCode, entity.objectId, entity.teamId, entity.requireOrder, entity.requiredFundType, entity.traceId); - //jm.otherData = entity; - return jm; } #endregion diff --git a/CoreCms.Net.Web.WebApi/appsettings.json b/CoreCms.Net.Web.WebApi/appsettings.json index f2d5d004..26c82390 100644 --- a/CoreCms.Net.Web.WebApi/appsettings.json +++ b/CoreCms.Net.Web.WebApi/appsettings.json @@ -14,16 +14,16 @@ "PassWord": "CoreShopProfessional" }, "AppConfig": { - "AppUrl": "https://admin.pro.coreshop.cn/", //后端管理地址 - "AppInterFaceUrl": "https://api.pro.coreshop.cn/", //接口请求地址 - "AppVersion": "CoreShopProfessional v0.5.5" + "AppUrl": "https://admin.test.pro.coreshop.cn/", //后端管理地址 + "AppInterFaceUrl": "https://api.test.pro.coreshop.cn/", //接口请求地址 + "AppVersion": "CoreShopProfessional v0.6.0" }, //redis为必须启动项,请保持redis为正常可用 "RedisConfig": { "UseCache": true, //启用redis作为内存选择 "UseTimedTask": true, //启用redis作为定时任务 // 如果采用容器化部署Service 要写成redis的服务名,否则写地址 - "ConnectionString": "127.0.0.1:6379,password=CoreShop,connectTimeout=3000,connectRetry=1,syncTimeout=10000,DefaultDatabase=9,abortConnect=false" //redis数据库连接字符串 + "ConnectionString": "127.0.0.1:6379,password=coreshop,connectTimeout=30000,responseTimeout=30000,abortConnect=false,connectRetry=1,syncTimeout=10000,DefaultDatabase=9" //redis数据库连接字符串 }, //jwt授权认证的一些设置 "JwtConfig": { @@ -220,11 +220,11 @@ }, "PayCallBack": { //微信支付回调 - "WeChatPayUrl": "https://api.pro.coreshop.cn/Notify/WeChatPay/Unifiedorder", + "WeChatPayUrl": "https://api.test.pro.coreshop.cn/Notify/WeChatPay/Unifiedorder", //微信退款回调 - "WeChatRefundUrl": "https://api.pro.coreshop.cn/Notify/WeChatPay/Refund", + "WeChatRefundUrl": "https://api.test.pro.coreshop.cn/Notify/WeChatPay/Refund", //支付宝支付回调 - "AlipayUrl": "https://api.pro.coreshop.cn/Notify/AliPay/Unifiedorder", + "AlipayUrl": "https://api.test.pro.coreshop.cn/Notify/AliPay/Unifiedorder", //支付宝退款回调 "AlipayRefundUrl": "" },