|
@@ -47,8 +47,14 @@ namespace MySystem
|
|
|
string Month2 = start.AddMonths(-1).ToString("yyyyMM");
|
|
|
string Month3 = start.AddMonths(-2).ToString("yyyyMM");
|
|
|
OtherMySqlConn.connstr = Library.ConfigurationManager.AppSettings["Pxc1SqlConnStr"].ToString();
|
|
|
+ string GetCount = function.ReadInstance("/PublicParam/HelpProfitMerCount.txt");
|
|
|
+ if(string.IsNullOrEmpty(GetCount))
|
|
|
+ {
|
|
|
+ GetCount = "1000";
|
|
|
+ function.WritePage("/PublicParam/", "HelpProfitMerCount.txt", GetCount);
|
|
|
+ }
|
|
|
RedisDbconn.Instance.Clear("HelpProfitMerchantIds");
|
|
|
- DataTable dt = OtherMySqlConn.dtable("SELECT MerchantId,sum FROM( SELECT MerchantId,BrandId,SUM(TradeAmount) sum FROM PosMerchantTradeSummay WHERE MerchantId not in (select MerchantId from HelpProfitMerIds) AND TradeMonth in ('" + Month1 + "','" + Month2 + "','" + Month3 + "') GROUP BY MerchantId)a WHERE a.sum/3 >= 15000 and a.sum/3 <= 25000 limit 1000");
|
|
|
+ DataTable dt = OtherMySqlConn.dtable("SELECT MerchantId,sum FROM( SELECT MerchantId,BrandId,SUM(TradeAmount) sum FROM PosMerchantTradeSummay WHERE MerchantId not in (select MerchantId from HelpProfitMerIds) AND TradeMonth in ('" + Month1 + "','" + Month2 + "','" + Month3 + "') GROUP BY MerchantId)a WHERE a.sum/3 >= 35000 and a.sum/3 <= 50000 limit " + GetCount);
|
|
|
foreach(DataRow dr in dt.Rows)
|
|
|
{
|
|
|
RedisDbconn.Instance.AddList("HelpProfitMerchantIds", int.Parse(function.CheckInt(dr["MerchantId"].ToString())));
|