/// <summary> /// 直播後台-主播報表 /// </summary> /// <param name="afterParameters"></param> /// <returns></returns> public return_anchor_tip_record GetAnchorsReport(LiveParameters liveParameters) { var response = GetLiveReport(liveParameters, "GetAnchorsReport"); var dataStr = response.Result.Content.ReadAsStringAsync().Result; var backData = JsonConvert.DeserializeObject <AnchorListReport>(dataStr); //轉換前端Model return_anchor_tip_record reportLotterys = ConvertReport.ConvertReportAnchorsModel(backData); return(reportLotterys); }
//直播報表轉換 public static return_anchor_tip_record ConvertReportAnchorsModel(AnchorListReport models) { return_anchor_tip_record reportAgents = new return_anchor_tip_record(); reportAgents.anchor_list = new List <dt_anchor_tip_record>(); foreach (var model in models.AnchorList) { dt_anchor_tip_record reportAgent = new dt_anchor_tip_record() { anchor_id = model.AnchorId, tipmoney_lastmonth = model.TipMoneyLastMonth, tipmoney_thismonth = model.TipMoneyThisMonth, tipmoney_today = model.TipMoneyToday, tipmoney_total = model.TipMoneyTotal }; reportAgents.anchor_list.Add(reportAgent); } reportAgents.anchor_count = models.AnchorCount; return(reportAgents); }