|
@@ -295,14 +295,17 @@ namespace MySystem
|
|
|
KxsInviteKing item = db.KxsInviteKing.FirstOrDefault(m => m.UserId == user.UserId && m.TradeMonth == TradeMonthNum && m.Kind == Kind);
|
|
|
if(item == null)
|
|
|
{
|
|
|
- function.WriteLog(user.UserId.ToString(), "推荐王达标最终入库");
|
|
|
- item = db.KxsInviteKing.Add(new KxsInviteKing()
|
|
|
+ if(user.ActCount > 0)
|
|
|
{
|
|
|
- UserId = user.UserId,
|
|
|
- TradeMonth = TradeMonthNum,
|
|
|
- StepNum = user.ActCount > CheckCount ? CheckCount : user.ActCount,
|
|
|
- Kind = Kind,
|
|
|
- }).Entity;
|
|
|
+ function.WriteLog(user.UserId.ToString(), "推荐王达标最终入库");
|
|
|
+ item = db.KxsInviteKing.Add(new KxsInviteKing()
|
|
|
+ {
|
|
|
+ UserId = user.UserId,
|
|
|
+ TradeMonth = TradeMonthNum,
|
|
|
+ StepNum = user.ActCount > CheckCount ? CheckCount : user.ActCount,
|
|
|
+ Kind = Kind,
|
|
|
+ }).Entity;
|
|
|
+ }
|
|
|
if(num % 200 == 0)
|
|
|
{
|
|
|
db.SaveChanges();
|