You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.7 KiB
53 lines
1.7 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
using System.IO;
|
|
using System.Text;
|
|
|
|
using Sog;
|
|
|
|
namespace bill_statistics
|
|
{
|
|
public partial class LogWrapper
|
|
{
|
|
public static void LogRetentionOptimizetion()
|
|
{
|
|
FileStream fsFile = new FileStream("./bill_out_RetentionOptimizetion.txt", FileMode.Create);
|
|
StreamWriter fileWriter = new StreamWriter(fsFile, Encoding.UTF8);
|
|
|
|
string strMessage = "日期\t推送天\t6:30推送\t成功召回\t9:00推送\t成功召回\t总计召回\t总计成功";
|
|
|
|
fileWriter.WriteLine(strMessage);
|
|
|
|
|
|
foreach (KeyValuePair<DateTime, BillInfoEveryDay> pair in BillAlldays.Instance.m_billAllDays)
|
|
{
|
|
var dateTime = pair.Key;
|
|
BillInfoEveryDay info = pair.Value;
|
|
|
|
foreach(var data in info.optimizedata)
|
|
{
|
|
strMessage = string.Format("{0}/{1}/{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\t{9}",
|
|
dateTime.Year, dateTime.Month, dateTime.Day
|
|
, data.Value.day
|
|
, data.Value.push1
|
|
, data.Value.succ1
|
|
, data.Value.push2
|
|
, data.Value.succ2
|
|
, data.Value.push2 + data.Value.push1
|
|
, data.Value.succ1 + data.Value.succ2);
|
|
fileWriter.WriteLine(strMessage);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fileWriter.Dispose();
|
|
fsFile.Dispose();
|
|
}
|
|
}
|
|
}
|