Browse Source

增加运营中心额度,配套的记录

lcl 1 year ago
parent
commit
1f1576cf0c

BIN
.DS_Store


+ 11 - 0
AppStart/Helper/AlipayPayBack2Service.cs

@@ -771,6 +771,17 @@ namespace MySystem
                     SeoDescription = Remark,
                     Version = AmountType,
                 }).Entity;
+                OpModels.AmountChangeRecord amountChangeRecord = db.AmountChangeRecord.Add(new OpModels.AmountChangeRecord()
+                {
+                    AmountType = AmountType,//1 未使用额度 2 可提现额度 3 关联分仓额度
+                    CreateDate = DateTime.Now,
+                    Title = "合伙人提现",
+                    UserId = UserId, //运营中心Id
+                    BeforeAmount = BeforeAmount,//使用前剩余额度
+                    AfterAmount = AfterAmount,//使用后剩余额度
+                    ChangeAmount = Money,//操作金额
+                    OperateType = OperateType,//操作类别
+                }).Entity;
             }
             db.SaveChanges();
         }

+ 12 - 0
AppStart/Helper/Operate/OperateAmountService.cs

@@ -70,6 +70,18 @@ namespace MySystem
                         }).Entity;
                         db.SaveChanges();
 
+                        AmountChangeRecord amountChangeRecord = db.AmountChangeRecord.Add(new AmountChangeRecord()
+                        {
+                            AmountType = 2,//1 未使用额度 2 可提现额度 3 关联分仓额度
+                            CreateDate = DateTime.Now,
+                            Title = "合伙人提现",
+                            UserId = UserId, //运营中心Id
+                            BeforeAmount = BeforeAmount,//使用前剩余额度
+                            AfterAmount = AfterAmount,//使用后剩余额度
+                            ChangeAmount = Amount,//操作金额
+                            OperateType = 1,//操作类别
+                        }).Entity;
+
                         db.Dispose();
                     }
                     catch (Exception ex)

+ 12 - 0
AppStart/Helper/PosCouponPrize/PosCouponPrizeService.cs

@@ -532,6 +532,18 @@ namespace MySystem
                     SeoDescription = Remark,
                     Version = AmountType,
                 }).Entity;
+
+                OpModels.AmountChangeRecord amountChangeRecord = db.AmountChangeRecord.Add(new OpModels.AmountChangeRecord()
+                {
+                    AmountType = 2,//1 未使用额度 2 可提现额度 3 关联分仓额度
+                    CreateDate = DateTime.Now,
+                    Title = "合伙人提现",
+                    UserId = UserId, //运营中心Id
+                    BeforeAmount = BeforeAmount,//使用前剩余额度
+                    AfterAmount = AfterAmount,//使用后剩余额度
+                    ChangeAmount = Money,//操作金额
+                    OperateType = OperateType,//操作类别
+                }).Entity;
             }
             db.SaveChanges();
         }

+ 12 - 0
AppStart/Helper/TimeOutPosChargeService.cs

@@ -262,6 +262,18 @@ namespace MySystem
                                 Version = 2,
                             }).Entity;
 
+                            OpModels.AmountChangeRecord amountChangeRecord = opdb.AmountChangeRecord.Add(new OpModels.AmountChangeRecord()
+                            {
+                                AmountType = 2,
+                                CreateDate = DateTime.Now,
+                                Title = "合伙人提现",
+                                UserId = UserId, //运营中心Id
+                                BeforeAmount = opUserAccount.ValidForGetAmount,//使用前剩余额度
+                                AfterAmount = opUserAccount.ValidForGetAmount - record.ChargeAmount,//使用后剩余额度
+                                ChangeAmount = record.ChargeAmount,//操作金额
+                                OperateType = 2,//操作类别
+                            }).Entity;
+
                             function.WriteLog("OperateToChargeAmount:" + userAccount.OperateToChargeAmount + ";ChargeAmount:" + record.ChargeAmount + ";", "扣款监听日志");
                             if (userAccount.OperateToChargeAmount >= record.ChargeAmount)
                             {

+ 24 - 0
OpModels/AmountChangeRecord.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.OpModels
+{
+    public partial class AmountChangeRecord
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string Remark { get; set; }
+        public string Title { get; set; }
+        public int OperateType { get; set; }
+        public decimal ChangeAmount { get; set; }
+        public decimal AfterAmount { get; set; }
+        public decimal BeforeAmount { get; set; }
+        public int AmountType { get; set; }
+        public int UserId { get; set; }
+        public string Operater { get; set; }
+    }
+}

+ 70 - 0
OpModels/WebCMSEntities.cs

@@ -18,6 +18,7 @@ namespace MySystem.OpModels
         public virtual DbSet<ActMerDaySummary> ActMerDaySummary { get; set; }
         public virtual DbSet<ActMerMonthSummary> ActMerMonthSummary { get; set; }
         public virtual DbSet<Advertisment> Advertisment { get; set; }
+        public virtual DbSet<AmountChangeRecord> AmountChangeRecord { get; set; }
         public virtual DbSet<AmountRecord> AmountRecord { get; set; }
         public virtual DbSet<Col> Col { get; set; }
         public virtual DbSet<MachineApplyOpRecord> MachineApplyOpRecord { get; set; }
@@ -243,6 +244,75 @@ namespace MySystem.OpModels
                 entity.Property(e => e.Version).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<AmountChangeRecord>(entity =>
+            {
+                entity.HasComment("合伙人额度变动记录表");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AfterAmount)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("变更后金额");
+
+                entity.Property(e => e.AmountType)
+                    .HasColumnType("int(11)")
+                    .HasComment("额度类型");
+
+                entity.Property(e => e.BeforeAmount)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("变更前金额");
+
+                entity.Property(e => e.ChangeAmount)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("变更金额");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.OperateType)
+                    .HasColumnType("int(11)")
+                    .HasComment("变动类型");
+
+                entity.Property(e => e.Operater)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("操作人")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(100)")
+                    .HasComment("备注")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort)
+                    .HasColumnType("int(11)")
+                    .HasComment("排序序号");
+
+                entity.Property(e => e.Status)
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+
+                entity.Property(e => e.Title)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("变动分类标题")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("修改时间");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnType("int(11)")
+                    .HasComment("创客Id");
+
+                entity.Property(e => e.Version)
+                    .HasColumnType("int(11)")
+                    .HasComment("版本号");
+            });
+
             modelBuilder.Entity<AmountRecord>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");