Explorar el Código

完成,待测试

DuGuYang hace 11 meses
padre
commit
4a1715b91f

+ 2 - 0
Models/Main/AgentLevels.cs

@@ -13,5 +13,7 @@ namespace MySystem.Models.Main
         public DateTime? UpdateDate { get; set; }
         public string Name { get; set; }
         public decimal Percent { get; set; }
+        public decimal UnActPercent { get; set; }
+        public string Operator { get; set; }
     }
 }

+ 3 - 0
Models/Main/AgentProfitRecord.cs

@@ -18,5 +18,8 @@ namespace MySystem.Models.Main
         public decimal CreditTradeAmt { get; set; }
         public int ProfitType { get; set; }
         public int UserId { get; set; }
+        public int ActFlag { get; set; }
+        public string Operator { get; set; }
+        public string OrderNo { get; set; }
     }
 }

+ 1 - 0
Models/Main/MerchantAddInfo.cs

@@ -148,5 +148,6 @@ namespace MySystem.Models.Main
         public DateTime? HdPassDate { get; set; }
         public ulong HdBindWeChat { get; set; }
         public string MerchantType { get; set; }
+        public int PlaceType { get; set; }
     }
 }

+ 21 - 0
Models/Main/ProfitRecordForAgent.cs

@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Main
+{
+    public partial class ProfitRecordForAgent
+    {
+        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 TradeMonth { get; set; }
+        public decimal TradeAmount { get; set; }
+        public string Remark { get; set; }
+        public int BrandId { get; set; }
+        public decimal ProfitAmount { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 87 - 1
Models/Main/WebCMSEntities.cs

@@ -173,6 +173,7 @@ namespace MySystem.Models.Main
         public virtual DbSet<ProfitReceiveRecord> ProfitReceiveRecord { get; set; }
         public virtual DbSet<ProfitReceives> ProfitReceives { get; set; }
         public virtual DbSet<ProfitRecord> ProfitRecord { get; set; }
+        public virtual DbSet<ProfitRecordForAgent> ProfitRecordForAgent { get; set; }
         public virtual DbSet<ProfitRewardExport> ProfitRewardExport { get; set; }
         public virtual DbSet<ProfitRewardRecord> ProfitRewardRecord { get; set; }
         public virtual DbSet<ProfitSubsidyDetail> ProfitSubsidyDetail { get; set; }
@@ -944,8 +945,14 @@ namespace MySystem.Models.Main
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.Operator)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("操作人")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.Percent)
-                    .HasColumnType("decimal(18,2)")
+                    .HasColumnType("decimal(18,5)")
                     .HasComment("分润比例");
 
                 entity.Property(e => e.Sort)
@@ -956,6 +963,10 @@ namespace MySystem.Models.Main
                     .HasColumnType("int(11)")
                     .HasComment("状态");
 
+                entity.Property(e => e.UnActPercent)
+                    .HasColumnType("decimal(18,5)")
+                    .HasComment("非活动分润比例");
+
                 entity.Property(e => e.UpdateDate)
                     .HasColumnType("datetime")
                     .HasComment("修改时间");
@@ -971,6 +982,10 @@ namespace MySystem.Models.Main
 
                 entity.Property(e => e.Id).HasColumnType("int(11)");
 
+                entity.Property(e => e.ActFlag)
+                    .HasColumnType("int(11)")
+                    .HasComment("交易类型");
+
                 entity.Property(e => e.CheckStatus)
                     .HasColumnType("int(11)")
                     .HasComment("验证和同步账户状态");
@@ -983,6 +998,18 @@ namespace MySystem.Models.Main
                     .HasColumnType("decimal(18,2)")
                     .HasComment("贷记卡交易总金额");
 
+                entity.Property(e => e.Operator)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("操作人")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OrderNo)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("订单号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.ProfitType)
                     .HasColumnType("int(11)")
                     .HasComment("创客分润类型");
@@ -5843,6 +5870,10 @@ namespace MySystem.Models.Main
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.PlaceType)
+                    .HasColumnType("int(11)")
+                    .HasComment("场所类型");
+
                 entity.Property(e => e.ProductImg)
                     .HasColumnName("productImg")
                     .HasColumnType("varchar(200)")
@@ -12152,6 +12183,61 @@ namespace MySystem.Models.Main
                 entity.Property(e => e.Version).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<ProfitRecordForAgent>(entity =>
+            {
+                entity.HasComment("区域代理分润记录");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.BrandId)
+                    .HasColumnType("int(11)")
+                    .HasComment("品牌");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.ProfitAmount)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("分润金额");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(64)")
+                    .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.TradeAmount)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("交易额");
+
+                entity.Property(e => e.TradeMonth)
+                    .HasColumnType("varchar(6)")
+                    .HasComment("月份")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("修改时间");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnType("int(11)")
+                    .HasComment("创客");
+
+                entity.Property(e => e.Version)
+                    .HasColumnType("int(11)")
+                    .HasComment("版本号");
+            });
+
             modelBuilder.Entity<ProfitRewardExport>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");

+ 1 - 0
Models/Main1/AgentLevels.cs

@@ -14,5 +14,6 @@ namespace MySystem.Models.Main1
         public string Name { get; set; }
         public decimal Percent { get; set; }
         public decimal UnActPercent { get; set; }
+        public string Operator { get; set; }
     }
 }

+ 3 - 0
Models/Main1/AgentProfitRecord.cs

@@ -18,5 +18,8 @@ namespace MySystem.Models.Main1
         public decimal CreditTradeAmt { get; set; }
         public int ProfitType { get; set; }
         public int UserId { get; set; }
+        public int ActFlag { get; set; }
+        public string Operator { get; set; }
+        public string OrderNo { get; set; }
     }
 }

+ 1 - 0
Models/Main1/MerchantAddInfo.cs

@@ -145,5 +145,6 @@ namespace MySystem.Models.Main1
         public string AliMerchantId { get; set; }
         public string WeChatMerchantId { get; set; }
         public string MerchantType { get; set; }
+        public int PlaceType { get; set; }
     }
 }

+ 21 - 0
Models/Main1/ProfitRecordForAgent.cs

@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Main1
+{
+    public partial class ProfitRecordForAgent
+    {
+        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 TradeMonth { get; set; }
+        public decimal TradeAmount { get; set; }
+        public string Remark { get; set; }
+        public int BrandId { get; set; }
+        public decimal ProfitAmount { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 82 - 0
Models/Main1/WebCMSEntities.cs

@@ -175,6 +175,7 @@ namespace MySystem.Models.Main1
         public virtual DbSet<ProfitReceiveRecord> ProfitReceiveRecord { get; set; }
         public virtual DbSet<ProfitReceives> ProfitReceives { get; set; }
         public virtual DbSet<ProfitRecord> ProfitRecord { get; set; }
+        public virtual DbSet<ProfitRecordForAgent> ProfitRecordForAgent { get; set; }
         public virtual DbSet<ProfitRewardExport> ProfitRewardExport { get; set; }
         public virtual DbSet<ProfitRewardRecord> ProfitRewardRecord { get; set; }
         public virtual DbSet<ProfitSubsidyDetail> ProfitSubsidyDetail { get; set; }
@@ -948,6 +949,12 @@ namespace MySystem.Models.Main1
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.Operator)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("操作人")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.Percent)
                     .HasColumnType("decimal(18,5)")
                     .HasComment("分润比例");
@@ -979,6 +986,10 @@ namespace MySystem.Models.Main1
 
                 entity.Property(e => e.Id).HasColumnType("int(11)");
 
+                entity.Property(e => e.ActFlag)
+                    .HasColumnType("int(11)")
+                    .HasComment("交易类型");
+
                 entity.Property(e => e.CheckStatus)
                     .HasColumnType("int(11)")
                     .HasComment("验证和同步账户状态");
@@ -991,6 +1002,18 @@ namespace MySystem.Models.Main1
                     .HasColumnType("decimal(18,2)")
                     .HasComment("贷记卡交易总金额");
 
+                entity.Property(e => e.Operator)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("操作人")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OrderNo)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("订单号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.ProfitType)
                     .HasColumnType("int(11)")
                     .HasComment("创客分润类型");
@@ -5952,6 +5975,10 @@ namespace MySystem.Models.Main1
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.PlaceType)
+                    .HasColumnType("int(11)")
+                    .HasComment("场所类型");
+
                 entity.Property(e => e.ProductImg)
                     .HasColumnName("productImg")
                     .HasColumnType("varchar(200)")
@@ -12261,6 +12288,61 @@ namespace MySystem.Models.Main1
                 entity.Property(e => e.Version).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<ProfitRecordForAgent>(entity =>
+            {
+                entity.HasComment("区域代理分润记录");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.BrandId)
+                    .HasColumnType("int(11)")
+                    .HasComment("品牌");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.ProfitAmount)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("分润金额");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(64)")
+                    .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.TradeAmount)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("交易额");
+
+                entity.Property(e => e.TradeMonth)
+                    .HasColumnType("varchar(6)")
+                    .HasComment("月份")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("修改时间");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnType("int(11)")
+                    .HasComment("创客");
+
+                entity.Property(e => e.Version)
+                    .HasColumnType("int(11)")
+                    .HasComment("版本号");
+            });
+
             modelBuilder.Entity<ProfitRewardExport>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");

+ 3 - 5
Util/HaoDa/AlipayFunctionForHD.cs

@@ -35,12 +35,10 @@ namespace MySystem
             string identity_type = info.SubjectType;
             string store_address = info.BizStoreAddress;
             string merchant_type = "STORE";
-            if (!string.IsNullOrEmpty(info.MerchantType))
-            {
-                merchant_type = info.MerchantType;
-            }
-            if (merchant_type == "STALL")
+            var placeType = info.PlaceType; // 小微商户经营场所类型(0 固定场所 1 流动动摊贩)
+            if (placeType == 1)
             {
+                merchant_type = "STALL";
                 store_address = "无";
             }
             if (identity_type == "SUBJECT_TYPE_ENTERPRISE") identity_type = "ENTERPRISE";

+ 7 - 1
Util/HaoDa/WeChatFunctionForHD.cs

@@ -95,7 +95,13 @@ namespace MySystem
             if (info.SubjectType == "SUBJECT_TYPE_SMALL")
             {
                 Dictionary<string, object> assist_prove_info = new Dictionary<string, object>();
-                assist_prove_info.Add("micro_biz_type", "MICRO_TYPE_STORE"); //小微经营类型
+                string micro_biz_type = "MICRO_TYPE_STORE";
+                var placeType = info.PlaceType; // 小微商户经营场所类型(0 固定场所-MICRO_TYPE_STORE 1 流动动摊贩-MICRO_TYPE_MOBILE)
+                if (placeType == 1)
+                {
+                    micro_biz_type = "MICRO_TYPE_MOBILE";
+                }
+                assist_prove_info.Add("micro_biz_type", micro_biz_type); //小微经营类型
                 assist_prove_info.Add("store_name", info.BizStoreName); //门店名称
                 assist_prove_info.Add("store_address_code", info.AreaNo); //门店省市编码
                 assist_prove_info.Add("store_address", info.BizStoreAddress); //门店地址