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