|
@@ -43,7 +43,7 @@ public class ResetSmallStoreHelper
|
|
|
function.WritePage("/ResetSmallStore/", Month + ".txt", DateTime.Now.ToString());
|
|
|
CustomerSqlConn.op("update UserAccount set ThisMonthPreAmount=0,ValidPreAmount=0 where ThisMonthPreAmount>0", connstr);
|
|
|
string minId = "0";
|
|
|
- DataTable minIdDt = CustomerSqlConn.dtable("select min(Id) from ProfitRewardRecord where TradeMonth='" + PreMonth + "'", connstr);
|
|
|
+ DataTable minIdDt = CustomerSqlConn.dtable("select min(Id) from ProfitRecord where SeoTitle='" + PreMonth + "'", connstr);
|
|
|
if(minIdDt.Rows.Count > 0)
|
|
|
{
|
|
|
minId = minIdDt.Rows[0][0].ToString();
|
|
@@ -99,11 +99,11 @@ public class ResetSmallStoreHelper
|
|
|
string sql = "";
|
|
|
if(string.IsNullOrEmpty(UId))
|
|
|
{
|
|
|
- sql = "select UserId,sum(CreditTradeProfit+DebitNonTradeCapProfit+DebitTradeCapProfit) from ProfitRewardRecord where Id>=" + minId + " and UserId>0 and TradeMonth='" + PreMonth + "' group by UserId";
|
|
|
+ sql = "select UserId,sum(ProfitAmount) from ProfitRecord where Id>=" + minId + " and UserId>0 and SeoTitle='" + PreMonth + "' group by UserId";
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- sql = "select UserId,sum(CreditTradeProfit+DebitNonTradeCapProfit+DebitTradeCapProfit) from ProfitRewardRecord where UserId=" + UId + " and TradeMonth='" + PreMonth + "' group by UserId";
|
|
|
+ sql = "select UserId,sum(ProfitAmount) from ProfitRecord where Id>=" + minId + " and UserId=" + UId + " and SeoTitle='" + PreMonth + "' group by UserId";
|
|
|
}
|
|
|
string connstr = Library.ConfigurationManager.AppSettings["Pxc1SqlConnStr"].ToString();
|
|
|
DataTable dt = CustomerSqlConn.dtable(sql, connstr);
|