|
@@ -41,6 +41,7 @@ public class ResetSmallStoreHelper
|
|
if(string.IsNullOrEmpty(check))
|
|
if(string.IsNullOrEmpty(check))
|
|
{
|
|
{
|
|
function.WritePage("/ResetSmallStore/", Month + ".txt", DateTime.Now.ToString());
|
|
function.WritePage("/ResetSmallStore/", Month + ".txt", DateTime.Now.ToString());
|
|
|
|
+ OtherMySqlConn.op("update UserAccount set ThisMonthPreAmount=0,ValidPreAmount=0 where ThisMonthPreAmount>0");
|
|
string minId = "0";
|
|
string minId = "0";
|
|
DataTable minIdDt = OtherMySqlConn.dtable("select min(Id) from ProfitRewardRecord where TradeMonth='" + PreMonth + "'");
|
|
DataTable minIdDt = OtherMySqlConn.dtable("select min(Id) from ProfitRewardRecord where TradeMonth='" + PreMonth + "'");
|
|
if(minIdDt.Rows.Count > 0)
|
|
if(minIdDt.Rows.Count > 0)
|
|
@@ -55,6 +56,7 @@ public class ResetSmallStoreHelper
|
|
index += 1;
|
|
index += 1;
|
|
int UserId = int.Parse(function.CheckInt(dr["UserId"].ToString()));
|
|
int UserId = int.Parse(function.CheckInt(dr["UserId"].ToString()));
|
|
decimal ProfitAmount = decimal.Parse(function.CheckNum(dr[1].ToString()));
|
|
decimal ProfitAmount = decimal.Parse(function.CheckNum(dr[1].ToString()));
|
|
|
|
+ decimal PreProfitAmount = ProfitAmount;
|
|
var prelist = db.PreSendStockDetail.Select(m => new { m.Id, m.BrandId, m.ToUserId, m.Status, m.ApplyFlag }).Where(m => m.ToUserId == UserId && m.Status == 1 && m.ApplyFlag == 0).ToList();
|
|
var prelist = db.PreSendStockDetail.Select(m => new { m.Id, m.BrandId, m.ToUserId, m.Status, m.ApplyFlag }).Where(m => m.ToUserId == UserId && m.Status == 1 && m.ApplyFlag == 0).ToList();
|
|
foreach(var prepos in prelist)
|
|
foreach(var prepos in prelist)
|
|
{
|
|
{
|
|
@@ -93,7 +95,7 @@ public class ResetSmallStoreHelper
|
|
}).Entity;
|
|
}).Entity;
|
|
db.SaveChanges();
|
|
db.SaveChanges();
|
|
}
|
|
}
|
|
- account.ThisMonthPreAmount = ProfitAmount;
|
|
|
|
|
|
+ account.ThisMonthPreAmount = PreProfitAmount;
|
|
account.ValidPreAmount = ProfitAmount;
|
|
account.ValidPreAmount = ProfitAmount;
|
|
if(index % 200 == 0)
|
|
if(index % 200 == 0)
|
|
{
|
|
{
|