|
@@ -226,7 +226,7 @@ namespace MySystem
|
|
Users user = db.Users.FirstOrDefault(m => m.Id == order.UserId) ?? new Users();
|
|
Users user = db.Users.FirstOrDefault(m => m.Id == order.UserId) ?? new Users();
|
|
if(pro.ProductId == 27)
|
|
if(pro.ProductId == 27)
|
|
{
|
|
{
|
|
- OperateReserveBackFor(db, user.Id, 40000, order.Id);
|
|
|
|
|
|
+ OperateReserveBackFor(db, user.Id, 40000, order.Id, "购买大盟主");
|
|
//自留券数量清除
|
|
//自留券数量清除
|
|
CancelStayCoupon(db, order.UserId, 7);
|
|
CancelStayCoupon(db, order.UserId, 7);
|
|
//预设大盟主职级
|
|
//预设大盟主职级
|
|
@@ -245,7 +245,7 @@ namespace MySystem
|
|
Users user = db.Users.FirstOrDefault(m => m.Id == order.UserId) ?? new Users();
|
|
Users user = db.Users.FirstOrDefault(m => m.Id == order.UserId) ?? new Users();
|
|
//自留券数量清除
|
|
//自留券数量清除
|
|
CancelStayCoupon(db, order.UserId, 5);
|
|
CancelStayCoupon(db, order.UserId, 5);
|
|
- if (check) OperateReserveBackFor(db, user.Id, 10000, order.Id);
|
|
|
|
|
|
+ if (check) OperateReserveBackFor(db, user.Id, 10000, order.Id, "购买小盟主");
|
|
//预设小盟主职级
|
|
//预设小盟主职级
|
|
LeaderPreUserLevel(db, order.UserId, 1);
|
|
LeaderPreUserLevel(db, order.UserId, 1);
|
|
AddLeader(db, order.UserId, 1);
|
|
AddLeader(db, order.UserId, 1);
|
|
@@ -375,8 +375,21 @@ namespace MySystem
|
|
}
|
|
}
|
|
if(TotalPrice > 0)
|
|
if(TotalPrice > 0)
|
|
{
|
|
{
|
|
- OperateAmountChange(opdb, LeaderUserId, TotalPrice, 2, 1, "商城购机", true, order.Id);
|
|
|
|
- OperateAmountChange(opdb, LeaderUserId, TotalPrice, 1, 2, "商城购机", true, order.Id);
|
|
|
|
|
|
+ // OperateAmountChange(opdb, LeaderUserId, TotalPrice, 2, 1, "商城购机", true, order.Id);
|
|
|
|
+ // OperateAmountChange(opdb, LeaderUserId, TotalPrice, 1, 2, "商城购机", true, order.Id);
|
|
|
|
+ OpAmountItem item = new OpAmountItem()
|
|
|
|
+ {
|
|
|
|
+ UserId = LeaderUserId,
|
|
|
|
+ OperateType = 0,
|
|
|
|
+ ChangeType = 14,
|
|
|
|
+ Remark = "购买小盟主",
|
|
|
|
+ UseAmount = TotalPrice,
|
|
|
|
+ UseValidForGetAmount = TotalPrice,
|
|
|
|
+ UseTotalAmt = TotalPrice,
|
|
|
|
+ DataType = 1,
|
|
|
|
+ DataId = order.Id,
|
|
|
|
+ };
|
|
|
|
+ RedisDbconn.Instance.AddList("OperateAmountRecordServiceQueue", item);
|
|
LeaderUserId = 0;
|
|
LeaderUserId = 0;
|
|
result = false;
|
|
result = false;
|
|
}
|
|
}
|
|
@@ -646,7 +659,7 @@ namespace MySystem
|
|
|
|
|
|
|
|
|
|
//操作运营中心额度
|
|
//操作运营中心额度
|
|
- public void OperateReserveBackFor(WebCMSEntities maindb, int UserId, decimal Money, int OrderId = 0)
|
|
|
|
|
|
+ public void OperateReserveBackFor(WebCMSEntities maindb, int UserId, decimal Money, int OrderId = 0, string Remark = "商城购机")
|
|
{
|
|
{
|
|
OpModels.WebCMSEntities db = new OpModels.WebCMSEntities();
|
|
OpModels.WebCMSEntities db = new OpModels.WebCMSEntities();
|
|
while(UserId > 0)
|
|
while(UserId > 0)
|
|
@@ -667,7 +680,7 @@ namespace MySystem
|
|
UserId = UserId,
|
|
UserId = UserId,
|
|
OperateType = 0,
|
|
OperateType = 0,
|
|
ChangeType = 5,
|
|
ChangeType = 5,
|
|
- Remark = "商城购机",
|
|
|
|
|
|
+ Remark = Remark,
|
|
UseAmount = Money,
|
|
UseAmount = Money,
|
|
UseValidForGetAmount = Money,
|
|
UseValidForGetAmount = Money,
|
|
UseTotalAmt = Money,
|
|
UseTotalAmt = Money,
|