|
@@ -122,7 +122,7 @@ namespace MySystem
|
|
|
foreach (ProfitResult sub in list)
|
|
|
{
|
|
|
int ProfitType = sub.UserId == UserId ? 0 : 1;
|
|
|
- ProfitRewardRecord editprofitrecord = dbnew.ProfitRewardRecord.FirstOrDefault(m => m.UserId == sub.UserId && m.BrandId == 1 && m.ProfitType == ProfitType && m.TradeMonth == TradeMonth && m.Sort == Sort);
|
|
|
+ ProfitRewardRecord editprofitrecord = dbnew.ProfitRewardRecord.FirstOrDefault(m => m.UserId == sub.UserId && m.BrandId == 1 && m.Version == 1 && m.ProfitType == ProfitType && m.TradeMonth == TradeMonth && m.Sort == Sort);
|
|
|
if (editprofitrecord == null)
|
|
|
{
|
|
|
editprofitrecord = dbnew.ProfitRewardRecord.Add(new ProfitRewardRecord()
|
|
@@ -130,6 +130,7 @@ namespace MySystem
|
|
|
CreateDate = DateTime.Now,
|
|
|
UserId = sub.UserId, //创客
|
|
|
BrandId = 1, //品牌
|
|
|
+ Version = 1, //新政
|
|
|
ProfitType = ProfitType, //创客分润类型
|
|
|
TradeMonth = TradeMonth, //交易月
|
|
|
TopUserId = TopUserId, //顶级创客
|