|
@@ -265,7 +265,7 @@ namespace MySystem
|
|
|
string MonthFlag = month;
|
|
string MonthFlag = month;
|
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
|
// DataTable dt = CustomerSqlConn.dtable("select * from (select UserId,ParentUserId,ParentNav,(select count(1) from LeaderCompTradeStat where ParentUserId=p.UserId and TradeAmount>=30000000) BigCount from LeaderCompTradeStat p where StatMonth='" + month + "' and LeaderType>=2) tb where BigCount>0", MysqlConn.SqlConnStr);
|
|
// DataTable dt = CustomerSqlConn.dtable("select * from (select UserId,ParentUserId,ParentNav,(select count(1) from LeaderCompTradeStat where ParentUserId=p.UserId and TradeAmount>=30000000) BigCount from LeaderCompTradeStat p where StatMonth='" + month + "' and LeaderType>=2) tb where BigCount>0", MysqlConn.SqlConnStr);
|
|
|
- DataTable dt = CustomerSqlConn.dtable("select * from (select UserId,ParentUserId,ParentNav,(select count(1) from LeaderCompTradeStat where ParentUserId=p.UserId and TradeAmount>=30000000) BigCount from LeaderCompTradeStat p where StatMonth='" + month + "') tb where BigCount>0", MysqlConn.SqlConnStr);
|
|
|
|
|
|
|
+ DataTable dt = CustomerSqlConn.dtable("select * from (select UserId,ParentUserId,ParentNav,(select count(1) from LeaderCompTradeStat where TradeAmount>=30000000 and ParentUserId=p.UserId) BigCount from LeaderCompTradeStat p where StatMonth='" + month + "') tb where BigCount>0", MysqlConn.SqlConnStr);
|
|
|
foreach(DataRow dr in dt.Rows)
|
|
foreach(DataRow dr in dt.Rows)
|
|
|
{
|
|
{
|
|
|
int UserId = int.Parse(function.CheckInt(dr["UserId"].ToString()));
|
|
int UserId = int.Parse(function.CheckInt(dr["UserId"].ToString()));
|
|
@@ -314,7 +314,7 @@ namespace MySystem
|
|
|
sql += "insert into kxs_shd_leader (shd_type,trade_amt,source_bonus_amt,create_time,trade_month,user_id) values (1," + stat.TradeAmount + "," + CompPrize + ",now(),'" + MonthFlag + "'," + UserId + ");";
|
|
sql += "insert into kxs_shd_leader (shd_type,trade_amt,source_bonus_amt,create_time,trade_month,user_id) values (1," + stat.TradeAmount + "," + CompPrize + ",now(),'" + MonthFlag + "'," + UserId + ");";
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- CustomerSqlConn.op(sql, MysqlConn.JavaUserSqlConnStr);
|
|
|
|
|
|
|
+ if(!string.IsNullOrEmpty(sql)) CustomerSqlConn.op(sql, MysqlConn.JavaUserSqlConnStr);
|
|
|
Utils.WriteLog(DateTime.Now.ToString(), "领导人达标奖励日志");
|
|
Utils.WriteLog(DateTime.Now.ToString(), "领导人达标奖励日志");
|
|
|
db.Dispose();
|
|
db.Dispose();
|
|
|
}
|
|
}
|