Commit d258fc7e authored by liudong1993's avatar liudong1993
parents c0d08e85 57301dd3
......@@ -1779,7 +1779,7 @@ namespace Mall.Module.User
}
else
{
LogHelper.Write(string.Format("SendMemberLevelMsg:wenXinResult:{0}", wenXinResult));
LogHelper.Write(string.Format("GetLiveInfo:wenXinResult:{0}", wenXinResult));
}
}
return false;
......
......@@ -22,19 +22,50 @@ namespace Mall.Repository.Finance
string where = $" where 1=1 ";
if (dmodel.TenantId > 0)
{
where += $@" and {nameof(RB_Finance_Record.TenantId)}={dmodel.TenantId}";
where += $@" and {nameof(RB_Finance_RecordDetail.TenantId)}={dmodel.TenantId}";
}
if (dmodel.MallBaseId > 0)
{
where += $@" and {nameof(RB_Finance_Record.MallBaseId)}={dmodel.MallBaseId}";
where += $@" and {nameof(RB_Finance_RecordDetail.MallBaseId)}={dmodel.MallBaseId}";
}
if (dmodel.Type > 0)
{
where += $@" and {nameof(RB_Finance_Record.Type)}={dmodel.Type}";
where += $@" and {nameof(RB_Finance_RecordDetail.Type)}={dmodel.Type}";
}
string sql = $@"SELECT * FROM {TableName} {where} order by Id asc";
return Get<RB_Finance_RecordDetail>(sql).ToList();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public List<RB_Finance_RecordDetail> GetListByOrderIds(string orderIds, RB_Finance_RecordDetail dmodel)
{
string where = $" where 1=1 ";
if (dmodel.TenantId > 0)
{
where += $@" and {nameof(RB_Finance_RecordDetail.TenantId)}={dmodel.TenantId}";
}
if (dmodel.MallBaseId > 0)
{
where += $@" and {nameof(RB_Finance_RecordDetail.MallBaseId)}={dmodel.MallBaseId}";
}
if (dmodel.Type > 0)
{
where += $@" and {nameof(RB_Finance_RecordDetail.Type)}={dmodel.Type}";
}
if (!string.IsNullOrWhiteSpace(orderIds))
{
where += $@" and {nameof(RB_Finance_RecordDetail.OrderId)} in ({orderIds})";
}
string sql = $@"SELECT * FROM {TableName} {where} order by Id asc";
return Get<RB_Finance_RecordDetail>(sql).ToList();
}
}
}
......@@ -31,6 +31,8 @@ namespace Mall.WebApi.Controllers.User
private readonly UserModule userModule = new UserModule();
private readonly Module.MarketingCenter.CouponModule couponModule = new Module.MarketingCenter.CouponModule();
private readonly Module.MarketingCenter.RechargeModule rechargeModule = new Module.MarketingCenter.RechargeModule();
private readonly MiniProgramModule appletWeChatModule = new MiniProgramModule();
#region 收货地址
/// <summary>
......@@ -1115,5 +1117,58 @@ namespace Mall.WebApi.Controllers.User
return ApiResult.Success("",new { rechargeRules , rechargeSettings });
}
#endregion
#region 直播房间信息
[HttpPost]
[Obsolete]
public ApiResult GetLiveHouseList()
{
var req = RequestParm;
var userInfo = AppletUserInfo;
ResultPageModel pagelist = JsonConvert.DeserializeObject<ResultPageModel>(RequestParm.msg.ToString());
Model.Entity.AppletWeChat.RB_Live_House demodel = JsonConvert.DeserializeObject<Model.Entity.AppletWeChat.RB_Live_House>(RequestParm.msg.ToString());
demodel.TenantId = userInfo.TenantId;
demodel.MallBaseId = userInfo.MallBaseId;
var list = appletWeChatModule.GetLiveHousePageList(pagelist.pageIndex, pagelist.pageSize, out long count, demodel);
pagelist.count = Convert.ToInt32(count);
pagelist.pageData = list.Select(x => new
{
x.ID,
x.roomid,
x.name,
x.anchor_img,
x.anchor_name,
x.cover_img,
x.live_status,
start_time = GetTime(x.start_time),
end_time = GetTime(x.end_time),
});
return ApiResult.Success("", pagelist);
}
/// <summary>
/// 时间戳转为C#格式时间
/// </summary>
/// <param name="timeStamp">Unix时间戳格式</param>
/// <returns>C#格式时间</returns>
[Obsolete]
public static string GetTime(string timeStamp)
{
try
{
DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
long lTime = long.Parse(timeStamp + "0000000");
TimeSpan toNow = new TimeSpan(lTime);
return dtStart.Add(toNow).ToString("yyyy-MM-dd HH:mm:ss");
}
catch (Exception)
{
return "";
}
}
#endregion
}
}
\ No newline at end of file
This diff is collapsed.
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