DuGuYang 2 lat temu
rodzic
commit
31d23006c3

+ 46 - 31
Areas/Admin/Controllers/OperateServer/SysAdminOperateController.cs

@@ -657,36 +657,52 @@ namespace MySystem.Areas.Admin.Controllers
 
             if (OperateType > 0 && decimal.Parse(OperationAmount) > 0)
             {
-                AmountRecord amountRecord = opdb.AmountRecord.Add(new AmountRecord()
-                {
-                    Version = 1,//1 未使用额度 2 可提现额度 3 关联分仓额度
-                    CreateDate = DateTime.Now,
-                    SeoKeyword = Note,
-                    SeoDescription = description,
-                    UserId = sysAdmin.UserId, //运营中心Id
-                    CreateMan = SysUserName + "-" + SysRealName,
-                    UseAmount = decimal.Parse(OperationAmount),//操作金额
-                    BeforeAmount = BeforeAmount,//使用前剩余额度
-                    AfterAmount = AfterAmount,//使用后剩余额度
-                    AfterTotalAmt = account.TotalAmt,
-                    AfterValidForGetAmount = account.ValidForGetAmount,
-                    AfterValidAmount = account.ValidAmount,
-                    OperateType = OperateType,//操作类别
-                }).Entity;
-
-                AmountChangeRecord amountChangeRecord = opdb.AmountChangeRecord.Add(new AmountChangeRecord()
-                {
-                    AmountType = 1,//1 未使用额度 2 可提现额度 3 关联分仓额度
-                    CreateDate = DateTime.Now,
-                    Title = description,
-                    Remark = Note,
-                    UserId = sysAdmin.UserId, //运营中心Id
-                    Operater = SysUserName + "-" + SysRealName,
-                    BeforeAmount = bAmount,//使用前剩余额度
-                    AfterAmount = account.TotalAmt,//使用后剩余额度
-                    ChangeAmount = decimal.Parse(OperationAmount),//操作金额
-                    OperateType = OperateType,//操作类别
-                }).Entity;
+                // OpAmountItem opAmountItem = new OpAmountItem
+                // {
+                //     UserId = sysAdmin.UserId,//创客Id
+                //     OperateType = OperateType,//操作类型(0 总和 1 增加 2 减少)
+                //     ChangeType = ChangeType,//类别
+                //     Remark = description,//备注
+                //     UseAmount = decimal.Parse(OperationAmount),//变更总额度
+                //     UseValidForGetAmount = 0,//变更可提现额度
+                //     UseTotalAmt = decimal.Parse(OperationAmount),//变更未使用额度
+                //     UseValidAmount = 0,//变更关联分仓额度
+                //     DataType = 0,//来源类型,区分表(1订单,2机具,3申请记录,4购买运营中心,5预扣款 6兑换大盟主 7仓库)
+                //     DataId = 0//来源Id,表的主键Id
+                // };
+
+                // RedisDbconn.Instance.AddList("OperateAmountRecordServiceQueue", opAmountItem);
+
+                // AmountRecord amountRecord = opdb.AmountRecord.Add(new AmountRecord()
+                // {
+                //     Version = 1,//1 未使用额度 2 可提现额度 3 关联分仓额度
+                //     CreateDate = DateTime.Now,
+                //     SeoKeyword = Note,
+                //     SeoDescription = description,
+                //     UserId = sysAdmin.UserId, //运营中心Id
+                //     CreateMan = SysUserName + "-" + SysRealName,
+                //     UseAmount = decimal.Parse(OperationAmount),//操作金额
+                //     BeforeAmount = BeforeAmount,//使用前剩余额度
+                //     AfterAmount = AfterAmount,//使用后剩余额度
+                //     AfterTotalAmt = account.TotalAmt,
+                //     AfterValidForGetAmount = account.ValidForGetAmount,
+                //     AfterValidAmount = account.ValidAmount,
+                //     OperateType = OperateType,//操作类别
+                // }).Entity;
+
+                // AmountChangeRecord amountChangeRecord = opdb.AmountChangeRecord.Add(new AmountChangeRecord()
+                // {
+                //     AmountType = 1,//1 未使用额度 2 可提现额度 3 关联分仓额度
+                //     CreateDate = DateTime.Now,
+                //     Title = description,
+                //     Remark = Note,
+                //     UserId = sysAdmin.UserId, //运营中心Id
+                //     Operater = SysUserName + "-" + SysRealName,
+                //     BeforeAmount = bAmount,//使用前剩余额度
+                //     AfterAmount = account.TotalAmt,//使用后剩余额度
+                //     ChangeAmount = decimal.Parse(OperationAmount),//操作金额
+                //     OperateType = OperateType,//操作类别
+                // }).Entity;
 
                 AddSysLog(data.Id.ToString(), "SysAdmin", "EditAmt");
                 opdb.SaveChanges();
@@ -697,7 +713,6 @@ namespace MySystem.Areas.Admin.Controllers
             }
             return "success";
         }
-
         #endregion