|
@@ -52,16 +52,16 @@ namespace MySystem
|
|
|
public void DoProfit()
|
|
|
{
|
|
|
string TradeMonth = DateTime.Now.AddMonths(-1).ToString("yyyyMM");
|
|
|
- string check = function.ReadInstance("/ProfitFlag/" + TradeMonth + "-before.txt");
|
|
|
+ string check = function.ReadInstance("/ProfitFlag/" + TradeMonth + "-before-new.txt");
|
|
|
if(!string.IsNullOrEmpty(check))
|
|
|
{
|
|
|
return;
|
|
|
}
|
|
|
- function.WritePage("/ProfitFlag/", TradeMonth + "-before.txt", DateTime.Now.ToString());
|
|
|
+ function.WritePage("/ProfitFlag/", TradeMonth + "-before-new.txt", DateTime.Now.ToString());
|
|
|
KxsMainModels.WebCMSEntities kxsdb = new KxsMainModels.WebCMSEntities();
|
|
|
WebCMSEntities dbnew = new WebCMSEntities();
|
|
|
KxsUserModels.WebCMSEntities udb = new KxsUserModels.WebCMSEntities();
|
|
|
- DataTable dt = CustomerSqlConn.dtable("select IsAct,UserId,sum(TotalAmount) from UserAmountSummaryBefore where TradeMonth='" + TradeMonth + "' and SeoTitle='self' group by IsAct,UserId", MysqlConn.SqlConnStr);
|
|
|
+ DataTable dt = CustomerSqlConn.dtable("select IsAct,UserId,sum(TotalAmount) from UserAmountSummaryNewBefore where TradeMonth='" + TradeMonth + "' and SeoTitle='self' group by IsAct,UserId", MysqlConn.SqlConnStr);
|
|
|
foreach(DataRow dr in dt.Rows)
|
|
|
{
|
|
|
int UserId = int.Parse(dr["UserId"].ToString());
|