DuGuYang 1 rok pred
rodič
commit
157e0a018b

+ 39 - 0
Areas/Api/Controllers/Main/MerchantAddInfoController.cs

@@ -179,6 +179,45 @@ namespace MySystem.Areas.Api.Controllers.v1
         #endregion
 
 
+
+        #region 创客-首页-经营范围
+        [Authorize]
+        public JsonResult BusinessScope(string value)
+        {
+            value = DesDecrypt(value);
+            JsonData data = JsonMapper.ToObject(value);
+            List<Dictionary<string, object>> dataList = BusinessScopeDo(value);
+            return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
+        }
+        public List<Dictionary<string, object>> BusinessScopeDo(string value)
+        {
+            JsonData data = JsonMapper.ToObject(value);
+            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
+            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
+            List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
+            Dictionary<string, object> item = new Dictionary<string, object>();
+            var first = maindb.BusinessScopeType.OrderBy(m => m.Id).ToList();
+            foreach (var itemf in first)
+            {
+                item.Add("Id", itemf.Id);
+                item.Add("Name", itemf.KindName);
+                var second = maindb.BusinessScope.Where(m => m.KindId == itemf.Id).OrderBy(m => m.Id).ToList();
+                List<Dictionary<string, object>> sublist = new List<Dictionary<string, object>>();
+                foreach (var items in second)
+                {
+                    Dictionary<string, object> subitem = new Dictionary<string, object>();
+                    subitem.Add("Id", items.Id);
+                    subitem.Add("Name", items.Name);
+                    sublist.Add(subitem);
+                }
+                item.Add("Children", sublist);
+                dataList.Add(item);
+            }
+            return dataList;
+        }
+        #endregion
+
+
         #region 创客-首页-进件选项接口
         [Authorize]
         public JsonResult Options(string value)

+ 23 - 0
Models/Main/BusinessScope.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Main
+{
+    public partial class BusinessScope
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int KindId { get; set; }
+        public string Name { get; set; }
+    }
+}

+ 22 - 0
Models/Main/BusinessScopeType.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Main
+{
+    public partial class BusinessScopeType
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public string KindName { get; set; }
+    }
+}

+ 134 - 0
Models/Main/WebCMSEntities.cs

@@ -36,6 +36,8 @@ namespace MySystem.Models.Main
         public virtual DbSet<BusinessPartner> BusinessPartner { get; set; }
         public virtual DbSet<BusinessPartnerMerchant> BusinessPartnerMerchant { get; set; }
         public virtual DbSet<BusinessPartnerPos> BusinessPartnerPos { get; set; }
+        public virtual DbSet<BusinessScope> BusinessScope { get; set; }
+        public virtual DbSet<BusinessScopeType> BusinessScopeType { get; set; }
         public virtual DbSet<BusinessTradeSummary> BusinessTradeSummary { get; set; }
         public virtual DbSet<Col> Col { get; set; }
         public virtual DbSet<ConsumerOpenIds> ConsumerOpenIds { get; set; }
@@ -1811,6 +1813,138 @@ namespace MySystem.Models.Main
                 entity.Property(e => e.Version).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<BusinessScope>(entity =>
+            {
+                entity.HasComment("经营范围");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("创建人")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.KindId)
+                    .HasColumnType("int(11)")
+                    .HasComment("所属分类");
+
+                entity.Property(e => e.Name)
+                    .HasColumnType("varchar(100)")
+                    .HasComment("经营范围名称")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount)
+                    .HasColumnType("int(11)")
+                    .HasComment("点击量");
+
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .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.UpdateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("更新人")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version)
+                    .HasColumnType("int(11)")
+                    .HasComment("版本号");
+            });
+
+            modelBuilder.Entity<BusinessScopeType>(entity =>
+            {
+                entity.HasComment("经营范围分类");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("创建人")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.KindName)
+                    .HasColumnType("varchar(100)")
+                    .HasComment("分类名称")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount)
+                    .HasColumnType("int(11)")
+                    .HasComment("点击量");
+
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .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.UpdateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("更新人")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version)
+                    .HasColumnType("int(11)")
+                    .HasComment("版本号");
+            });
+
             modelBuilder.Entity<BusinessTradeSummary>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");