|
@@ -46,6 +46,7 @@ namespace molilian.core
|
|
|
//type可以不入参,留空就两个场景的数据都显示就行了
|
|
//type可以不入参,留空就两个场景的数据都显示就行了
|
|
|
//先只要成功的就行了,,到时候他们要明细再加就行了
|
|
//先只要成功的就行了,,到时候他们要明细再加就行了
|
|
|
|
|
|
|
|
|
|
+ int distributiontype = form.Read("distributiontype", 0);
|
|
|
int data_type = form.Read("type", 0);
|
|
int data_type = form.Read("type", 0);
|
|
|
var report_date = form.PathReadArray<string>("query_date[]");
|
|
var report_date = form.PathReadArray<string>("query_date[]");
|
|
|
|
|
|
|
@@ -63,7 +64,7 @@ namespace molilian.core
|
|
|
case 1:
|
|
case 1:
|
|
|
case 2:
|
|
case 2:
|
|
|
{
|
|
{
|
|
|
- var data = await DataTypeReportDailysAsync(data_type, stime, etime, clientIp, debug);
|
|
|
|
|
|
|
+ var data = await DataTypeReportDailysAsync(distributiontype, data_type, stime, etime, clientIp, debug);
|
|
|
list.AddRange(data);
|
|
list.AddRange(data);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -73,7 +74,7 @@ namespace molilian.core
|
|
|
int[] types = { 1, 2 };
|
|
int[] types = { 1, 2 };
|
|
|
foreach (var type in types)
|
|
foreach (var type in types)
|
|
|
{
|
|
{
|
|
|
- var data = await DataTypeReportDailysAsync(type, stime, etime, clientIp, debug);
|
|
|
|
|
|
|
+ var data = await DataTypeReportDailysAsync(distributiontype, type, stime, etime, clientIp, debug);
|
|
|
list.AddRange(data);
|
|
list.AddRange(data);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -82,7 +83,7 @@ namespace molilian.core
|
|
|
return list;
|
|
return list;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public static async Task<List<dynamic>> DataTypeReportDailysAsync(int data_type, DateTime stime, DateTime etime, string clientIp, bool debug = false)
|
|
|
|
|
|
|
+ public static async Task<List<dynamic>> DataTypeReportDailysAsync(int distributiontype, int data_type, DateTime stime, DateTime etime, string clientIp, bool debug = false)
|
|
|
{
|
|
{
|
|
|
string filter = "`is_show`=@is_show AND data_type=@data_type AND report_date>=@stime AND report_date<=@etime";
|
|
string filter = "`is_show`=@is_show AND data_type=@data_type AND report_date>=@stime AND report_date<=@etime";
|
|
|
string orderBy = "report_date DESC";
|
|
string orderBy = "report_date DESC";
|
|
@@ -105,32 +106,213 @@ namespace molilian.core
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- List<dynamic> data = list.Select(e => new
|
|
|
|
|
|
|
+ //List<dynamic> data = list.Select(e => new
|
|
|
|
|
+ //{
|
|
|
|
|
+ // report_date = e.report_date.ToString("yyyy-MM-dd"),
|
|
|
|
|
+ // type = e.data_type,
|
|
|
|
|
+ // e.uclk_uv,
|
|
|
|
|
+ // e.uclk_pv,
|
|
|
|
|
+ // e.pay_ord_num,
|
|
|
|
|
+ // e.order_ord_num,
|
|
|
|
|
+ // e.pay_ord_amt,
|
|
|
|
|
+ // e.pay_tk_disp_tfee,
|
|
|
|
|
+ // e.pay_ord_uv,
|
|
|
|
|
+ // e.eff_ord_num,
|
|
|
|
|
+ // e.eff_ord_amt,
|
|
|
|
|
+ // e.eff_tk_disp_tfee,
|
|
|
|
|
+ // e.total_count,
|
|
|
|
|
+ // //e.abandon_count,
|
|
|
|
|
+ // e.success_count,
|
|
|
|
|
+ // e.req_other_aff_num,
|
|
|
|
|
+ // e.req_goods_num,
|
|
|
|
|
+ // e.req_live_num,
|
|
|
|
|
+ // e.req_video_num,
|
|
|
|
|
+ // e.req_shop_num,
|
|
|
|
|
+ // e.req_base_num,
|
|
|
|
|
+ // e.req_note_num,
|
|
|
|
|
+ // e.resp_deeplink_num
|
|
|
|
|
+ //}).ToList<dynamic>();
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ List<dynamic> data = list.SelectMany(e =>
|
|
|
{
|
|
{
|
|
|
- report_date = e.report_date.ToString("yyyy-MM-dd"),
|
|
|
|
|
- type = e.data_type,
|
|
|
|
|
- e.uclk_uv,
|
|
|
|
|
- e.uclk_pv,
|
|
|
|
|
- e.pay_ord_num,
|
|
|
|
|
- e.order_ord_num,
|
|
|
|
|
- e.pay_ord_amt,
|
|
|
|
|
- e.pay_tk_disp_tfee,
|
|
|
|
|
- e.pay_ord_uv,
|
|
|
|
|
- e.eff_ord_num,
|
|
|
|
|
- e.eff_ord_amt,
|
|
|
|
|
- e.eff_tk_disp_tfee,
|
|
|
|
|
- e.total_count,
|
|
|
|
|
- //e.abandon_count,
|
|
|
|
|
- e.success_count,
|
|
|
|
|
- e.req_other_aff_num,
|
|
|
|
|
- e.req_goods_num,
|
|
|
|
|
- e.req_live_num,
|
|
|
|
|
- e.req_video_num,
|
|
|
|
|
- e.req_shop_num,
|
|
|
|
|
- e.req_base_num,
|
|
|
|
|
- e.req_note_num,
|
|
|
|
|
- e.resp_deeplink_num
|
|
|
|
|
|
|
+ var results = new List<dynamic>();
|
|
|
|
|
+
|
|
|
|
|
+ if (distributiontype == 0 || distributiontype == 1) // 全分类或 goods
|
|
|
|
|
+ {
|
|
|
|
|
+ results.Add(new
|
|
|
|
|
+ {
|
|
|
|
|
+ //metric_type = "req_goods_num",
|
|
|
|
|
+ //metric_value = e.req_goods_num,
|
|
|
|
|
+ report_date = e.report_date.ToString("yyyy-MM-dd"),
|
|
|
|
|
+ type = e.data_type,
|
|
|
|
|
+ e.uclk_uv,
|
|
|
|
|
+ e.uclk_pv,
|
|
|
|
|
+ e.pay_ord_num,
|
|
|
|
|
+ e.order_ord_num,
|
|
|
|
|
+ e.pay_ord_amt,
|
|
|
|
|
+ e.pay_tk_disp_tfee,
|
|
|
|
|
+ e.pay_ord_uv,
|
|
|
|
|
+ e.eff_ord_num,
|
|
|
|
|
+ e.eff_ord_amt,
|
|
|
|
|
+ e.eff_tk_disp_tfee,
|
|
|
|
|
+ e.total_count,
|
|
|
|
|
+ e.success_count,
|
|
|
|
|
+ e.req_goods_num,
|
|
|
|
|
+ e.resp_deeplink_num
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (distributiontype == 0 || distributiontype == 2) // 全分类或 live
|
|
|
|
|
+ {
|
|
|
|
|
+ results.Add(new
|
|
|
|
|
+ {
|
|
|
|
|
+ report_date = e.report_date.ToString("yyyy-MM-dd"),
|
|
|
|
|
+ type = e.data_type,
|
|
|
|
|
+ e.uclk_uv,
|
|
|
|
|
+ e.uclk_pv,
|
|
|
|
|
+ e.pay_ord_num,
|
|
|
|
|
+ e.order_ord_num,
|
|
|
|
|
+ e.pay_ord_amt,
|
|
|
|
|
+ e.pay_tk_disp_tfee,
|
|
|
|
|
+ e.pay_ord_uv,
|
|
|
|
|
+ e.eff_ord_num,
|
|
|
|
|
+ e.eff_ord_amt,
|
|
|
|
|
+ e.eff_tk_disp_tfee,
|
|
|
|
|
+ e.total_count,
|
|
|
|
|
+ e.success_count,
|
|
|
|
|
+ e.req_live_num,
|
|
|
|
|
+ e.resp_deeplink_num
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (distributiontype == 0 || distributiontype == 3) // 全分类或 video
|
|
|
|
|
+ {
|
|
|
|
|
+ results.Add(new
|
|
|
|
|
+ {
|
|
|
|
|
+ report_date = e.report_date.ToString("yyyy-MM-dd"),
|
|
|
|
|
+ type = e.data_type,
|
|
|
|
|
+ e.uclk_uv,
|
|
|
|
|
+ e.uclk_pv,
|
|
|
|
|
+ e.pay_ord_num,
|
|
|
|
|
+ e.order_ord_num,
|
|
|
|
|
+ e.pay_ord_amt,
|
|
|
|
|
+ e.pay_tk_disp_tfee,
|
|
|
|
|
+ e.pay_ord_uv,
|
|
|
|
|
+ e.eff_ord_num,
|
|
|
|
|
+ e.eff_ord_amt,
|
|
|
|
|
+ e.eff_tk_disp_tfee,
|
|
|
|
|
+ e.total_count,
|
|
|
|
|
+ e.success_count,
|
|
|
|
|
+ e.req_video_num,
|
|
|
|
|
+ e.resp_deeplink_num
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (distributiontype == 0 || distributiontype == 4) // 全分类或 req_shop_num
|
|
|
|
|
+ {
|
|
|
|
|
+ results.Add(new
|
|
|
|
|
+ {
|
|
|
|
|
+ report_date = e.report_date.ToString("yyyy-MM-dd"),
|
|
|
|
|
+ type = e.data_type,
|
|
|
|
|
+ e.uclk_uv,
|
|
|
|
|
+ e.uclk_pv,
|
|
|
|
|
+ e.pay_ord_num,
|
|
|
|
|
+ e.order_ord_num,
|
|
|
|
|
+ e.pay_ord_amt,
|
|
|
|
|
+ e.pay_tk_disp_tfee,
|
|
|
|
|
+ e.pay_ord_uv,
|
|
|
|
|
+ e.eff_ord_num,
|
|
|
|
|
+ e.eff_ord_amt,
|
|
|
|
|
+ e.eff_tk_disp_tfee,
|
|
|
|
|
+ e.total_count,
|
|
|
|
|
+ e.success_count,
|
|
|
|
|
+ e.req_shop_num,
|
|
|
|
|
+ e.resp_deeplink_num
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (distributiontype == 0 || distributiontype == 5) // 全分类或 req_base_num
|
|
|
|
|
+ {
|
|
|
|
|
+ results.Add(new
|
|
|
|
|
+ {
|
|
|
|
|
+ report_date = e.report_date.ToString("yyyy-MM-dd"),
|
|
|
|
|
+ type = e.data_type,
|
|
|
|
|
+ e.uclk_uv,
|
|
|
|
|
+ e.uclk_pv,
|
|
|
|
|
+ e.pay_ord_num,
|
|
|
|
|
+ e.order_ord_num,
|
|
|
|
|
+ e.pay_ord_amt,
|
|
|
|
|
+ e.pay_tk_disp_tfee,
|
|
|
|
|
+ e.pay_ord_uv,
|
|
|
|
|
+ e.eff_ord_num,
|
|
|
|
|
+ e.eff_ord_amt,
|
|
|
|
|
+ e.eff_tk_disp_tfee,
|
|
|
|
|
+ e.total_count,
|
|
|
|
|
+ e.success_count,
|
|
|
|
|
+ e.req_base_num,
|
|
|
|
|
+ e.resp_deeplink_num
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ if (distributiontype == 0 || distributiontype == 6) // 全分类或 req_other_aff_num
|
|
|
|
|
+ {
|
|
|
|
|
+ results.Add(new
|
|
|
|
|
+ {
|
|
|
|
|
+ report_date = e.report_date.ToString("yyyy-MM-dd"),
|
|
|
|
|
+ type = e.data_type,
|
|
|
|
|
+ e.uclk_uv,
|
|
|
|
|
+ e.uclk_pv,
|
|
|
|
|
+ e.pay_ord_num,
|
|
|
|
|
+ e.order_ord_num,
|
|
|
|
|
+ e.pay_ord_amt,
|
|
|
|
|
+ e.pay_tk_disp_tfee,
|
|
|
|
|
+ e.pay_ord_uv,
|
|
|
|
|
+ e.eff_ord_num,
|
|
|
|
|
+ e.eff_ord_amt,
|
|
|
|
|
+ e.eff_tk_disp_tfee,
|
|
|
|
|
+ e.total_count,
|
|
|
|
|
+ e.success_count,
|
|
|
|
|
+ e.req_other_aff_num,
|
|
|
|
|
+ e.resp_deeplink_num
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ if (distributiontype == 0 || distributiontype == 7) // 全分类或 req_note_num
|
|
|
|
|
+ {
|
|
|
|
|
+ results.Add(new
|
|
|
|
|
+ {
|
|
|
|
|
+ report_date = e.report_date.ToString("yyyy-MM-dd"),
|
|
|
|
|
+ type = e.data_type,
|
|
|
|
|
+ e.uclk_uv,
|
|
|
|
|
+ e.uclk_pv,
|
|
|
|
|
+ e.pay_ord_num,
|
|
|
|
|
+ e.order_ord_num,
|
|
|
|
|
+ e.pay_ord_amt,
|
|
|
|
|
+ e.pay_tk_disp_tfee,
|
|
|
|
|
+ e.pay_ord_uv,
|
|
|
|
|
+ e.eff_ord_num,
|
|
|
|
|
+ e.eff_ord_amt,
|
|
|
|
|
+ e.eff_tk_disp_tfee,
|
|
|
|
|
+ e.total_count,
|
|
|
|
|
+ e.success_count,
|
|
|
|
|
+ e.req_note_num,
|
|
|
|
|
+ e.resp_deeplink_num
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ return results;
|
|
|
}).ToList<dynamic>();
|
|
}).ToList<dynamic>();
|
|
|
|
|
+
|
|
|
|
|
+ return data;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
return data;
|
|
return data;
|
|
|
}
|
|
}
|
|
|
|
|
|