修改问题
This commit is contained in:
parent
9d79620c1a
commit
4086acade3
|
|
@ -28,6 +28,10 @@ namespace CloudGaming.Code.AppExtend
|
||||||
_channel = "27001";
|
_channel = "27001";
|
||||||
}
|
}
|
||||||
channel = _channel;
|
channel = _channel;
|
||||||
|
if (string.IsNullOrEmpty(channel))
|
||||||
|
{
|
||||||
|
channel = "27001";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return channel;
|
return channel;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,6 @@ public class OrderBLL : CloudGamingBase
|
||||||
var ip = HttpContextAccessor.HttpContext.GetClientIpAddress();
|
var ip = HttpContextAccessor.HttpContext.GetClientIpAddress();
|
||||||
var price = product.Price;
|
var price = product.Price;
|
||||||
var payment = PaymentExtend.GetPayment(paymentMethod, this);
|
var payment = PaymentExtend.GetPayment(paymentMethod, this);
|
||||||
//UserInfoBLL userInfo = new UserInfoBLL(Dao, _UserId);
|
|
||||||
if (UserInfo.IsTest)
|
if (UserInfo.IsTest)
|
||||||
{
|
{
|
||||||
price = (decimal)0.01;
|
price = (decimal)0.01;
|
||||||
|
|
@ -73,6 +72,7 @@ public class OrderBLL : CloudGamingBase
|
||||||
(var orderId, var order, var payNotifyUrl) = await payment.CreateOrder(product.Id, product.ProductName, price, product, ip);
|
(var orderId, var order, var payNotifyUrl) = await payment.CreateOrder(product.Id, product.ProductName, price, product, ip);
|
||||||
var t = product.ToIntentOrder(paymentMethod, orderId, AppRequestInfo.Channel);
|
var t = product.ToIntentOrder(paymentMethod, orderId, AppRequestInfo.Channel);
|
||||||
t.UserId = _UserId;
|
t.UserId = _UserId;
|
||||||
|
t.Channel = AppRequestInfo.Channel;
|
||||||
if (payNotifyUrl != null && payNotifyUrl.Length > 200)
|
if (payNotifyUrl != null && payNotifyUrl.Length > 200)
|
||||||
{
|
{
|
||||||
payNotifyUrl = payNotifyUrl.Substring(0, 200);
|
payNotifyUrl = payNotifyUrl.Substring(0, 200);
|
||||||
|
|
@ -86,7 +86,6 @@ public class OrderBLL : CloudGamingBase
|
||||||
Payment = order
|
Payment = order
|
||||||
};
|
};
|
||||||
RedisCache.KeyDelete(redisLock);
|
RedisCache.KeyDelete(redisLock);
|
||||||
//HttpContextAccessor.HttpContext.Response.Headers.Add("PayNotifyUrl", payNotifyUrl);
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ public class OrderMonitorProcessor : AppJobBase
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[QuartzTrigger("OrderHourMonitorProcessor", "0/5 * * * * ?")]
|
[QuartzTrigger("OrderHourMonitorProcessor", "0 5 * * * ?")]
|
||||||
public class OrderHourMonitorProcessor : AppJobBase
|
public class OrderHourMonitorProcessor : AppJobBase
|
||||||
{
|
{
|
||||||
public OrderHourMonitorProcessor(IServiceScopeFactory scopeFactory) : base(scopeFactory)
|
public OrderHourMonitorProcessor(IServiceScopeFactory scopeFactory) : base(scopeFactory)
|
||||||
|
|
@ -82,7 +82,7 @@ public class OrderHourMonitorProcessor : AppJobBase
|
||||||
public override async Task AppConfigProcessLoop(AppConfig appConfig, AppMonitorInfo appMonitorInfo, IServiceProvider serviceProvider, CloudGamingBase cloudGamingBase)
|
public override async Task AppConfigProcessLoop(AppConfig appConfig, AppMonitorInfo appMonitorInfo, IServiceProvider serviceProvider, CloudGamingBase cloudGamingBase)
|
||||||
{
|
{
|
||||||
var dao = cloudGamingBase.Dao;
|
var dao = cloudGamingBase.Dao;
|
||||||
var now = DateTime.Now.AddHours(-0);
|
var now = DateTime.Now.AddHours(-1);
|
||||||
int day = int.Parse(now.ToString("yyyyMMdd"));
|
int day = int.Parse(now.ToString("yyyyMMdd"));
|
||||||
var newDayHour = now.Date.AddHours(now.Hour);
|
var newDayHour = now.Date.AddHours(now.Hour);
|
||||||
var oldDayHour = now.Date.AddHours(now.AddHours(1).Hour);
|
var oldDayHour = now.Date.AddHours(now.AddHours(1).Hour);
|
||||||
|
|
@ -127,9 +127,15 @@ public class OrderHourMonitorProcessor : AppJobBase
|
||||||
statisticsUser.PaidOrders = paidOrders;
|
statisticsUser.PaidOrders = paidOrders;
|
||||||
statisticsUser.UpdatedAt = DateTime.Now;
|
statisticsUser.UpdatedAt = DateTime.Now;
|
||||||
}
|
}
|
||||||
|
var list = dao.DaoExt.Context.T_App_Channel.ToList();
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
var key = item.ChannelId;
|
||||||
|
UpdateStatistics(key, intendedOrder.GetValueOrDefault(key, 0), paidOrders.GetValueOrDefault(key, 0), paidOrdersPrice.GetValueOrDefault(key, 0));
|
||||||
|
}
|
||||||
foreach (var item in intendedOrder)
|
foreach (var item in intendedOrder)
|
||||||
{
|
{
|
||||||
UpdateStatistics(item.Key, item.Value, paidOrders.GetValueOrDefault(item.Key, 0), paidOrdersPrice.GetValueOrDefault(item.Key, 0));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await dao.DaoExt.Context.SaveChangesAsync();
|
await dao.DaoExt.Context.SaveChangesAsync();
|
||||||
|
|
|
||||||
|
|
@ -163,6 +163,7 @@ public static class PaymentExtend
|
||||||
/// <param name="productCache"></param>
|
/// <param name="productCache"></param>
|
||||||
/// <param name="payment"></param>
|
/// <param name="payment"></param>
|
||||||
/// <param name="orderId"></param>
|
/// <param name="orderId"></param>
|
||||||
|
/// <param name="channel"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static T_User_IntentOrder ToIntentOrder(this ProductCache productCache, string payment, string orderId, string channel)
|
public static T_User_IntentOrder ToIntentOrder(this ProductCache productCache, string payment, string orderId, string channel)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user