|
@@ -837,6 +837,19 @@ namespace MySystem
|
|
|
}
|
|
|
|
|
|
//操作储备金
|
|
|
+ private int GetLeaderReserveRecordType(string Remark)
|
|
|
+ {
|
|
|
+ Dictionary<int, string> data = new Dictionary<int, string>();
|
|
|
+ data.Add(11, "兑换机具券,机具券兑换,系统增加(盟主储蓄金),系统扣减(盟主储蓄金),储备金购买");
|
|
|
+ data.Add(12, "系统增加(可提现余额),系统扣减(可提现余额)");
|
|
|
+ data.Add(13, "推荐大盟主,推荐小盟主,商城购机,购机奖励");
|
|
|
+ var item = data.FirstOrDefault(m => m.Value.Contains(Remark));
|
|
|
+ if(item.Key > 0)
|
|
|
+ {
|
|
|
+ return item.Key;
|
|
|
+ }
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
public void OpReserve(WebCMSEntities db, Orders order, int UserId, decimal Money, int ChangeType, int SourceUserId = 0, string Remark = "储备金购买")
|
|
|
{
|
|
|
UserAccount account = db.UserAccount.FirstOrDefault(m => m.Id == UserId);
|
|
@@ -872,6 +885,7 @@ namespace MySystem
|
|
|
TradeMonth = DateTime.Now.ToString("yyyyMM"),
|
|
|
UserId = UserId,
|
|
|
SourceUserId = SourceUserId,
|
|
|
+ Sort = GetLeaderReserveRecordType(Remark),
|
|
|
}).Entity;
|
|
|
db.SaveChanges();
|
|
|
}
|