新增外部接口 根据订单号获取商铺AppKey
调整 商铺统计 更新时间 02:0-- 00:05
This commit is contained in:
1 parent
d4051474e3
commit
c714bbea64
3 files changed
+30
-3
No files matched your search
@@ -18,7 +18,18 @@ public partial class WXShopController : AsmxApiController
|
||||
{
|
||||
_shopService = shopService;
|
||||
}
|
||||
|
||||
public IHttpActionResult GetShopKey(string ordersn)
|
||||
{
|
||||
try
|
||||
{
|
||||
var appkey = _shopService.GetShopKey(ordersn);
|
||||
return Ok(ApiResult.Success(appkey, "操作成功"));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Ok(ApiResult.Fail(ex.Message));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新商铺永久续费
|
||||
/// </summary>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using MAX.Core.DependencyInjection;
|
||||
using MAX.Core.Logger;
|
||||
using Org.BouncyCastle.Utilities;
|
||||
using Store.Contracts.Order.Entitys;
|
||||
using Store.Contracts.Shops;
|
||||
using Store.Contracts.User.Interfaces;
|
||||
using System;
|
||||
@@ -70,4 +71,19 @@ public class ShopService : ITransientDependency
|
||||
.Where(a => shopAppkeys.Contains(a.AppKey))
|
||||
.ToList(a => a.Id);
|
||||
}
|
||||
|
||||
public string GetShopKey(string orderSn)
|
||||
{
|
||||
if (string.IsNullOrEmpty(orderSn)) return "";
|
||||
var appKey = _freeSql.Select<WeiOrderEntity, WXShopEntity>()
|
||||
.InnerJoin((a, b) => a.ShopId == b.Id)
|
||||
.Where((a, b) => a.OrderId == orderSn)
|
||||
.First((a, b) => b.AppKey);
|
||||
return appKey;
|
||||
|
||||
// SELECT B.app_key from erp.oms_wei_order AS A
|
||||
//JOIN erp.o_shop as B on A.shop_id = B.id
|
||||
// WHERE A.order_id = '3739958894823388160'
|
||||
|
||||
}
|
||||
}
|
||||
@@ -10,9 +10,9 @@ using System.Web;
|
||||
namespace KJD_Web.Services.Shops;
|
||||
|
||||
/// <summary>
|
||||
/// 更新商铺统计
|
||||
/// 更新商铺统计 每天0:5分 统计
|
||||
/// </summary>
|
||||
[Job("ShopStats", "0 2 * * *")]
|
||||
[Job("ShopStats", "5 0 * * *")]
|
||||
public class ShopStatsJob : IScheduledJobs, ITransientDependency
|
||||
{
|
||||
private readonly ShopRevenueStatisticsService _shopRevenueStatisticsService;
|
||||
|
||||
Reference in new issue
Block a user