|
@@ -3074,27 +3074,27 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
{
|
|
{
|
|
|
RedisDbconn.Instance.AddList("WifiWithholdBackQueue", "{\"UserId\":\"" + OldBuyUserId + "\",\"SnNo\":\"" + oldpos.PosSn + "\"}");
|
|
RedisDbconn.Instance.AddList("WifiWithholdBackQueue", "{\"UserId\":\"" + OldBuyUserId + "\",\"SnNo\":\"" + oldpos.PosSn + "\"}");
|
|
|
|
|
|
|
|
- bool check = db.ToChargeBackRecord.Any(m => m.SeoDescription.Contains(newpos.PosSn) && (m.Status == 3 || m.Status == 0));
|
|
|
|
|
- if(!check)
|
|
|
|
|
- {
|
|
|
|
|
- db.ToChargeBackRecord.Add(new ToChargeBackRecord
|
|
|
|
|
- {
|
|
|
|
|
- CreateDate = DateTime.Now,
|
|
|
|
|
- SeoTitle = "系统",
|
|
|
|
|
- SeoDescription = "WIFI超时未激活扣款",
|
|
|
|
|
- Remark = "WIFI超时未激活扣款",
|
|
|
|
|
- ChargeType = 1,
|
|
|
|
|
- ChargeAmount = ChargeAmount,
|
|
|
|
|
- UserId = newpos.BuyUserId,
|
|
|
|
|
- Field1 = newpos.PosSn,
|
|
|
|
|
- });
|
|
|
|
|
- //增加账户预扣总额
|
|
|
|
|
- UserAccount account = db.UserAccount.FirstOrDefault(m => m.Id == newpos.BuyUserId);
|
|
|
|
|
- if (account != null)
|
|
|
|
|
- {
|
|
|
|
|
- account.ToChargeAmount += ChargeAmount;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // bool check = db.ToChargeBackRecord.Any(m => m.SeoDescription.Contains(newpos.PosSn) && (m.Status == 3 || m.Status == 0));
|
|
|
|
|
+ // if(!check)
|
|
|
|
|
+ // {
|
|
|
|
|
+ // db.ToChargeBackRecord.Add(new ToChargeBackRecord
|
|
|
|
|
+ // {
|
|
|
|
|
+ // CreateDate = DateTime.Now,
|
|
|
|
|
+ // SeoTitle = "系统",
|
|
|
|
|
+ // SeoDescription = "WIFI超时未激活扣款",
|
|
|
|
|
+ // Remark = "WIFI超时未激活扣款",
|
|
|
|
|
+ // ChargeType = 1,
|
|
|
|
|
+ // ChargeAmount = ChargeAmount,
|
|
|
|
|
+ // UserId = newpos.BuyUserId,
|
|
|
|
|
+ // Field1 = newpos.PosSn,
|
|
|
|
|
+ // });
|
|
|
|
|
+ // //增加账户预扣总额
|
|
|
|
|
+ // UserAccount account = db.UserAccount.FirstOrDefault(m => m.Id == newpos.BuyUserId);
|
|
|
|
|
+ // if (account != null)
|
|
|
|
|
+ // {
|
|
|
|
|
+ // account.ToChargeAmount += ChargeAmount;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
}
|
|
}
|
|
|
db.SaveChanges();
|
|
db.SaveChanges();
|
|
|
}
|
|
}
|