Procházet zdrojové kódy

子商户继承主商户号

lcl před 3 měsíci
rodič
revize
656e04b383

+ 2 - 0
Models/Main/MerchantAddInfo.cs

@@ -152,5 +152,7 @@ namespace MySystem.Models.Main
         public int BrandId { get; set; }
         public string CybMakerCode { get; set; }
         public string FeeRate { get; set; }
+        public int ParentId { get; set; }
+        public string AgentName { get; set; }
     }
 }

+ 1 - 0
Models/Main/MerchantInfo.cs

@@ -57,5 +57,6 @@ namespace MySystem.Models.Main
         public decimal Longitude { get; set; }
         public int BrandId { get; set; }
         public string CybMakerCode { get; set; }
+        public int ParentId { get; set; }
     }
 }

+ 14 - 0
Models/Main/WebCMSEntities.cs

@@ -5540,6 +5540,12 @@ namespace MySystem.Models.Main
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.AgentName)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("好哒机构")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.AgentProtocol)
                     .HasColumnName("agentProtocol")
                     .HasColumnType("varchar(200)")
@@ -5989,6 +5995,10 @@ namespace MySystem.Models.Main
                     .HasColumnType("bit(1)")
                     .HasDefaultValueSql("b'0'");
 
+                entity.Property(e => e.ParentId)
+                    .HasColumnType("int(11)")
+                    .HasComment("父级ID");
+
                 entity.Property(e => e.PeriodBegin).HasColumnType("datetime");
 
                 entity.Property(e => e.PeriodEnd).HasColumnType("datetime");
@@ -7367,6 +7377,10 @@ namespace MySystem.Models.Main
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.ParentId)
+                    .HasColumnType("int(11)")
+                    .HasComment("父级ID");
+
                 entity.Property(e => e.ParentUserNav)
                     .HasColumnType("varchar(500)")
                     .HasCharSet("utf8")

+ 6 - 0
Util/HaoDa/CheckWeChatSignService.cs

@@ -84,6 +84,12 @@ namespace MySystem
                                 merchant.QueryCount = 2;
 
                                 merchantadd.HdPassDate = DateTime.Parse(dic["data"]["time"].ToString());
+
+                                MerchantAddInfo mainMer = db.MerchantAddInfo.FirstOrDefault(m => m.Id == merchantadd.ParentId);
+                                if(mainMer != null)
+                                {
+                                    merchantadd.StoreNo = mainMer.StoreNo;
+                                }
                             }
                             else
                             {