Commit b5530e2c authored by 黄奎's avatar 黄奎
parents 17ae9c92 48ea7573
......@@ -1794,6 +1794,7 @@ namespace Mall.Module.User
return false;
}
/// <summary>
/// 时间戳转为C#格式时间
/// </summary>
......@@ -1814,6 +1815,7 @@ namespace Mall.Module.User
}
public Model.Extend.AppletWeChat.PlayBack GetLiveReplayInfo(RB_MiniProgram_Extend model, int room_id)
{
string token = WeiXinReidsCache.Get(model.MiniAppId);
......@@ -1908,7 +1910,22 @@ namespace Mall.Module.User
if (list != null && list.Any())
{
list.ForEach(x => x.LiveTime = Convert.ToDateTime(GetTime(x.start_time)));
foreach (var item in list)
{
try
{
string datetime = GetTime(item.start_time);
if (!string.IsNullOrWhiteSpace(datetime))
{
item.LiveTime =Convert.ToDateTime(datetime);
}
}
catch (Exception)
{
}
}
liveHouseRepository.InsertBatch(list);
}
return true;
......
......@@ -87,7 +87,7 @@ namespace Mall.Repository.AppletWeChat
builder.Append($" AND a.{nameof(RB_Live_HouseExtension_Extend.MallBaseId)}={query.MallBaseId}");
}
}
builder.Append($" order by a.{nameof(RB_Live_HouseExtension_Extend.LiveTime)} desc");
builder.Append($" order by a.ID asc,a.{nameof(RB_Live_HouseExtension_Extend.LiveTime)} desc");
return GetPage<RB_Live_HouseExtension_Extend>(pageIndex, pageSize, out rowCount, builder.ToString()).ToList();
}
}
......
......@@ -361,7 +361,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
item.RemitFXCommission = item.RemitFXCommission + (!string.IsNullOrWhiteSpace(item.LiveFinanceIds) ? item.LiveCommission : 0);
item.Paid = item.PaidCostMoney + item.RemitFXCommission;
item.GrossProfit = (item.AllPrice + item.RealMoney) - item.CouponMoney - item.RefundActual - item.ALLCommission - item.PayMoney;
item.GrossProfitRate = (item.AllPrice + item.RealMoney) == 0 ? 0 : Math.Round((item.GrossProfit / (item.AllPrice + item.RealMoney - item.RefundActual)), 2, MidpointRounding.AwayFromZero);
item.GrossProfitRate = (item.AllPrice + item.RealMoney) == 0 ? 0 : Math.Round((item.GrossProfit / ((item.AllPrice + item.RealMoney - item.RefundActual) == 0 ? 1 : (item.AllPrice + item.RealMoney - item.RefundActual))), 2, MidpointRounding.AwayFromZero);
// item.GrossProfitRate = (item.AllPrice + item.RealMoney) == 0 ? 0 : Math.Round((item.GrossProfit / (item.AllPrice + item.RealMoney - item.RefundActual)), 2, MidpointRounding.AwayFromZero);
//item.GrossProfit = item.AllPrice - item.ALLCommission;
//item.GrossProfitRate = item.AllPrice == 0 ? 0 : Math.Round((item.GrossProfit / item.AllPrice), 2, MidpointRounding.AwayFromZero);
}
......@@ -513,7 +514,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
item.RemitFXCommission = item.RemitFXCommission + (!string.IsNullOrWhiteSpace(item.LiveFinanceIds) ? item.LiveCommission : 0);
item.Paid = item.PaidCostMoney + item.RemitFXCommission;
item.GrossProfit = (item.AllPrice + item.RealMoney) - item.CouponMoney - item.RefundActual - item.ALLCommission - item.PayMoney;
item.GrossProfitRate = (item.AllPrice + item.RealMoney) == 0 ? 0 : Math.Round((item.GrossProfit / (item.AllPrice + item.RealMoney - item.RefundActual)), 2, MidpointRounding.AwayFromZero);
item.GrossProfitRate = (item.AllPrice + item.RealMoney) == 0 ? 0 : Math.Round((item.GrossProfit / ((item.AllPrice + item.RealMoney - item.RefundActual)==0?1: (item.AllPrice + item.RealMoney - item.RefundActual))), 2, MidpointRounding.AwayFromZero);
//item.GrossProfit = item.AllPrice - item.ALLCommission;
//item.GrossProfitRate = item.AllPrice == 0 ? 0 : Math.Round((item.GrossProfit / item.AllPrice), 2, MidpointRounding.AwayFromZero);
}
......
......@@ -54,7 +54,7 @@ namespace Mall.WebApi.Controllers.User
ResultPageModel pagelist = JsonConvert.DeserializeObject<ResultPageModel>(parms.msg.ToString());
RB_Member_User_Extend demodel = new RB_Member_User_Extend()
{
Name = param.GetStringValue("param"),
Name = param.GetStringValue("Name"),
Source = (UserSourceEnum)param.GetInt("Source"),
MemberGrade = param.GetInt("MemberGrade"),
Id = param.GetInt("Id"),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment