Эх сурвалжийг харах

相关功能重构完成,待测试

DuGuYang 1 жил өмнө
parent
commit
12183b0d12
100 өөрчлөгдсөн 11322 нэмэгдсэн , 38 устгасан
  1. BIN
      .DS_Store
  2. 93 0
      Areas/Api/Controllers/v1/PreSendStockDetailController.cs
  3. 106 0
      Areas/Api/Controllers/v1/StoreStockChangeController.cs
  4. 3 0
      Config/Base.cs
  5. BIN
      DLL/MySystemLib.dll
  6. 20 0
      Models/Main/ChangeTypes.cs
  7. 21 0
      Models/Main/ExportExcels.cs
  8. 26 0
      Models/Main/LeaderCompAddTrade.cs
  9. 26 0
      Models/Main/LeaderCompAddTradeBak.cs
  10. 30 0
      Models/Main/LeaderCompPrize.cs
  11. 30 0
      Models/Main/LeaderCompPrizeBak.cs
  12. 13 0
      Models/Main/LeaderCompTmp.cs
  13. 13 0
      Models/Main/LeaderCompTmpBak.cs
  14. 31 0
      Models/Main/LeaderCompTradeStat.cs
  15. 31 0
      Models/Main/LeaderCompTradeStatBak.cs
  16. 25 0
      Models/Main/LeaderReconRecord.cs
  17. 2 0
      Models/Main/Leaders.cs
  18. 23 0
      Models/Main/MsgAlertUserList.cs
  19. 1 0
      Models/Main/PosCoupons.cs
  20. 1 0
      Models/Main/ProductNorm.cs
  21. 5 0
      Models/Main/Products.cs
  22. 2 0
      Models/Main/SchoolMorningMeet.cs
  23. 2 0
      Models/Main/SetMerchantTypeRecord.cs
  24. 1 0
      Models/Main/UserAccountRecord.cs
  25. 42 0
      Models/Main/UserCashRecordForBusiness.cs
  26. 892 38
      Models/Main/WebCMSEntities.cs
  27. 25 0
      Models/Operate/ActMerDaySummary.cs
  28. 25 0
      Models/Operate/ActMerMonthSummary.cs
  29. 26 0
      Models/Operate/Advertisment.cs
  30. 27 0
      Models/Operate/AmountRecord.cs
  31. 30 0
      Models/Operate/Col.cs
  32. 26 0
      Models/Operate/MachineApplyOpRecord.cs
  33. 11 0
      Models/Operate/MenuRight.cs
  34. 28 0
      Models/Operate/MsgBlackList.cs
  35. 34 0
      Models/Operate/MsgPersonal.cs
  36. 37 0
      Models/Operate/MsgPlacard.cs
  37. 25 0
      Models/Operate/MsgPlacardRead.cs
  38. 31 0
      Models/Operate/MsgPush.cs
  39. 38 0
      Models/Operate/MsgSms.cs
  40. 27 0
      Models/Operate/MsgSmsSet.cs
  41. 29 0
      Models/Operate/MsgTemplate.cs
  42. 11 0
      Models/Operate/OperateForCode.cs
  43. 26 0
      Models/Operate/OperateLog.cs
  44. 23 0
      Models/Operate/OperateRightList.cs
  45. 24 0
      Models/Operate/PageInfo.cs
  46. 25 0
      Models/Operate/PosCouponDaySummary.cs
  47. 24 0
      Models/Operate/PosCouponForOp.cs
  48. 25 0
      Models/Operate/PosCouponMonthSummary.cs
  49. 31 0
      Models/Operate/PosCouponOrders.cs
  50. 26 0
      Models/Operate/PosCouponRecord.cs
  51. 23 0
      Models/Operate/PosCoupons.cs
  52. 24 0
      Models/Operate/PosMachines.cs
  53. 45 0
      Models/Operate/PublicAccountSet.cs
  54. 19 0
      Models/Operate/RightDic.cs
  55. 25 0
      Models/Operate/SendDaySummary.cs
  56. 25 0
      Models/Operate/SendMonthSummary.cs
  57. 25 0
      Models/Operate/StoreActMerDaySummary.cs
  58. 25 0
      Models/Operate/StoreActMerMonthSummary.cs
  59. 23 0
      Models/Operate/StoreForOperate.cs
  60. 30 0
      Models/Operate/StoreMachineApply.cs
  61. 25 0
      Models/Operate/StoreSendDaySummary.cs
  62. 25 0
      Models/Operate/StoreSendMonthSummary.cs
  63. 35 0
      Models/Operate/SysAdmin.cs
  64. 24 0
      Models/Operate/SysAdminRole.cs
  65. 13 0
      Models/Operate/SysLog.cs
  66. 41 0
      Models/Operate/SystemSet.cs
  67. 26 0
      Models/Operate/UploadParams.cs
  68. 32 0
      Models/Operate/UserAccount.cs
  69. 33 0
      Models/Operate/UserAccountRecord.cs
  70. 42 0
      Models/Operate/UserCashRecord.cs
  71. 2969 0
      Models/Operate/WebCMSEntities.cs
  72. BIN
      Service/.DS_Store
  73. 198 0
      Service/Bs/AdvertismentService.cs
  74. 206 0
      Service/Bs/ColService.cs
  75. 200 0
      Service/Bs/MsgBlackListService.cs
  76. 214 0
      Service/Bs/MsgPersonalService.cs
  77. 198 0
      Service/Bs/MsgPlacardReadService.cs
  78. 216 0
      Service/Bs/MsgPlacardService.cs
  79. 224 0
      Service/Bs/MsgPushService.cs
  80. 210 0
      Service/Bs/MsgSmsService.cs
  81. 246 0
      Service/Bs/MsgSmsSetService.cs
  82. 216 0
      Service/Bs/MsgTemplateService.cs
  83. 198 0
      Service/Bs/OperateLogService.cs
  84. 196 0
      Service/Bs/OperateRightListService.cs
  85. 196 0
      Service/Bs/PageInfoService.cs
  86. 146 0
      Service/Bs/RefreshTokensNewService.cs
  87. 146 0
      Service/Bs/RefreshTokensService.cs
  88. 207 0
      Service/Bs/SysAdminNewService.cs
  89. 210 0
      Service/Bs/SysAdminRoleNewService.cs
  90. 210 0
      Service/Bs/SysAdminRoleService.cs
  91. 207 0
      Service/Bs/SysAdminService.cs
  92. 244 0
      Service/Bs/SystemSetService.cs
  93. 202 0
      Service/Bs/UploadParamsService.cs
  94. 216 0
      Service/Main/ActiveRewardService.cs
  95. 202 0
      Service/Main/ActivityEnrolRecordService.cs
  96. 210 0
      Service/Main/ActivityInfoService.cs
  97. 206 0
      Service/Main/ActivityPrizeDetailService.cs
  98. 198 0
      Service/Main/ActivityRedPackageJoinsService.cs
  99. 198 0
      Service/Main/ActivityRedPackageStockService.cs
  100. 200 0
      Service/Main/ActivityRedPackageTop10Service.cs

BIN
.DS_Store


+ 93 - 0
Areas/Api/Controllers/v1/PreSendStockDetailController.cs

@@ -0,0 +1,93 @@
+using System;
+using System.Web;
+using System.Collections.Generic;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Http;
+using MySystem.Models.Main;
+using Library;
+using System.Linq;
+using LitJson;
+using Microsoft.AspNetCore.Authorization;
+using MySystem.Service.Main;
+
+namespace MySystem.Areas.Api.Controllers.v1
+{
+    [Area("Api")]
+    [Route("Api/v1/[controller]/[action]")]
+    public class PreSendStockDetailController : BaseController
+    {
+        public PreSendStockDetailController(IHttpContextAccessor accessor) : base(accessor)
+        {
+        }
+
+        #region 创客-首页-仓库管理-小分仓-确认发货
+        /// <summary>
+        /// 创客-首页-仓库管理-小分仓-确认发货
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        [Authorize]
+        [Route("/main/presendstockdetail/send")]
+        public JsonResult Send(string value)
+        {
+            value = PublicFunction.DesDecrypt(value);
+            JsonData data = JsonMapper.ToObject(value);
+            int UserId = int.Parse(function.CheckInt(data["UserId"].ToString())); //发货人Id
+            int ToUserId = int.Parse(function.CheckInt(data["ToUserId"].ToString())); //收货人Id
+            int FromStoreId = int.Parse(function.CheckInt(data["FromStoreId"].ToString())); //出货仓库Id
+            int BrandId = int.Parse(function.CheckInt(data["BrandId"].ToString())); //产品类型Id
+            string SnIds = data["SnIds"].ToString(); //机具Id
+
+            if (ToUserId <= 0)
+            {
+                return Json(new AppResultJson() { Status = "-1", Info = "收货创客不存在,请检查收货创客编号是否正确" });
+            }
+
+            var info = PreSendStockDetailUtil.SendDo(UserId, ToUserId, FromStoreId, BrandId, SnIds);
+            if (info == "success")
+            {
+                return Json(new AppResultJson() { Status = "1", Info = "发货成功", Data = "" });
+            }
+            else
+            {
+                return Json(new AppResultJson() { Status = "-1", Info = "发货失败", Data = info });
+            }
+        }
+
+        #endregion
+
+
+        #region 创客-首页-仓库管理-小分仓-撤回
+        /// <summary>
+        /// 创客-首页-仓库管理-小分仓-撤回
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        [Authorize]
+        [Route("/main/presendstockdetail/cancel")]
+        public JsonResult Cancel(string value)
+        {
+            value = PublicFunction.DesDecrypt(value);
+            JsonData data = JsonMapper.ToObject(value);
+            int UserId = int.Parse(function.CheckInt(data["UserId"].ToString())); //发货人Id
+            int Id = int.Parse(function.CheckInt(data["Id"].ToString())); //记录Id
+
+            string check = RedisDbconn.Instance.Get<string>("SmallStoreCancel:" + UserId);
+            if (!string.IsNullOrEmpty(check))
+            {
+                return Json(new AppResultJson() { Status = "-1", Info = "请勿频繁操作,稍后再试" });
+            }
+            var info = PreSendStockDetailUtil.CancelDo(UserId, Id);
+            if (info == "success")
+            {
+                return Json(new AppResultJson() { Status = "1", Info = "撤回成功", Data = "" });
+            }
+            else
+            {
+                return Json(new AppResultJson() { Status = "-1", Info = "撤回失败", Data = info });
+            }
+        }
+
+        #endregion
+    }
+}

+ 106 - 0
Areas/Api/Controllers/v1/StoreStockChangeController.cs

@@ -0,0 +1,106 @@
+using System;
+using System.Web;
+using System.Collections.Generic;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Http;
+using MySystem.Models.Main;
+using Library;
+using System.Linq;
+using LitJson;
+using Microsoft.AspNetCore.Authorization;
+using MySystem.Service.Main;
+
+namespace MySystem.Areas.Api.Controllers.v1
+{
+    [Area("Api")]
+    [Route("Api/v1/[controller]/[action]")]
+    public class StoreStockChangeController : BaseController
+    {
+        public StoreStockChangeController(IHttpContextAccessor accessor) : base(accessor)
+        {
+        }
+
+        #region 首页-仓库管理-整箱划拨
+        /// <summary>
+        /// 首页-仓库管理-整箱划拨
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        [Authorize]
+        [Route("/main/storestockchange/transferwholeorone")]
+        public JsonResult TransferWholeOrOne(string value)
+        {
+            value = PublicFunction.DesDecrypt(value);
+            JsonData data = JsonMapper.ToObject(value);
+            int OrderId = int.Parse(function.CheckInt(data["OrderId"].ToString())); //订单Id
+            int StoreId = int.Parse(function.CheckInt(data["StoreId"].ToString())); //仓库
+            int ToUserId = int.Parse(function.CheckInt(data["ToUserId"].ToString())); //收货人
+            string SnIds = data["SnIds"].ToString(); //机具SN的Id集合
+
+            var info = StoreStockChangeUtil.TransferWholeOrOneDo(OrderId, StoreId, ToUserId, SnIds);
+            if (info == "success")
+            {
+                return Json(new AppResultJson() { Status = "1", Info = "划拨成功", Data = "" });
+            }
+            else
+            {
+                return Json(new AppResultJson() { Status = "-1", Info = "划拨失败", Data = info });
+            }
+        }
+
+        #endregion
+
+
+        // #region 首页-仓库管理-逐台划拨
+        // /// <summary>
+        // /// 首页-仓库管理-逐台划拨
+        // /// </summary>
+        // /// <returns></returns>
+        // [HttpPost]
+        // [Authorize]
+        // [Route("/main/storestockchange/transferone")]
+        // public JsonResult TransferOne(string value)
+        // {
+        //     value = PublicFunction.DesDecrypt(value);
+        //     JsonData data = JsonMapper.ToObject(value);
+        //     int OrderId = int.Parse(function.CheckInt(data["OrderId"].ToString())); //订单Id
+        //     int StoreId = int.Parse(function.CheckInt(data["StoreId"].ToString())); //仓库
+        //     int ToUserId = int.Parse(function.CheckInt(data["ToUserId"].ToString())); //收货人
+        //     string SnIds = data["SnIds"].ToString(); //机具SN的Id集合
+
+        //     return Json(new AppResultJson() { Status = "1", Info = "", Data = "" });
+        // }
+
+        // #endregion
+
+
+        #region 首页-仓库管理-售后单划拨
+        /// <summary>
+        /// 首页-仓库管理-售后单划拨
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        [Authorize]
+        [Route("/main/storestockchange/transferforchange")]
+        public JsonResult TransferForChange(string value)
+        {
+            value = PublicFunction.DesDecrypt(value);
+            JsonData data = JsonMapper.ToObject(value);
+            int OrderId = int.Parse(function.CheckInt(data["OrderId"].ToString())); //订单Id
+            int StoreId = int.Parse(function.CheckInt(data["StoreId"].ToString())); //仓库
+            string SnIds = data["SnIds"].ToString(); //机具SN的Id集合
+
+            var info = StoreStockChangeUtil.TransferForChangeDo(OrderId, StoreId, SnIds);
+            if (info == "success")
+            {
+                return Json(new AppResultJson() { Status = "1", Info = "划拨成功", Data = "" });
+            }
+            else
+            {
+                return Json(new AppResultJson() { Status = "-1", Info = "划拨失败", Data = info });
+            }
+        }
+
+        #endregion
+    }
+}

+ 3 - 0
Config/Base.cs

@@ -6,6 +6,8 @@ namespace AppConfig
     public class Base
     {
         public static string ApiKey = "G6H7@J8%";
+        public static string OpSqlConnStr = ConfigurationManager.AppSettings["OpSqlConnStr"].ToString();
+        public static string SqlConnStr = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
         public static string Host = Library.ConfigurationManager.AppSettings["Host"].ToString();
         public static string Database = Library.ConfigurationManager.AppSettings["Database"].ToString();
         public static string defaultImage = Library.ConfigurationManager.AppSettings["Host"].ToString() + "/skin/app/default/static/images/default.jpg";
@@ -13,6 +15,7 @@ namespace AppConfig
         public static Dictionary<string, Dictionary<string, string>> dbTables = new Dictionary<string, Dictionary<string, string>>();
         public static Dictionary<string, Dictionary<string, string>> mainTables = new Dictionary<string, Dictionary<string, string>>();
         public static Dictionary<string, Dictionary<string, string>> rdsMainTables = new Dictionary<string, Dictionary<string, string>>();
+        public static Dictionary<string, Dictionary<string, string>> opTables = new Dictionary<string, Dictionary<string, string>>();
 
         #endregion
     }

BIN
DLL/MySystemLib.dll


+ 20 - 0
Models/Main/ChangeTypes.cs

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

+ 21 - 0
Models/Main/ExportExcels.cs

@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Main
+{
+    public partial class ExportExcels
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public string FileName { get; set; }
+        public int SysId { get; set; }
+        public string FileUrl { get; set; }
+    }
+}

+ 26 - 0
Models/Main/LeaderCompAddTrade.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Main
+{
+    public partial class LeaderCompAddTrade
+    {
+        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 ParentNav { get; set; }
+        public int ParentUserId { get; set; }
+        public decimal AddTradeAmount { get; set; }
+        public int UserId { get; set; }
+        public string StatMonth { get; set; }
+    }
+}

+ 26 - 0
Models/Main/LeaderCompAddTradeBak.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Main
+{
+    public partial class LeaderCompAddTradeBak
+    {
+        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 ParentNav { get; set; }
+        public int ParentUserId { get; set; }
+        public decimal AddTradeAmount { get; set; }
+        public int UserId { get; set; }
+        public string StatMonth { get; set; }
+    }
+}

+ 30 - 0
Models/Main/LeaderCompPrize.cs

@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Main
+{
+    public partial class LeaderCompPrize
+    {
+        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 ParentNav { get; set; }
+        public int ParentUserId { get; set; }
+        public decimal CompPrize { get; set; }
+        public ulong IsComp { get; set; }
+        public int SecDirectCount { get; set; }
+        public int NotDirectCount { get; set; }
+        public int DirectCount { get; set; }
+        public int UserId { get; set; }
+        public string StatMonth { get; set; }
+    }
+}

+ 30 - 0
Models/Main/LeaderCompPrizeBak.cs

@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Main
+{
+    public partial class LeaderCompPrizeBak
+    {
+        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 ParentNav { get; set; }
+        public int ParentUserId { get; set; }
+        public decimal CompPrize { get; set; }
+        public ulong IsComp { get; set; }
+        public int SecDirectCount { get; set; }
+        public int NotDirectCount { get; set; }
+        public int DirectCount { get; set; }
+        public int UserId { get; set; }
+        public string StatMonth { get; set; }
+    }
+}

+ 13 - 0
Models/Main/LeaderCompTmp.cs

@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Main
+{
+    public partial class LeaderCompTmp
+    {
+        public int Id { get; set; }
+        public string EveryMonthData { get; set; }
+        public string ParentNav { get; set; }
+        public int ParentUserId { get; set; }
+    }
+}

+ 13 - 0
Models/Main/LeaderCompTmpBak.cs

@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Main
+{
+    public partial class LeaderCompTmpBak
+    {
+        public int Id { get; set; }
+        public string ParentNav { get; set; }
+        public int ParentUserId { get; set; }
+        public string EveryMonthData { get; set; }
+    }
+}

+ 31 - 0
Models/Main/LeaderCompTradeStat.cs

@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Main
+{
+    public partial class LeaderCompTradeStat
+    {
+        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 decimal ResultTradeAmount { get; set; }
+        public decimal TradeAmount { get; set; }
+        public decimal CheckTradeAmount { get; set; }
+        public string ParentNav { get; set; }
+        public int ParentUserId { get; set; }
+        public int UserId { get; set; }
+        public string StatMonth { get; set; }
+        public decimal SelfResultTradeAmount { get; set; }
+        public decimal SelfTradeAmount { get; set; }
+        public decimal CheckSelfTradeAmount { get; set; }
+    }
+}

+ 31 - 0
Models/Main/LeaderCompTradeStatBak.cs

@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Main
+{
+    public partial class LeaderCompTradeStatBak
+    {
+        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 decimal SelfResultTradeAmount { get; set; }
+        public decimal SelfTradeAmount { get; set; }
+        public decimal CheckSelfTradeAmount { get; set; }
+        public decimal ResultTradeAmount { get; set; }
+        public decimal TradeAmount { get; set; }
+        public decimal CheckTradeAmount { get; set; }
+        public string ParentNav { get; set; }
+        public int ParentUserId { get; set; }
+        public int UserId { get; set; }
+        public string StatMonth { get; set; }
+    }
+}

+ 25 - 0
Models/Main/LeaderReconRecord.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Main
+{
+    public partial class LeaderReconRecord
+    {
+        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 decimal BalanceAmount { get; set; }
+        public decimal ReserveAmount { get; set; }
+        public string StatMonth { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 2 - 0
Models/Main/Leaders.cs

@@ -16,5 +16,7 @@ namespace MySystem.Models.Main
         public string SeoDescription { get; set; }
         public int LeaderLevel { get; set; }
         public int UserId { get; set; }
+        public DateTime? ExpiredDate { get; set; }
+        public DateTime? LastBuyDate { get; set; }
     }
 }

+ 23 - 0
Models/Main/MsgAlertUserList.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Main
+{
+    public partial class MsgAlertUserList
+    {
+        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 MsgId { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 1 - 0
Models/Main/PosCoupons.cs

@@ -24,5 +24,6 @@ namespace MySystem.Models.Main
         public int HelpProfitStatus { get; set; }
         public ulong HelpProfitFlag { get; set; }
         public int OpId { get; set; }
+        public int OrderId { get; set; }
     }
 }

+ 1 - 0
Models/Main/ProductNorm.cs

@@ -30,5 +30,6 @@ namespace MySystem.Models.Main
         public decimal Price { get; set; }
         public string IdList { get; set; }
         public string ColName { get; set; }
+        public int StartBuyCount { get; set; }
     }
 }

+ 5 - 0
Models/Main/Products.cs

@@ -54,5 +54,10 @@ namespace MySystem.Models.Main
         public string Contents { get; set; }
         public string Details { get; set; }
         public string ProductName { get; set; }
+        public int ProductKind { get; set; }
+        public int BannerSort { get; set; }
+        public string BannerPhoto { get; set; }
+        public ulong IsBanner { get; set; }
+        public int StartBuyCount { get; set; }
     }
 }

+ 2 - 0
Models/Main/SchoolMorningMeet.cs

@@ -23,5 +23,7 @@ namespace MySystem.Models.Main
         public string Photo { get; set; }
         public string Lecturer { get; set; }
         public string Title { get; set; }
+        public ulong IsBanner { get; set; }
+        public string BannerPhoto { get; set; }
     }
 }

+ 2 - 0
Models/Main/SetMerchantTypeRecord.cs

@@ -26,5 +26,7 @@ namespace MySystem.Models.Main
         public string Note { get; set; }
         public int ToUserId { get; set; }
         public int FromUserId { get; set; }
+        public int OperateType { get; set; }
+        public int BuyUserId { get; set; }
     }
 }

+ 1 - 0
Models/Main/UserAccountRecord.cs

@@ -29,5 +29,6 @@ namespace MySystem.Models.Main
         public int ProductType { get; set; }
         public int ChangeType { get; set; }
         public int UserId { get; set; }
+        public int Kind { get; set; }
     }
 }

+ 42 - 0
Models/Main/UserCashRecordForBusiness.cs

@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Main
+{
+    public partial class UserCashRecordForBusiness
+    {
+        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 Remark { get; set; }
+        public string MediaSource { get; set; }
+        public string Ip { get; set; }
+        public DateTime? PaymentDate { get; set; }
+        public string ReturnMsg { get; set; }
+        public string ReturnCode { get; set; }
+        public string ResData { get; set; }
+        public string ReqData { get; set; }
+        public decimal ManageFee { get; set; }
+        public decimal TradeFee { get; set; }
+        public decimal ActualTradeAmount { get; set; }
+        public decimal TradeAmount { get; set; }
+        public string ChanelName { get; set; }
+        public string ChannelCode { get; set; }
+        public string PayTradeNo { get; set; }
+        public int TradeType { get; set; }
+        public string SettleBankName { get; set; }
+        public string SettleBankCardNo { get; set; }
+        public string IdCardNo { get; set; }
+        public int UserId { get; set; }
+        public string CashOrderNo { get; set; }
+    }
+}

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 892 - 38
Models/Main/WebCMSEntities.cs


+ 25 - 0
Models/Operate/ActMerDaySummary.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class ActMerDaySummary
+    {
+        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 ActCount { get; set; }
+        public int BrandId { get; set; }
+        public string TradeDate { get; set; }
+        public int OpId { get; set; }
+    }
+}

+ 25 - 0
Models/Operate/ActMerMonthSummary.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class ActMerMonthSummary
+    {
+        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 ActCount { get; set; }
+        public int BrandId { get; set; }
+        public string TradeMonth { get; set; }
+        public int OpId { get; set; }
+    }
+}

+ 26 - 0
Models/Operate/Advertisment.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class Advertisment
+    {
+        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 Url { get; set; }
+        public string Contents { get; set; }
+        public string PicPath { get; set; }
+        public string ColId { get; set; }
+        public string Title { get; set; }
+    }
+}

+ 27 - 0
Models/Operate/AmountRecord.cs

@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class AmountRecord
+    {
+        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 OperateType { get; set; }
+        public decimal AfterAmount { get; set; }
+        public decimal BeforeAmount { get; set; }
+        public decimal UseAmount { get; set; }
+        public int ApplyId { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 30 - 0
Models/Operate/Col.cs

@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class Col
+    {
+        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 ParentId { get; set; }
+        public string Url { get; set; }
+        public string Contents { get; set; }
+        public string ColEnName { get; set; }
+        public ulong Recommend { get; set; }
+        public string ColDetail { get; set; }
+        public string ColPicPath { get; set; }
+        public string ColName { get; set; }
+        public string ColId { get; set; }
+    }
+}

+ 26 - 0
Models/Operate/MachineApplyOpRecord.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class MachineApplyOpRecord
+    {
+        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 OpType { get; set; }
+        public string TargetSn { get; set; }
+        public string SourceSn { get; set; }
+        public int ApplyId { get; set; }
+        public int OpId { get; set; }
+    }
+}

+ 11 - 0
Models/Operate/MenuRight.cs

@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class MenuRight
+    {
+        public string MenuId { get; set; }
+        public string Name { get; set; }
+    }
+}

+ 28 - 0
Models/Operate/MsgBlackList.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class MsgBlackList
+    {
+        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 Extend { get; set; }
+        public string Remark { get; set; }
+        public string Reason { get; set; }
+        public string Ip { get; set; }
+        public string Mobile { get; set; }
+        public int TemplateId { get; set; }
+        public string ColId { get; set; }
+    }
+}

+ 34 - 0
Models/Operate/MsgPersonal.cs

@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class MsgPersonal
+    {
+        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 Remark { get; set; }
+        public string ExtendColumn { get; set; }
+        public string PushParam { get; set; }
+        public ulong ReadFlag { get; set; }
+        public int PushFlag { get; set; }
+        public string Summary { get; set; }
+        public string Url { get; set; }
+        public string Content { get; set; }
+        public string Title { get; set; }
+        public string BgPic { get; set; }
+        public int MsgType { get; set; }
+        public int UserId { get; set; }
+        public int TemplateId { get; set; }
+    }
+}

+ 37 - 0
Models/Operate/MsgPlacard.cs

@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class MsgPlacard
+    {
+        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 Url { get; set; }
+        public string Remark { get; set; }
+        public string ExtendColumn { get; set; }
+        public DateTime? PushTime { get; set; }
+        public string PushParam { get; set; }
+        public int PushFlag { get; set; }
+        public int PushType { get; set; }
+        public string BgPic { get; set; }
+        public DateTime? EffectEndDate { get; set; }
+        public DateTime? EffectStartDate { get; set; }
+        public int ShowType { get; set; }
+        public ulong IsTop { get; set; }
+        public string Content { get; set; }
+        public string Summary { get; set; }
+        public string Title { get; set; }
+        public int MsgType { get; set; }
+    }
+}

+ 25 - 0
Models/Operate/MsgPlacardRead.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class MsgPlacardRead
+    {
+        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 Remark { get; set; }
+        public ulong ReadFlag { get; set; }
+        public string UserId { get; set; }
+        public int PlacardId { get; set; }
+    }
+}

+ 31 - 0
Models/Operate/MsgPush.cs

@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class MsgPush
+    {
+        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 Mobiles { get; set; }
+        public string MessageId { get; set; }
+        public DateTime? AutoPushDate { get; set; }
+        public int TemplateId { get; set; }
+        public string Devices { get; set; }
+        public ulong IsSilent { get; set; }
+        public string Details { get; set; }
+        public string Title { get; set; }
+        public string Url { get; set; }
+        public string ClientType { get; set; }
+    }
+}

+ 38 - 0
Models/Operate/MsgSms.cs

@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class MsgSms
+    {
+        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 SendStatus { get; set; }
+        public string Kind { get; set; }
+        public int Code { get; set; }
+        public int VerifyStatus { get; set; }
+        public int ErrorNum { get; set; }
+        public string VerifyCode { get; set; }
+        public string RespCode { get; set; }
+        public string RespContent { get; set; }
+        public DateTime? SendTime { get; set; }
+        public string SignName { get; set; }
+        public string Content { get; set; }
+        public int SmsType { get; set; }
+        public int SendType { get; set; }
+        public string Ip { get; set; }
+        public string Mobile { get; set; }
+        public int TemplateId { get; set; }
+        public string ColId { get; set; }
+    }
+}

+ 27 - 0
Models/Operate/MsgSmsSet.cs

@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class MsgSmsSet
+    {
+        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 Params { get; set; }
+        public string ReqUrl { get; set; }
+        public int SmsType { get; set; }
+        public string AuthPwd { get; set; }
+        public string UserName { get; set; }
+        public string Name { get; set; }
+    }
+}

+ 29 - 0
Models/Operate/MsgTemplate.cs

@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class MsgTemplate
+    {
+        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 SignName { get; set; }
+        public string Extend { get; set; }
+        public string Remark { get; set; }
+        public int MsgType { get; set; }
+        public int TemplateType { get; set; }
+        public string ColId { get; set; }
+        public string Content { get; set; }
+        public string Title { get; set; }
+    }
+}

+ 11 - 0
Models/Operate/OperateForCode.cs

@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class OperateForCode
+    {
+        public string OpCode { get; set; }
+        public int OpId { get; set; }
+    }
+}

+ 26 - 0
Models/Operate/OperateLog.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class OperateLog
+    {
+        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 OpMode { get; set; }
+        public string AfterOperate { get; set; }
+        public string BeforeOperate { get; set; }
+        public string OperateMan { get; set; }
+        public string TableEnName { get; set; }
+    }
+}

+ 23 - 0
Models/Operate/OperateRightList.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class OperateRightList
+    {
+        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 EnName { get; set; }
+        public string Name { get; set; }
+    }
+}

+ 24 - 0
Models/Operate/PageInfo.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class PageInfo
+    {
+        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 Contents { get; set; }
+        public string ColId { get; set; }
+        public string Title { get; set; }
+    }
+}

+ 25 - 0
Models/Operate/PosCouponDaySummary.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class PosCouponDaySummary
+    {
+        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 SaleCount { get; set; }
+        public int BrandId { get; set; }
+        public string TradeDate { get; set; }
+        public int OpId { get; set; }
+    }
+}

+ 24 - 0
Models/Operate/PosCouponForOp.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class PosCouponForOp
+    {
+        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 OutNum { get; set; }
+        public int TotalNum { get; set; }
+        public int StockNum { get; set; }
+    }
+}

+ 25 - 0
Models/Operate/PosCouponMonthSummary.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class PosCouponMonthSummary
+    {
+        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 SaleCount { get; set; }
+        public int BrandId { get; set; }
+        public string TradeMonth { get; set; }
+        public int OpId { get; set; }
+    }
+}

+ 31 - 0
Models/Operate/PosCouponOrders.cs

@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class PosCouponOrders
+    {
+        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 ChangeKind { get; set; }
+        public int ChangeCount { get; set; }
+        public int AfterOut { get; set; }
+        public int AfterTotal { get; set; }
+        public int AfterStock { get; set; }
+        public int BeforeOut { get; set; }
+        public int BeforeTotal { get; set; }
+        public int BeforeStock { get; set; }
+        public string OrderNo { get; set; }
+        public int OpId { get; set; }
+    }
+}

+ 26 - 0
Models/Operate/PosCouponRecord.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class PosCouponRecord
+    {
+        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 ChangeKind { get; set; }
+        public string OrderNo { get; set; }
+        public int ToUserId { get; set; }
+        public int FromUserId { get; set; }
+        public int PosCouponId { get; set; }
+    }
+}

+ 23 - 0
Models/Operate/PosCoupons.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class PosCoupons
+    {
+        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 PosCouponId { get; set; }
+        public int OpId { get; set; }
+    }
+}

+ 24 - 0
Models/Operate/PosMachines.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class PosMachines
+    {
+        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 BrandId { get; set; }
+        public int PosId { get; set; }
+        public int OpId { get; set; }
+    }
+}

+ 45 - 0
Models/Operate/PublicAccountSet.cs

@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class PublicAccountSet
+    {
+        public int Id { get; set; }
+        public string AliyunAndroidActivity { get; set; }
+        public string AliyunAndroidNotifyTitle { get; set; }
+        public string AliyunRegionId { get; set; }
+        public string SmsApiDefaultTemplate { get; set; }
+        public string SmsApiUserId { get; set; }
+        public string SmsApiSign { get; set; }
+        public string SmsApiPwd { get; set; }
+        public string ErpAppCode { get; set; }
+        public string ErpApiUrl { get; set; }
+        public string MeiQiaAppKey { get; set; }
+        public string MobAppSecret { get; set; }
+        public string MobAppKey { get; set; }
+        public string AliyunPushIosAppSecret { get; set; }
+        public string AliyunPushIosAppId { get; set; }
+        public string AliyunPushAndroidAppSecret { get; set; }
+        public string AliyunPushAndroidAppId { get; set; }
+        public string AliyunAccessKeySecret { get; set; }
+        public string AliyunAccessKeyId { get; set; }
+        public string QqIosAppKey { get; set; }
+        public string QqIosAppId { get; set; }
+        public string QqAndroidAppKey { get; set; }
+        public string QqAndroidAppId { get; set; }
+        public string WeChatMiniAppSecret { get; set; }
+        public string WeChatMiniAppId { get; set; }
+        public string ServerIp { get; set; }
+        public string WeChatOpenAppSecret { get; set; }
+        public string WeChatOpenAppId { get; set; }
+        public string WeChatPayKey { get; set; }
+        public string WeChatMchId { get; set; }
+        public string WeChatAppSecret { get; set; }
+        public string WeChatAppId { get; set; }
+        public string AlipayPublicKey { get; set; }
+        public string AlipayPrivateKey { get; set; }
+        public string AlipayPartnerId { get; set; }
+        public string AlipayAppId { get; set; }
+    }
+}

+ 19 - 0
Models/Operate/RightDic.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class RightDic
+    {
+        public string Id { get; set; }
+        public string Icon { get; set; }
+        public string Name { get; set; }
+        public string Url { get; set; }
+        public int RightLevel { get; set; }
+        public int Sort { get; set; }
+        public ulong MainMenu { get; set; }
+        public ulong MainStat { get; set; }
+        public ulong MainDataList { get; set; }
+        public string OtherRight { get; set; }
+    }
+}

+ 25 - 0
Models/Operate/SendDaySummary.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class SendDaySummary
+    {
+        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 SendCount { get; set; }
+        public int BrandId { get; set; }
+        public string TradeDate { get; set; }
+        public int OpId { get; set; }
+    }
+}

+ 25 - 0
Models/Operate/SendMonthSummary.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class SendMonthSummary
+    {
+        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 SendCount { get; set; }
+        public int BrandId { get; set; }
+        public string TradeMonth { get; set; }
+        public int OpId { get; set; }
+    }
+}

+ 25 - 0
Models/Operate/StoreActMerDaySummary.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class StoreActMerDaySummary
+    {
+        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 ActCount { get; set; }
+        public int BrandId { get; set; }
+        public string TradeDate { get; set; }
+        public int OpId { get; set; }
+    }
+}

+ 25 - 0
Models/Operate/StoreActMerMonthSummary.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class StoreActMerMonthSummary
+    {
+        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 ActCount { get; set; }
+        public int BrandId { get; set; }
+        public string TradeMonth { get; set; }
+        public int OpId { get; set; }
+    }
+}

+ 23 - 0
Models/Operate/StoreForOperate.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class StoreForOperate
+    {
+        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 StoreId { get; set; }
+        public int OpId { get; set; }
+    }
+}

+ 30 - 0
Models/Operate/StoreMachineApply.cs

@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class StoreMachineApply
+    {
+        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 UserId { get; set; }
+        public string SendSn { get; set; }
+        public string ErpCode { get; set; }
+        public string SendMode { get; set; }
+        public decimal UseAmount { get; set; }
+        public int SendNum { get; set; }
+        public int ApplyNum { get; set; }
+        public string ApplyNo { get; set; }
+        public int BrandId { get; set; }
+    }
+}

+ 25 - 0
Models/Operate/StoreSendDaySummary.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class StoreSendDaySummary
+    {
+        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 SendCount { get; set; }
+        public int BrandId { get; set; }
+        public string TradeDate { get; set; }
+        public int OpId { get; set; }
+    }
+}

+ 25 - 0
Models/Operate/StoreSendMonthSummary.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class StoreSendMonthSummary
+    {
+        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 SendCount { get; set; }
+        public int BrandId { get; set; }
+        public string TradeMonth { get; set; }
+        public int OpId { get; set; }
+    }
+}

+ 35 - 0
Models/Operate/SysAdmin.cs

@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class SysAdmin
+    {
+        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 TotalMachineCount { get; set; }
+        public string HeadPhoto { get; set; }
+        public string OpCode { get; set; }
+        public int StoreCount { get; set; }
+        public string FilePath { get; set; }
+        public string MakerMobile { get; set; }
+        public string MakerName { get; set; }
+        public string MakerCode { get; set; }
+        public int UserId { get; set; }
+        public DateTime? LastLoginDate { get; set; }
+        public string Role { get; set; }
+        public string RealName { get; set; }
+        public string Password { get; set; }
+        public string AdminName { get; set; }
+    }
+}

+ 24 - 0
Models/Operate/SysAdminRole.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class SysAdminRole
+    {
+        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 RightInfo { get; set; }
+        public string Details { get; set; }
+        public string Name { get; set; }
+    }
+}

+ 13 - 0
Models/Operate/SysLog.cs

@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class SysLog
+    {
+        public int Id { get; set; }
+        public string Contents { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public string CreateMan { get; set; }
+    }
+}

+ 41 - 0
Models/Operate/SystemSet.cs

@@ -0,0 +1,41 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class SystemSet
+    {
+        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 StartAdPhoto { get; set; }
+        public int UploadAutoZoomQuality { get; set; }
+        public ulong UploadOss { get; set; }
+        public string Logo { get; set; }
+        public string WebStatCode { get; set; }
+        public string Phone { get; set; }
+        public string Address { get; set; }
+        public string RightInfo { get; set; }
+        public string UploadWaterPath { get; set; }
+        public string UploadWaterPosition { get; set; }
+        public ulong UploadAutoWater { get; set; }
+        public int UploadAutoZoomHeight { get; set; }
+        public int UploadAutoZoomWidth { get; set; }
+        public ulong UploadAutoZoom { get; set; }
+        public int UploadMaxSize { get; set; }
+        public string UploadExt { get; set; }
+        public string IndexDescription { get; set; }
+        public string IndexKeyword { get; set; }
+        public string WebName { get; set; }
+        public string WebUrl { get; set; }
+    }
+}

+ 26 - 0
Models/Operate/UploadParams.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class UploadParams
+    {
+        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 TableEnName { get; set; }
+        public string ParamString { get; set; }
+        public string ColumnEnName { get; set; }
+        public string ColumnName { get; set; }
+        public string TableName { get; set; }
+    }
+}

+ 32 - 0
Models/Operate/UserAccount.cs

@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class UserAccount
+    {
+        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 decimal ValidForGetAmount { get; set; }
+        public decimal PosCouponApplyAmount { get; set; }
+        public decimal WithdrawingAmount { get; set; }
+        public decimal ValidAmount { get; set; }
+        public decimal TotalAmt { get; set; }
+        public decimal WithdrawAmount { get; set; }
+        public int AccountStatus { get; set; }
+        public decimal BalanceAmount { get; set; }
+        public decimal FreezeAmount { get; set; }
+        public decimal TotalAmount { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 33 - 0
Models/Operate/UserAccountRecord.cs

@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class UserAccountRecord
+    {
+        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 TransRecordNo { get; set; }
+        public string Remark { get; set; }
+        public decimal AfterBalanceAmount { get; set; }
+        public decimal BeforeBalanceAmount { get; set; }
+        public decimal AfterFreezeAmount { get; set; }
+        public decimal BeforeFreezeAmount { get; set; }
+        public decimal AfterTotalAmount { get; set; }
+        public decimal BeforeTotalAmount { get; set; }
+        public decimal ChangeAmount { get; set; }
+        public int ProductType { get; set; }
+        public int ChangeType { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 42 - 0
Models/Operate/UserCashRecord.cs

@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Operate
+{
+    public partial class UserCashRecord
+    {
+        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 Remark { get; set; }
+        public string MediaSource { get; set; }
+        public string Ip { get; set; }
+        public DateTime? PaymentDate { get; set; }
+        public string ReturnMsg { get; set; }
+        public string ReturnCode { get; set; }
+        public string ResData { get; set; }
+        public string ReqData { get; set; }
+        public decimal ManageFee { get; set; }
+        public decimal TradeFee { get; set; }
+        public decimal ActualTradeAmount { get; set; }
+        public decimal TradeAmount { get; set; }
+        public string ChanelName { get; set; }
+        public string ChannelCode { get; set; }
+        public string PayTradeNo { get; set; }
+        public int TradeType { get; set; }
+        public string SettleBankName { get; set; }
+        public string SettleBankCardNo { get; set; }
+        public string IdCardNo { get; set; }
+        public int UserId { get; set; }
+        public string CashOrderNo { get; set; }
+    }
+}

+ 2969 - 0
Models/Operate/WebCMSEntities.cs

@@ -0,0 +1,2969 @@
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata;
+
+namespace MySystem.Models.Operate
+{
+    public partial class WebCMSEntities : DbContext
+    {
+        public WebCMSEntities()
+        {
+        }
+
+        public WebCMSEntities(DbContextOptions<WebCMSEntities> options)
+            : base(options)
+        {
+        }
+
+        public virtual DbSet<ActMerDaySummary> ActMerDaySummary { get; set; }
+        public virtual DbSet<ActMerMonthSummary> ActMerMonthSummary { get; set; }
+        public virtual DbSet<Advertisment> Advertisment { get; set; }
+        public virtual DbSet<AmountRecord> AmountRecord { get; set; }
+        public virtual DbSet<Col> Col { get; set; }
+        public virtual DbSet<MachineApplyOpRecord> MachineApplyOpRecord { get; set; }
+        public virtual DbSet<MenuRight> MenuRight { get; set; }
+        public virtual DbSet<MsgBlackList> MsgBlackList { get; set; }
+        public virtual DbSet<MsgPersonal> MsgPersonal { get; set; }
+        public virtual DbSet<MsgPlacard> MsgPlacard { get; set; }
+        public virtual DbSet<MsgPlacardRead> MsgPlacardRead { get; set; }
+        public virtual DbSet<MsgPush> MsgPush { get; set; }
+        public virtual DbSet<MsgSms> MsgSms { get; set; }
+        public virtual DbSet<MsgSmsSet> MsgSmsSet { get; set; }
+        public virtual DbSet<MsgTemplate> MsgTemplate { get; set; }
+        public virtual DbSet<OperateForCode> OperateForCode { get; set; }
+        public virtual DbSet<OperateLog> OperateLog { get; set; }
+        public virtual DbSet<OperateRightList> OperateRightList { get; set; }
+        public virtual DbSet<PageInfo> PageInfo { get; set; }
+        public virtual DbSet<PosCouponDaySummary> PosCouponDaySummary { get; set; }
+        public virtual DbSet<PosCouponForOp> PosCouponForOp { get; set; }
+        public virtual DbSet<PosCouponMonthSummary> PosCouponMonthSummary { get; set; }
+        public virtual DbSet<PosCouponOrders> PosCouponOrders { get; set; }
+        public virtual DbSet<PosCouponRecord> PosCouponRecord { get; set; }
+        public virtual DbSet<PosCoupons> PosCoupons { get; set; }
+        public virtual DbSet<PosMachines> PosMachines { get; set; }
+        public virtual DbSet<PublicAccountSet> PublicAccountSet { get; set; }
+        public virtual DbSet<RightDic> RightDic { get; set; }
+        public virtual DbSet<SendDaySummary> SendDaySummary { get; set; }
+        public virtual DbSet<SendMonthSummary> SendMonthSummary { get; set; }
+        public virtual DbSet<StoreActMerDaySummary> StoreActMerDaySummary { get; set; }
+        public virtual DbSet<StoreActMerMonthSummary> StoreActMerMonthSummary { get; set; }
+        public virtual DbSet<StoreForOperate> StoreForOperate { get; set; }
+        public virtual DbSet<StoreMachineApply> StoreMachineApply { get; set; }
+        public virtual DbSet<StoreSendDaySummary> StoreSendDaySummary { get; set; }
+        public virtual DbSet<StoreSendMonthSummary> StoreSendMonthSummary { get; set; }
+        public virtual DbSet<SysAdmin> SysAdmin { get; set; }
+        public virtual DbSet<SysAdminRole> SysAdminRole { get; set; }
+        public virtual DbSet<SysLog> SysLog { get; set; }
+        public virtual DbSet<SystemSet> SystemSet { get; set; }
+        public virtual DbSet<UploadParams> UploadParams { get; set; }
+        public virtual DbSet<UserAccount> UserAccount { get; set; }
+        public virtual DbSet<UserAccountRecord> UserAccountRecord { get; set; }
+        public virtual DbSet<UserCashRecord> UserCashRecord { get; set; }
+
+        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
+        {
+            if (!optionsBuilder.IsConfigured)
+            {
+                optionsBuilder.UseMySql(Library.ConfigurationManager.AppSettings["OpSqlConnStr"].ToString(), x => x.ServerVersion("5.7.17-mysql"));
+            }
+        }
+
+        protected override void OnModelCreating(ModelBuilder modelBuilder)
+        {
+            modelBuilder.Entity<ActMerDaySummary>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ActCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.BrandId).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OpId).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TradeDate)
+                    .HasColumnType("varchar(8)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<ActMerMonthSummary>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ActCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.BrandId).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OpId).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TradeMonth)
+                    .HasColumnType("varchar(6)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<Advertisment>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ColId)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Contents)
+                    .HasColumnType("longtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PicPath)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.Title)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Url)
+                    .HasColumnType("longtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<AmountRecord>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AfterAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.ApplyId).HasColumnType("int(11)");
+
+                entity.Property(e => e.BeforeAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OperateType).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UseAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<Col>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ColDetail)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ColEnName)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ColId)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ColName)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ColPicPath)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Contents)
+                    .HasColumnType("longtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ParentId).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.Recommend)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Url)
+                    .HasColumnType("longtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<MachineApplyOpRecord>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ApplyId).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OpId).HasColumnType("int(11)");
+
+                entity.Property(e => e.OpType).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.SourceSn)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TargetSn)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<MenuRight>(entity =>
+            {
+                entity.HasKey(e => e.MenuId)
+                    .HasName("PRIMARY");
+
+                entity.Property(e => e.MenuId)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Name)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+            });
+
+            modelBuilder.Entity<MsgBlackList>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ColId)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Extend)
+                    .HasColumnType("varchar(2000)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Ip)
+                    .HasColumnType("varchar(64)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Mobile)
+                    .HasColumnType("varchar(11)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.Reason)
+                    .HasColumnType("varchar(512)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(64)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TemplateId).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<MsgPersonal>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.BgPic)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Content)
+                    .HasColumnType("longtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ExtendColumn)
+                    .HasColumnType("mediumtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MsgType).HasColumnType("int(11)");
+
+                entity.Property(e => e.PushFlag).HasColumnType("int(11)");
+
+                entity.Property(e => e.PushParam)
+                    .HasColumnType("varchar(255)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.ReadFlag)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(255)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.Summary)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TemplateId).HasColumnType("int(11)");
+
+                entity.Property(e => e.Title)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Url)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<MsgPlacard>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.BgPic)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Content)
+                    .HasColumnType("longtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.EffectEndDate).HasColumnType("datetime");
+
+                entity.Property(e => e.EffectStartDate).HasColumnType("datetime");
+
+                entity.Property(e => e.ExtendColumn)
+                    .HasColumnType("mediumtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.IsTop)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.MsgType).HasColumnType("int(11)");
+
+                entity.Property(e => e.PushFlag).HasColumnType("int(11)");
+
+                entity.Property(e => e.PushParam)
+                    .HasColumnType("varchar(255)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PushTime).HasColumnType("datetime");
+
+                entity.Property(e => e.PushType).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(255)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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.ShowType).HasColumnType("int(11)");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.Summary)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Title)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Url)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<MsgPlacardRead>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PlacardId).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.ReadFlag)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(255)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnType("varchar(64)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<MsgPush>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AutoPushDate).HasColumnType("datetime");
+
+                entity.Property(e => e.ClientType)
+                    .HasColumnType("varchar(20)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Details)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Devices)
+                    .HasColumnType("mediumtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.IsSilent)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.MessageId)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Mobiles)
+                    .HasColumnType("mediumtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TemplateId).HasColumnType("int(11)");
+
+                entity.Property(e => e.Title)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Url)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<MsgSms>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.Code).HasColumnType("int(11)");
+
+                entity.Property(e => e.ColId)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Content)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ErrorNum).HasColumnType("int(11)");
+
+                entity.Property(e => e.Ip)
+                    .HasColumnType("varchar(15)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Kind)
+                    .HasColumnType("varchar(64)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Mobile)
+                    .HasColumnType("varchar(11)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.RespCode)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.RespContent)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SendStatus).HasColumnType("int(11)");
+
+                entity.Property(e => e.SendTime).HasColumnType("datetime");
+
+                entity.Property(e => e.SendType).HasColumnType("int(11)");
+
+                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.SignName)
+                    .HasColumnType("varchar(10)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SmsType).HasColumnType("int(11)");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TemplateId).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.VerifyCode)
+                    .HasColumnType("varchar(6)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.VerifyStatus).HasColumnType("int(11)");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<MsgSmsSet>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AuthPwd)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Name)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Params)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.ReqUrl)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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.SmsType).HasColumnType("int(11)");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UserName)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<MsgTemplate>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ColId)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Content)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Extend)
+                    .HasColumnType("varchar(2000)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MsgType).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(64)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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.SignName)
+                    .HasColumnType("varchar(10)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TemplateType).HasColumnType("int(11)");
+
+                entity.Property(e => e.Title)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<OperateForCode>(entity =>
+            {
+                entity.HasKey(e => e.OpCode)
+                    .HasName("PRIMARY");
+
+                entity.Property(e => e.OpCode)
+                    .HasColumnType("varchar(20)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OpId).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<OperateLog>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AfterOperate)
+                    .HasColumnType("mediumtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.BeforeOperate)
+                    .HasColumnType("mediumtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OpMode)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OperateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TableEnName)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<OperateRightList>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.EnName)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Name)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<PageInfo>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ColId)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Contents)
+                    .HasColumnType("longtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.Title)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<PosCouponDaySummary>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.BrandId).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OpId).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.SaleCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TradeDate)
+                    .HasColumnType("varchar(8)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<PosCouponForOp>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OutNum).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.StockNum).HasColumnType("int(11)");
+
+                entity.Property(e => e.TotalNum).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<PosCouponMonthSummary>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.BrandId).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OpId).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.SaleCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TradeMonth)
+                    .HasColumnType("varchar(6)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<PosCouponOrders>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AfterOut).HasColumnType("int(11)");
+
+                entity.Property(e => e.AfterStock).HasColumnType("int(11)");
+
+                entity.Property(e => e.AfterTotal).HasColumnType("int(11)");
+
+                entity.Property(e => e.BeforeOut).HasColumnType("int(11)");
+
+                entity.Property(e => e.BeforeStock).HasColumnType("int(11)");
+
+                entity.Property(e => e.BeforeTotal).HasColumnType("int(11)");
+
+                entity.Property(e => e.ChangeCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.ChangeKind).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OpId).HasColumnType("int(11)");
+
+                entity.Property(e => e.OrderNo)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<PosCouponRecord>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ChangeKind).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.FromUserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.OrderNo)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PosCouponId).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.ToUserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<PosCoupons>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OpId).HasColumnType("int(11)");
+
+                entity.Property(e => e.PosCouponId).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<PosMachines>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.BrandId).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OpId).HasColumnType("int(11)");
+
+                entity.Property(e => e.PosId).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<PublicAccountSet>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AlipayAppId)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AlipayPartnerId)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AlipayPrivateKey)
+                    .HasColumnType("mediumtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AlipayPublicKey)
+                    .HasColumnType("mediumtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AliyunAccessKeyId)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AliyunAccessKeySecret)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AliyunAndroidActivity)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AliyunAndroidNotifyTitle)
+                    .HasColumnType("varchar(20)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AliyunPushAndroidAppId)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AliyunPushAndroidAppSecret)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AliyunPushIosAppId)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AliyunPushIosAppSecret)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AliyunRegionId)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ErpApiUrl)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ErpAppCode)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MeiQiaAppKey)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MobAppKey)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MobAppSecret)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QqAndroidAppId)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QqAndroidAppKey)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QqIosAppId)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QqIosAppKey)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ServerIp)
+                    .HasColumnType("varchar(15)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SmsApiDefaultTemplate)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SmsApiPwd)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SmsApiSign)
+                    .HasColumnType("varchar(10)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SmsApiUserId)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.WeChatAppId)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.WeChatAppSecret)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.WeChatMchId)
+                    .HasColumnType("varchar(20)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.WeChatMiniAppId)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.WeChatMiniAppSecret)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.WeChatOpenAppId)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.WeChatOpenAppSecret)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.WeChatPayKey)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+            });
+
+            modelBuilder.Entity<RightDic>(entity =>
+            {
+                entity.Property(e => e.Id)
+                    .HasColumnName("ID")
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Icon)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MainDataList)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.MainMenu)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.MainStat)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.Name)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OtherRight)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.RightLevel).HasColumnType("int(11)");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Url)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+            });
+
+            modelBuilder.Entity<SendDaySummary>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.BrandId).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OpId).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.SendCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TradeDate)
+                    .HasColumnType("varchar(8)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<SendMonthSummary>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.BrandId).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OpId).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.SendCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TradeMonth)
+                    .HasColumnType("varchar(6)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<StoreActMerDaySummary>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ActCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.BrandId).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OpId).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TradeDate)
+                    .HasColumnType("varchar(8)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<StoreActMerMonthSummary>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ActCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.BrandId).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OpId).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TradeMonth)
+                    .HasColumnType("varchar(6)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<StoreForOperate>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OpId).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.StoreId).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<StoreMachineApply>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ApplyNo)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ApplyNum).HasColumnType("int(11)");
+
+                entity.Property(e => e.BrandId).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ErpCode)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.SendMode)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SendNum).HasColumnType("int(11)");
+
+                entity.Property(e => e.SendSn)
+                    .HasColumnType("mediumtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UseAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<StoreSendDaySummary>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.BrandId).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OpId).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.SendCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TradeDate)
+                    .HasColumnType("varchar(8)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<StoreSendMonthSummary>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.BrandId).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OpId).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.SendCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TradeMonth)
+                    .HasColumnType("varchar(6)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<SysAdmin>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AdminName)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.FilePath)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.HeadPhoto)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.LastLoginDate).HasColumnType("datetime");
+
+                entity.Property(e => e.MakerCode)
+                    .HasColumnType("varchar(20)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MakerMobile)
+                    .HasColumnType("varchar(11)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MakerName)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OpCode)
+                    .HasColumnType("varchar(20)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Password)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.RealName)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Role)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.StoreCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.TotalMachineCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<SysAdminRole>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Details)
+                    .HasColumnType("longtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Name)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.RightInfo)
+                    .HasColumnType("longtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<SysLog>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.Contents)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+            });
+
+            modelBuilder.Entity<SystemSet>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.Address)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.IndexDescription)
+                    .HasColumnType("longtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.IndexKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Logo)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Phone)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.RightInfo)
+                    .HasColumnType("longtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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)");
+
+                entity.Property(e => e.StartAdPhoto)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UploadAutoWater)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.UploadAutoZoom)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.UploadAutoZoomHeight).HasColumnType("int(11)");
+
+                entity.Property(e => e.UploadAutoZoomQuality).HasColumnType("int(11)");
+
+                entity.Property(e => e.UploadAutoZoomWidth).HasColumnType("int(11)");
+
+                entity.Property(e => e.UploadExt)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UploadMaxSize).HasColumnType("int(11)");
+
+                entity.Property(e => e.UploadOss)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.UploadWaterPath)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UploadWaterPosition)
+                    .HasColumnType("varchar(15)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+
+                entity.Property(e => e.WebName)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.WebStatCode)
+                    .HasColumnType("longtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.WebUrl)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+            });
+
+            modelBuilder.Entity<UploadParams>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ColumnEnName)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ColumnName)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ParamString)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TableEnName)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TableName)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<UserAccount>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AccountStatus).HasColumnType("int(11)");
+
+                entity.Property(e => e.BalanceAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.FreezeAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.PosCouponApplyAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TotalAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.TotalAmt).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.ValidAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.ValidForGetAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+
+                entity.Property(e => e.WithdrawAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.WithdrawingAmount).HasColumnType("decimal(18,2)");
+            });
+
+            modelBuilder.Entity<UserAccountRecord>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AfterBalanceAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.AfterFreezeAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.AfterTotalAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.BeforeBalanceAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.BeforeFreezeAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.BeforeTotalAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.ChangeAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.ChangeType).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ProductType).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(64)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TransRecordNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<UserCashRecord>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ActualTradeAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.CashOrderNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ChanelName)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ChannelCode)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.IdCardNo)
+                    .HasColumnType("varchar(18)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Ip)
+                    .HasColumnType("varchar(15)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ManageFee).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.MediaSource)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PayTradeNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PaymentDate).HasColumnType("datetime");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(128)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ReqData)
+                    .HasColumnType("varchar(2048)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ResData)
+                    .HasColumnType("varchar(2048)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ReturnCode)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ReturnMsg)
+                    .HasColumnType("varchar(128)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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.SettleBankCardNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SettleBankName)
+                    .HasColumnType("varchar(64)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TradeAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.TradeFee).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.TradeType).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            OnModelCreatingPartial(modelBuilder);
+        }
+
+        partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
+    }
+}

BIN
Service/.DS_Store


+ 198 - 0
Service/Bs/AdvertismentService.cs

@@ -0,0 +1,198 @@
+/*
+ * 广告位
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Bs;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Bs
+{
+    public class AdvertismentService
+    {
+        string _conn = "";
+        public AdvertismentService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("Title"); //标题
+fields.Add("ColId"); //分类
+fields.Add("PicPath"); //图片
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("Advertisment", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("Title"); //标题
+fields.Add("ColId"); //分类
+fields.Add("PicPath"); //图片
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("Advertisment", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public Advertisment Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            Advertisment editData = db.Advertisment.FirstOrDefault(m => m.Id == Id) ?? new Advertisment();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from Advertisment where 1=1" + condition, _conn);
+            if(dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.Advertisment.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if(check)
+            {
+                
+            }
+            int Id = new DbService(AppConfig.Base.dbTables, _conn).Add("Advertisment", fields, 0);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if(check)
+            {
+                
+            }
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("Advertisment", fields, Id);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("Advertisment", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Delete("Advertisment", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Sort("Advertisment", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count;i++ )
+            {
+                JsonData dr = list[i];
+                
+                db.Advertisment.Add(new Advertisment()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+                    
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+            
+        // }
+    }
+}

+ 206 - 0
Service/Bs/ColService.cs

@@ -0,0 +1,206 @@
+/*
+ * 分类设置
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Bs;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Bs
+{
+    public class ColService
+    {
+        string _conn = "";
+        public ColService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("ColName"); //名称
+fields.Add("Recommend"); //推荐
+fields.Add("ColEnName"); //英文名
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("Col", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("ColName"); //名称
+fields.Add("Recommend"); //推荐
+fields.Add("ColEnName"); //英文名
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("Col", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public Col Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            Col editData = db.Col.FirstOrDefault(m => m.Id == Id) ?? new Col();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from Col where 1=1" + condition, _conn);
+            if(dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.Col.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if(check)
+            {
+                if (string.IsNullOrEmpty(fields["ColName"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+}
+
+            }
+            int Id = new DbService(AppConfig.Base.dbTables, _conn).Add("Col", fields, 0);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if(check)
+            {
+                if (string.IsNullOrEmpty(fields["ColName"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+}
+
+            }
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("Col", fields, Id);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("Col", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Delete("Col", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Sort("Col", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count;i++ )
+            {
+                JsonData dr = list[i];
+                
+                db.Col.Add(new Col()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+                    
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+            
+        // }
+    }
+}

+ 200 - 0
Service/Bs/MsgBlackListService.cs

@@ -0,0 +1,200 @@
+/*
+ * 消息黑名单
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Bs;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Bs
+{
+    public class MsgBlackListService
+    {
+        string _conn = "";
+        public MsgBlackListService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("ColId"); //分类
+fields.Add("TemplateId"); //模板
+fields.Add("Mobile"); //手机号
+fields.Add("Ip"); //IP地址
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("MsgBlackList", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("ColId"); //分类
+fields.Add("TemplateId"); //模板
+fields.Add("Mobile"); //手机号
+fields.Add("Ip"); //IP地址
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("MsgBlackList", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public MsgBlackList Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            MsgBlackList editData = db.MsgBlackList.FirstOrDefault(m => m.Id == Id) ?? new MsgBlackList();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from MsgBlackList where 1=1" + condition, _conn);
+            if(dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.MsgBlackList.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if(check)
+            {
+                
+            }
+            int Id = new DbService(AppConfig.Base.dbTables, _conn).Add("MsgBlackList", fields, 0);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if(check)
+            {
+                
+            }
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("MsgBlackList", fields, Id);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("MsgBlackList", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Delete("MsgBlackList", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Sort("MsgBlackList", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count;i++ )
+            {
+                JsonData dr = list[i];
+                
+                db.MsgBlackList.Add(new MsgBlackList()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+                    
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+            
+        // }
+    }
+}

+ 214 - 0
Service/Bs/MsgPersonalService.cs

@@ -0,0 +1,214 @@
+/*
+ * 个人消息
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Bs;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Bs
+{
+    public class MsgPersonalService
+    {
+        string _conn = "";
+        public MsgPersonalService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("UserId"); //创客
+fields.Add("MsgType"); //消息类型
+fields.Add("BgPic"); //背景图片
+fields.Add("Title"); //标题
+fields.Add("Summary"); //简介
+fields.Add("PushFlag"); //推送标记
+fields.Add("ReadFlag"); //已读标记
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("MsgPersonal", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("UserId"); //创客
+fields.Add("MsgType"); //消息类型
+fields.Add("BgPic"); //背景图片
+fields.Add("Title"); //标题
+fields.Add("Summary"); //简介
+fields.Add("PushFlag"); //推送标记
+fields.Add("ReadFlag"); //已读标记
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("MsgPersonal", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public MsgPersonal Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            MsgPersonal editData = db.MsgPersonal.FirstOrDefault(m => m.Id == Id) ?? new MsgPersonal();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from MsgPersonal where 1=1" + condition, _conn);
+            if(dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.MsgPersonal.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if(check)
+            {
+                if (string.IsNullOrEmpty(fields["Title"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写标题" };
+}
+
+            }
+            int Id = new DbService(AppConfig.Base.dbTables, _conn).Add("MsgPersonal", fields, 0);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if(check)
+            {
+                if (string.IsNullOrEmpty(fields["Title"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写标题" };
+}
+
+            }
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("MsgPersonal", fields, Id);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("MsgPersonal", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Delete("MsgPersonal", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Sort("MsgPersonal", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count;i++ )
+            {
+                JsonData dr = list[i];
+                
+                db.MsgPersonal.Add(new MsgPersonal()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+                    
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+            
+        // }
+    }
+}

+ 198 - 0
Service/Bs/MsgPlacardReadService.cs

@@ -0,0 +1,198 @@
+/*
+ * 公告消息已读记录
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Bs;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Bs
+{
+    public class MsgPlacardReadService
+    {
+        string _conn = "";
+        public MsgPlacardReadService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("PlacardId"); //公告
+fields.Add("UserId"); //用户ID
+fields.Add("ReadFlag"); //已读标记
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("MsgPlacardRead", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("PlacardId"); //公告
+fields.Add("UserId"); //用户ID
+fields.Add("ReadFlag"); //已读标记
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("MsgPlacardRead", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public MsgPlacardRead Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            MsgPlacardRead editData = db.MsgPlacardRead.FirstOrDefault(m => m.Id == Id) ?? new MsgPlacardRead();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from MsgPlacardRead where 1=1" + condition, _conn);
+            if(dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.MsgPlacardRead.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if(check)
+            {
+                
+            }
+            int Id = new DbService(AppConfig.Base.dbTables, _conn).Add("MsgPlacardRead", fields, 0);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if(check)
+            {
+                
+            }
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("MsgPlacardRead", fields, Id);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("MsgPlacardRead", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Delete("MsgPlacardRead", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Sort("MsgPlacardRead", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count;i++ )
+            {
+                JsonData dr = list[i];
+                
+                db.MsgPlacardRead.Add(new MsgPlacardRead()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+                    
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+            
+        // }
+    }
+}

+ 216 - 0
Service/Bs/MsgPlacardService.cs

@@ -0,0 +1,216 @@
+/*
+ * 公告消息
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Bs;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Bs
+{
+    public class MsgPlacardService
+    {
+        string _conn = "";
+        public MsgPlacardService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("MsgType"); //消息类型
+fields.Add("Title"); //标题
+fields.Add("Summary"); //简介
+fields.Add("ShowType"); //展示类型
+fields.Add("BgPic"); //背景图片
+fields.Add("PushType"); //推送类型
+fields.Add("PushFlag"); //推送标记
+fields.Add("PushTime"); //推送时间
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("MsgPlacard", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("MsgType"); //消息类型
+fields.Add("Title"); //标题
+fields.Add("Summary"); //简介
+fields.Add("ShowType"); //展示类型
+fields.Add("BgPic"); //背景图片
+fields.Add("PushType"); //推送类型
+fields.Add("PushFlag"); //推送标记
+fields.Add("PushTime"); //推送时间
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("MsgPlacard", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public MsgPlacard Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            MsgPlacard editData = db.MsgPlacard.FirstOrDefault(m => m.Id == Id) ?? new MsgPlacard();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from MsgPlacard where 1=1" + condition, _conn);
+            if(dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.MsgPlacard.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if(check)
+            {
+                if (string.IsNullOrEmpty(fields["Title"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写标题" };
+}
+
+            }
+            int Id = new DbService(AppConfig.Base.dbTables, _conn).Add("MsgPlacard", fields, 0);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if(check)
+            {
+                if (string.IsNullOrEmpty(fields["Title"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写标题" };
+}
+
+            }
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("MsgPlacard", fields, Id);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("MsgPlacard", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Delete("MsgPlacard", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Sort("MsgPlacard", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count;i++ )
+            {
+                JsonData dr = list[i];
+                
+                db.MsgPlacard.Add(new MsgPlacard()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+                    
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+            
+        // }
+    }
+}

+ 224 - 0
Service/Bs/MsgPushService.cs

@@ -0,0 +1,224 @@
+/*
+ * 推送消息记录
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Bs;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Bs
+{
+    public class MsgPushService
+    {
+        string _conn = "";
+        public MsgPushService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("ClientType"); //客户端类型
+fields.Add("Title"); //推送标题
+fields.Add("Details"); //推送内容
+fields.Add("TemplateId"); //模板
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("MsgPush", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("ClientType"); //客户端类型
+fields.Add("Title"); //推送标题
+fields.Add("Details"); //推送内容
+fields.Add("TemplateId"); //模板
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("MsgPush", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public MsgPush Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            MsgPush editData = db.MsgPush.FirstOrDefault(m => m.Id == Id) ?? new MsgPush();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from MsgPush where 1=1" + condition, _conn);
+            if(dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.MsgPush.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if(check)
+            {
+                if (string.IsNullOrEmpty(fields["ClientType"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写客户端类型" };
+}
+if (string.IsNullOrEmpty(fields["Title"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写推送标题" };
+}
+if (string.IsNullOrEmpty(fields["Details"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写推送内容" };
+}
+
+            }
+            int Id = new DbService(AppConfig.Base.dbTables, _conn).Add("MsgPush", fields, 0);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if(check)
+            {
+                if (string.IsNullOrEmpty(fields["ClientType"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写客户端类型" };
+}
+if (string.IsNullOrEmpty(fields["Title"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写推送标题" };
+}
+if (string.IsNullOrEmpty(fields["Details"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写推送内容" };
+}
+
+            }
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("MsgPush", fields, Id);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("MsgPush", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Delete("MsgPush", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Sort("MsgPush", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count;i++ )
+            {
+                JsonData dr = list[i];
+                
+                db.MsgPush.Add(new MsgPush()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+                    
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+            
+        // }
+    }
+}

+ 210 - 0
Service/Bs/MsgSmsService.cs

@@ -0,0 +1,210 @@
+/*
+ * 发送短信记录
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Bs;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Bs
+{
+    public class MsgSmsService
+    {
+        string _conn = "";
+        public MsgSmsService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("Mobile"); //手机号
+fields.Add("Content"); //内容
+fields.Add("SendTime"); //发送时间
+fields.Add("VerifyCode"); //验证码
+fields.Add("ErrorNum"); //错误次数
+fields.Add("VerifyStatus"); //校验状态
+fields.Add("Code"); //业务编号
+fields.Add("Kind"); //短信类型
+fields.Add("SendStatus"); //发送状态
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("MsgSms", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("Mobile"); //手机号
+fields.Add("Content"); //内容
+fields.Add("SendTime"); //发送时间
+fields.Add("VerifyCode"); //验证码
+fields.Add("ErrorNum"); //错误次数
+fields.Add("VerifyStatus"); //校验状态
+fields.Add("Code"); //业务编号
+fields.Add("Kind"); //短信类型
+fields.Add("SendStatus"); //发送状态
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("MsgSms", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public MsgSms Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            MsgSms editData = db.MsgSms.FirstOrDefault(m => m.Id == Id) ?? new MsgSms();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from MsgSms where 1=1" + condition, _conn);
+            if(dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.MsgSms.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if(check)
+            {
+                
+            }
+            int Id = new DbService(AppConfig.Base.dbTables, _conn).Add("MsgSms", fields, 0);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if(check)
+            {
+                
+            }
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("MsgSms", fields, Id);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("MsgSms", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Delete("MsgSms", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Sort("MsgSms", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count;i++ )
+            {
+                JsonData dr = list[i];
+                
+                db.MsgSms.Add(new MsgSms()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+                    
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+            
+        // }
+    }
+}

+ 246 - 0
Service/Bs/MsgSmsSetService.cs

@@ -0,0 +1,246 @@
+/*
+ * 发送短信配置
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Bs;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Bs
+{
+    public class MsgSmsSetService
+    {
+        string _conn = "";
+        public MsgSmsSetService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("Name"); //渠道名称
+fields.Add("UserName"); //账号
+fields.Add("SmsType"); //类别
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("MsgSmsSet", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("Name"); //渠道名称
+fields.Add("UserName"); //账号
+fields.Add("SmsType"); //类别
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("MsgSmsSet", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public MsgSmsSet Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            MsgSmsSet editData = db.MsgSmsSet.FirstOrDefault(m => m.Id == Id) ?? new MsgSmsSet();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from MsgSmsSet where 1=1" + condition, _conn);
+            if(dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.MsgSmsSet.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if(check)
+            {
+                if (string.IsNullOrEmpty(fields["Name"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写渠道名称" };
+}
+if (string.IsNullOrEmpty(fields["UserName"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写账号" };
+}
+if (string.IsNullOrEmpty(fields["AuthPwd"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写密码" };
+}
+if (string.IsNullOrEmpty(fields["SmsType"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写类别" };
+}
+if (string.IsNullOrEmpty(fields["ReqUrl"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写请求地址" };
+}
+if (string.IsNullOrEmpty(fields["Params"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写请求参数" };
+}
+
+            }
+            int Id = new DbService(AppConfig.Base.dbTables, _conn).Add("MsgSmsSet", fields, 0);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if(check)
+            {
+                if (string.IsNullOrEmpty(fields["Name"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写渠道名称" };
+}
+if (string.IsNullOrEmpty(fields["UserName"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写账号" };
+}
+if (string.IsNullOrEmpty(fields["AuthPwd"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写密码" };
+}
+if (string.IsNullOrEmpty(fields["SmsType"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写类别" };
+}
+if (string.IsNullOrEmpty(fields["ReqUrl"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写请求地址" };
+}
+if (string.IsNullOrEmpty(fields["Params"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写请求参数" };
+}
+
+            }
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("MsgSmsSet", fields, Id);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("MsgSmsSet", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Delete("MsgSmsSet", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Sort("MsgSmsSet", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count;i++ )
+            {
+                JsonData dr = list[i];
+                
+                db.MsgSmsSet.Add(new MsgSmsSet()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+                    
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+            
+        // }
+    }
+}

+ 216 - 0
Service/Bs/MsgTemplateService.cs

@@ -0,0 +1,216 @@
+/*
+ * 消息模板
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Bs;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Bs
+{
+    public class MsgTemplateService
+    {
+        string _conn = "";
+        public MsgTemplateService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("Title"); //标题
+fields.Add("ColId"); //分类
+fields.Add("TemplateType"); //类型
+fields.Add("MsgType"); //消息类型
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("MsgTemplate", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("Title"); //标题
+fields.Add("ColId"); //分类
+fields.Add("TemplateType"); //类型
+fields.Add("MsgType"); //消息类型
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("MsgTemplate", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public MsgTemplate Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            MsgTemplate editData = db.MsgTemplate.FirstOrDefault(m => m.Id == Id) ?? new MsgTemplate();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from MsgTemplate where 1=1" + condition, _conn);
+            if(dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.MsgTemplate.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if(check)
+            {
+                if (string.IsNullOrEmpty(fields["Title"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写标题" };
+}
+if (string.IsNullOrEmpty(fields["ColId"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写分类" };
+}
+
+            }
+            int Id = new DbService(AppConfig.Base.dbTables, _conn).Add("MsgTemplate", fields, 0);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if(check)
+            {
+                if (string.IsNullOrEmpty(fields["Title"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写标题" };
+}
+if (string.IsNullOrEmpty(fields["ColId"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写分类" };
+}
+
+            }
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("MsgTemplate", fields, Id);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("MsgTemplate", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Delete("MsgTemplate", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Sort("MsgTemplate", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count;i++ )
+            {
+                JsonData dr = list[i];
+                
+                db.MsgTemplate.Add(new MsgTemplate()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+                    
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+            
+        // }
+    }
+}

+ 198 - 0
Service/Bs/OperateLogService.cs

@@ -0,0 +1,198 @@
+/*
+ * 操作日志
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Bs;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Bs
+{
+    public class OperateLogService
+    {
+        string _conn = "";
+        public OperateLogService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("TableEnName"); //表
+fields.Add("OperateMan"); //操作员
+fields.Add("OpMode"); //操作方式
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("OperateLog", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("TableEnName"); //表
+fields.Add("OperateMan"); //操作员
+fields.Add("OpMode"); //操作方式
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("OperateLog", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public OperateLog Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            OperateLog editData = db.OperateLog.FirstOrDefault(m => m.Id == Id) ?? new OperateLog();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from OperateLog where 1=1" + condition, _conn);
+            if(dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.OperateLog.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if(check)
+            {
+                
+            }
+            int Id = new DbService(AppConfig.Base.dbTables, _conn).Add("OperateLog", fields, 0);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if(check)
+            {
+                
+            }
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("OperateLog", fields, Id);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("OperateLog", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Delete("OperateLog", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Sort("OperateLog", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count;i++ )
+            {
+                JsonData dr = list[i];
+                
+                db.OperateLog.Add(new OperateLog()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+                    
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+            
+        // }
+    }
+}

+ 196 - 0
Service/Bs/OperateRightListService.cs

@@ -0,0 +1,196 @@
+/*
+ * 操作权限
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Bs;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Bs
+{
+    public class OperateRightListService
+    {
+        string _conn = "";
+        public OperateRightListService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("Name"); //名称
+fields.Add("EnName"); //英文名
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("OperateRightList", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("Name"); //名称
+fields.Add("EnName"); //英文名
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("OperateRightList", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public OperateRightList Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            OperateRightList editData = db.OperateRightList.FirstOrDefault(m => m.Id == Id) ?? new OperateRightList();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from OperateRightList where 1=1" + condition, _conn);
+            if(dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.OperateRightList.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if(check)
+            {
+                
+            }
+            int Id = new DbService(AppConfig.Base.dbTables, _conn).Add("OperateRightList", fields, 0);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if(check)
+            {
+                
+            }
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("OperateRightList", fields, Id);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("OperateRightList", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Delete("OperateRightList", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Sort("OperateRightList", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count;i++ )
+            {
+                JsonData dr = list[i];
+                
+                db.OperateRightList.Add(new OperateRightList()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+                    
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+            
+        // }
+    }
+}

+ 196 - 0
Service/Bs/PageInfoService.cs

@@ -0,0 +1,196 @@
+/*
+ * 单页内容
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Bs;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Bs
+{
+    public class PageInfoService
+    {
+        string _conn = "";
+        public PageInfoService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("Title"); //标题
+fields.Add("ColId"); //分类
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("PageInfo", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("Title"); //标题
+fields.Add("ColId"); //分类
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("PageInfo", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public PageInfo Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            PageInfo editData = db.PageInfo.FirstOrDefault(m => m.Id == Id) ?? new PageInfo();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from PageInfo where 1=1" + condition, _conn);
+            if(dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.PageInfo.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if(check)
+            {
+                
+            }
+            int Id = new DbService(AppConfig.Base.dbTables, _conn).Add("PageInfo", fields, 0);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if(check)
+            {
+                
+            }
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("PageInfo", fields, Id);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("PageInfo", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Delete("PageInfo", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Sort("PageInfo", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count;i++ )
+            {
+                JsonData dr = list[i];
+                
+                db.PageInfo.Add(new PageInfo()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+                    
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+            
+        // }
+    }
+}

+ 146 - 0
Service/Bs/RefreshTokensNewService.cs

@@ -0,0 +1,146 @@
+/*
+ * 后台管理员角色
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using MySystem.Models.Bs;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Bs
+{
+    public class RefreshTokensNewService
+    {
+        string _conn = "";
+        public RefreshTokensNewService()
+        {
+            _conn = ConfigurationManager.AppSettings["BsSqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30)
+        {
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("RefreshTokensNew", relationData, "RefreshTokensNew.Id desc", page, limit, condition, new List<string>());
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public RefreshTokensNew Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            RefreshTokensNew editData = db.RefreshTokensNew.FirstOrDefault(m => m.UserId == Id) ?? new RefreshTokensNew();
+            db.Dispose();
+            return editData;
+        }
+        public RefreshTokensNew Query(string refreshToken)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            RefreshTokensNew editData = db.RefreshTokensNew.FirstOrDefault(m => m.RefreshToken == refreshToken) ?? new RefreshTokensNew();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public int Add(Dictionary<string, object> Fields)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            RefreshTokensNew add = db.RefreshTokensNew.Add(new RefreshTokensNew()
+            {
+                UserId = (int)Fields["UserId"],
+                ExpiredDate = (DateTime)Fields["ExpiredDate"],
+                RefreshToken = Fields["RefreshToken"].ToString(),
+            }).Entity;
+            db.SaveChanges();
+            int Id = add.UserId;
+            db.Dispose();
+            return Id;
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public void Edit(Dictionary<string, object> Fields, int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            RefreshTokensNew edit = db.RefreshTokensNew.FirstOrDefault(m => m.UserId == Id);
+            if(edit != null)
+            {
+                edit.ExpiredDate = (DateTime)Fields["ExpiredDate"];
+                edit.RefreshToken = Fields["RefreshToken"].ToString();
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Delete("RefreshTokensNew", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Sort("RefreshTokensNew", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count;i++ )
+            {
+                JsonData dr = list[i];
+                
+                db.RefreshTokensNew.Add(new RefreshTokensNew()
+                {                    
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+        // }
+    }
+}

+ 146 - 0
Service/Bs/RefreshTokensService.cs

@@ -0,0 +1,146 @@
+/*
+ * 后台管理员角色
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using MySystem.Models.Bs;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Bs
+{
+    public class RefreshTokensService
+    {
+        string _conn = "";
+        public RefreshTokensService()
+        {
+            _conn = ConfigurationManager.AppSettings["BsSqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30)
+        {
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("RefreshTokens", relationData, "RefreshTokens.Id desc", page, limit, condition, new List<string>());
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public RefreshTokens Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            RefreshTokens editData = db.RefreshTokens.FirstOrDefault(m => m.UserId == Id) ?? new RefreshTokens();
+            db.Dispose();
+            return editData;
+        }
+        public RefreshTokens Query(string refreshToken)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            RefreshTokens editData = db.RefreshTokens.FirstOrDefault(m => m.RefreshToken == refreshToken) ?? new RefreshTokens();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public int Add(Dictionary<string, object> Fields)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            RefreshTokens add = db.RefreshTokens.Add(new RefreshTokens()
+            {
+                UserId = (int)Fields["UserId"],
+                ExpiredDate = (DateTime)Fields["ExpiredDate"],
+                RefreshToken = Fields["RefreshToken"].ToString(),
+            }).Entity;
+            db.SaveChanges();
+            int Id = add.UserId;
+            db.Dispose();
+            return Id;
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public void Edit(Dictionary<string, object> Fields, int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            RefreshTokens edit = db.RefreshTokens.FirstOrDefault(m => m.UserId == Id);
+            if(edit != null)
+            {
+                edit.ExpiredDate = (DateTime)Fields["ExpiredDate"];
+                edit.RefreshToken = Fields["RefreshToken"].ToString();
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Delete("RefreshTokens", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Sort("RefreshTokens", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count;i++ )
+            {
+                JsonData dr = list[i];
+                
+                db.RefreshTokens.Add(new RefreshTokens()
+                {                    
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+        // }
+    }
+}

+ 207 - 0
Service/Bs/SysAdminNewService.cs

@@ -0,0 +1,207 @@
+/*
+ * 后台管理员
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Bs;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Bs
+{
+    public class SysAdminNewService
+    {
+        string _conn = "";
+        public SysAdminNewService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("AdminName"); //用户名
+            fields.Add("RealName"); //名称
+            fields.Add("Role"); //角色
+            fields.Add("LastLoginDate"); //最后登录时间
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("SysAdminNew", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("AdminName"); //用户名
+            fields.Add("RealName"); //名称
+            fields.Add("Role"); //角色
+            fields.Add("LastLoginDate"); //最后登录时间
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("SysAdminNew", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public SysAdminNew Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            SysAdminNew editData = db.SysAdminNew.FirstOrDefault(m => m.Id == Id) ?? new SysAdminNew();
+            db.Dispose();
+            return editData;
+        }
+        public SysAdminNew Query(string adminName, string pwd)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            SysAdminNew editData = db.SysAdminNew.FirstOrDefault(m => m.AdminName == adminName && m.Password == pwd) ?? new SysAdminNew();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from SysAdminNew where 1=1" + condition, _conn);
+            if (dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.SysAdminNew.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if (check)
+            {
+
+            }
+            int Id = new DbService(AppConfig.Base.dbTables, _conn).Add("SysAdminNew", fields, 0);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if (check)
+            {
+
+            }
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("SysAdminNew", fields, Id);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("SysAdminNew", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Delete("SysAdminNew", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Sort("SysAdminNew", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count; i++)
+            {
+                JsonData dr = list[i];
+
+                db.SysAdminNew.Add(new SysAdminNew()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+
+        // }
+    }
+}

+ 210 - 0
Service/Bs/SysAdminRoleNewService.cs

@@ -0,0 +1,210 @@
+/*
+ * 后台管理员角色
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Bs;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Bs
+{
+    public class SysAdminRoleNewService
+    {
+        string _conn = "";
+        public SysAdminRoleNewService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("Name"); //名称
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("SysAdminRoleNew", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("Name"); //名称
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("SysAdminRoleNew", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public SysAdminRoleNew Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            SysAdminRoleNew editData = db.SysAdminRoleNew.FirstOrDefault(m => m.Id == Id) ?? new SysAdminRoleNew();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from SysAdminRoleNew where 1=1" + condition, _conn);
+            if (dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.SysAdminRoleNew.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if (check)
+            {
+                if (string.IsNullOrEmpty(fields["Name"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+                }
+                if (string.IsNullOrEmpty(fields["Details"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写描述" };
+                }
+
+            }
+            int Id = new DbService(AppConfig.Base.dbTables, _conn).Add("SysAdminRoleNew", fields, 0);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if (check)
+            {
+                if (string.IsNullOrEmpty(fields["Name"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+                }
+                if (string.IsNullOrEmpty(fields["Details"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写描述" };
+                }
+
+            }
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("SysAdminRoleNew", fields, Id);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("SysAdminRoleNew", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Delete("SysAdminRoleNew", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Sort("SysAdminRoleNew", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count; i++)
+            {
+                JsonData dr = list[i];
+
+                db.SysAdminRoleNew.Add(new SysAdminRoleNew()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+
+        // }
+    }
+}

+ 210 - 0
Service/Bs/SysAdminRoleService.cs

@@ -0,0 +1,210 @@
+/*
+ * 后台管理员角色
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Bs;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Bs
+{
+    public class SysAdminRoleService
+    {
+        string _conn = "";
+        public SysAdminRoleService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("Name"); //名称
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("SysAdminRole", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("Name"); //名称
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("SysAdminRole", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public SysAdminRole Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            SysAdminRole editData = db.SysAdminRole.FirstOrDefault(m => m.Id == Id) ?? new SysAdminRole();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from SysAdminRole where 1=1" + condition, _conn);
+            if(dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.SysAdminRole.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if(check)
+            {
+                if (string.IsNullOrEmpty(fields["Name"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+}
+if (string.IsNullOrEmpty(fields["Details"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写描述" };
+}
+
+            }
+            int Id = new DbService(AppConfig.Base.dbTables, _conn).Add("SysAdminRole", fields, 0);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if(check)
+            {
+                if (string.IsNullOrEmpty(fields["Name"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+}
+if (string.IsNullOrEmpty(fields["Details"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写描述" };
+}
+
+            }
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("SysAdminRole", fields, Id);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("SysAdminRole", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Delete("SysAdminRole", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Sort("SysAdminRole", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count;i++ )
+            {
+                JsonData dr = list[i];
+                
+                db.SysAdminRole.Add(new SysAdminRole()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+                    
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+            
+        // }
+    }
+}

+ 207 - 0
Service/Bs/SysAdminService.cs

@@ -0,0 +1,207 @@
+/*
+ * 后台管理员
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Bs;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Bs
+{
+    public class SysAdminService
+    {
+        string _conn = "";
+        public SysAdminService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("AdminName"); //用户名
+fields.Add("RealName"); //名称
+fields.Add("Role"); //角色
+fields.Add("LastLoginDate"); //最后登录时间
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("SysAdmin", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("AdminName"); //用户名
+fields.Add("RealName"); //名称
+fields.Add("Role"); //角色
+fields.Add("LastLoginDate"); //最后登录时间
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("SysAdmin", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public SysAdmin Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            SysAdmin editData = db.SysAdmin.FirstOrDefault(m => m.Id == Id) ?? new SysAdmin();
+            db.Dispose();
+            return editData;
+        }
+        public SysAdmin Query(string adminName, string pwd)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            SysAdmin editData = db.SysAdmin.FirstOrDefault(m => m.AdminName == adminName && m.Password == pwd) ?? new SysAdmin();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from SysAdmin where 1=1" + condition, _conn);
+            if(dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.SysAdmin.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if(check)
+            {
+                
+            }
+            int Id = new DbService(AppConfig.Base.dbTables, _conn).Add("SysAdmin", fields, 0);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if(check)
+            {
+                
+            }
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("SysAdmin", fields, Id);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("SysAdmin", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Delete("SysAdmin", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Sort("SysAdmin", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count;i++ )
+            {
+                JsonData dr = list[i];
+                
+                db.SysAdmin.Add(new SysAdmin()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+                    
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+            
+        // }
+    }
+}

+ 244 - 0
Service/Bs/SystemSetService.cs

@@ -0,0 +1,244 @@
+/*
+ * 系统设置
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Bs;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Bs
+{
+    public class SystemSetService
+    {
+        string _conn = "";
+        public SystemSetService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("WebUrl"); //网站地址
+fields.Add("WebName"); //网站名称
+fields.Add("UploadMaxSize"); //允许最大上传
+fields.Add("UploadAutoZoomWidth"); //自动缩略图宽
+fields.Add("UploadAutoZoomHeight"); //自动缩略图高
+fields.Add("UploadAutoWater"); //自动水印
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("SystemSet", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("WebUrl"); //网站地址
+fields.Add("WebName"); //网站名称
+fields.Add("UploadMaxSize"); //允许最大上传
+fields.Add("UploadAutoZoomWidth"); //自动缩略图宽
+fields.Add("UploadAutoZoomHeight"); //自动缩略图高
+fields.Add("UploadAutoWater"); //自动水印
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("SystemSet", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public SystemSet Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            SystemSet editData = db.SystemSet.FirstOrDefault(m => m.Id == Id) ?? new SystemSet();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from SystemSet where 1=1" + condition, _conn);
+            if(dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.SystemSet.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if(check)
+            {
+                if (!function.IsInt(fields["UploadMaxSize"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写正确的允许最大上传" };
+}
+if (string.IsNullOrEmpty(fields["UploadAutoZoomWidth"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写自动缩略图宽" };
+}
+if (!function.IsInt(fields["UploadAutoZoomWidth"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写正确的自动缩略图宽" };
+}
+if (string.IsNullOrEmpty(fields["UploadAutoZoomHeight"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写自动缩略图高" };
+}
+if (!function.IsInt(fields["UploadAutoZoomHeight"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写正确的自动缩略图高" };
+}
+
+            }
+            int Id = new DbService(AppConfig.Base.dbTables, _conn).Add("SystemSet", fields, 0);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if(check)
+            {
+                if (!function.IsInt(fields["UploadMaxSize"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写正确的允许最大上传" };
+}
+if (string.IsNullOrEmpty(fields["UploadAutoZoomWidth"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写自动缩略图宽" };
+}
+if (!function.IsInt(fields["UploadAutoZoomWidth"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写正确的自动缩略图宽" };
+}
+if (string.IsNullOrEmpty(fields["UploadAutoZoomHeight"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写自动缩略图高" };
+}
+if (!function.IsInt(fields["UploadAutoZoomHeight"].ToString()))
+{
+    return new AppResultJson() { Status = "-1", Info = "请填写正确的自动缩略图高" };
+}
+
+            }
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("SystemSet", fields, Id);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("SystemSet", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Delete("SystemSet", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Sort("SystemSet", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count;i++ )
+            {
+                JsonData dr = list[i];
+                
+                db.SystemSet.Add(new SystemSet()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+                    
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+            
+        // }
+    }
+}

+ 202 - 0
Service/Bs/UploadParamsService.cs

@@ -0,0 +1,202 @@
+/*
+ * 上传配置项
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Bs;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Bs
+{
+    public class UploadParamsService
+    {
+        string _conn = "";
+        public UploadParamsService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("TableName"); //表名
+fields.Add("ColumnName"); //字段名
+fields.Add("ColumnEnName"); //字段英文明
+fields.Add("ParamString"); //参数
+fields.Add("TableEnName"); //表英文名
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("UploadParams", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("TableName"); //表名
+fields.Add("ColumnName"); //字段名
+fields.Add("ColumnEnName"); //字段英文明
+fields.Add("ParamString"); //参数
+fields.Add("TableEnName"); //表英文名
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.dbTables, _conn).IndexData("UploadParams", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public UploadParams Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            UploadParams editData = db.UploadParams.FirstOrDefault(m => m.Id == Id) ?? new UploadParams();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from UploadParams where 1=1" + condition, _conn);
+            if(dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.UploadParams.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if(check)
+            {
+                
+            }
+            int Id = new DbService(AppConfig.Base.dbTables, _conn).Add("UploadParams", fields, 0);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if(check)
+            {
+                
+            }
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("UploadParams", fields, Id);
+            return new AppResultJson(){ Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.dbTables, _conn).Edit("UploadParams", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Delete("UploadParams", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.dbTables, _conn).Sort("UploadParams", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count;i++ )
+            {
+                JsonData dr = list[i];
+                
+                db.UploadParams.Add(new UploadParams()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+                    
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+            
+        // }
+    }
+}

+ 216 - 0
Service/Main/ActiveRewardService.cs

@@ -0,0 +1,216 @@
+/*
+ * 激活奖励记录
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Main;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Main
+{
+    public class ActiveRewardService
+    {
+        string _conn = "";
+        public ActiveRewardService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("UserId"); //创客
+            fields.Add("MerchantId"); //商户
+            fields.Add("RewardAmount"); //奖励金额
+            fields.Add("BrandId"); //品牌
+            fields.Add("MerUserNav"); //商户直属创客父级
+            fields.Add("KqMerNo"); //渠道商户编号
+            fields.Add("KqSnNo"); //渠道SN号
+            fields.Add("SnType"); //机具类型
+            fields.Add("SnApplyUserId"); //机具申请创客
+            fields.Add("ActType"); //激活类型
+            fields.Add("SnStoreId"); //SN仓库
+            fields.Add("ActDate"); //激活时间
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.mainTables, _conn).IndexData("ActiveReward", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("UserId"); //创客
+            fields.Add("MerchantId"); //商户
+            fields.Add("RewardAmount"); //奖励金额
+            fields.Add("BrandId"); //品牌
+            fields.Add("MerUserNav"); //商户直属创客父级
+            fields.Add("KqMerNo"); //渠道商户编号
+            fields.Add("KqSnNo"); //渠道SN号
+            fields.Add("SnType"); //机具类型
+            fields.Add("SnApplyUserId"); //机具申请创客
+            fields.Add("ActType"); //激活类型
+            fields.Add("SnStoreId"); //SN仓库
+            fields.Add("ActDate"); //激活时间
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.mainTables, _conn).IndexData("ActiveReward", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public ActiveReward Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            ActiveReward editData = db.ActiveReward.FirstOrDefault(m => m.Id == Id) ?? new ActiveReward();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from ActiveReward where 1=1" + condition, _conn);
+            if (dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.ActiveReward.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if (check)
+            {
+
+            }
+            int Id = new DbService(AppConfig.Base.mainTables, _conn).Add("ActiveReward", fields, 0);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if (check)
+            {
+
+            }
+            new DbService(AppConfig.Base.mainTables, _conn).Edit("ActiveReward", fields, Id);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.mainTables, _conn).Edit("ActiveReward", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.mainTables, _conn).Delete("ActiveReward", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.mainTables, _conn).Sort("ActiveReward", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count; i++)
+            {
+                JsonData dr = list[i];
+
+                db.ActiveReward.Add(new ActiveReward()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+
+        // }
+    }
+}

+ 202 - 0
Service/Main/ActivityEnrolRecordService.cs

@@ -0,0 +1,202 @@
+/*
+ * 活动报名记录
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Main;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Main
+{
+    public class ActivityEnrolRecordService
+    {
+        string _conn = "";
+        public ActivityEnrolRecordService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("ActId"); //活动
+            fields.Add("UserId"); //创客
+            fields.Add("EnrolMonth"); //报名有效月份
+            fields.Add("EffectStartTime"); //报名有效开始时间
+            fields.Add("EffectEndTime"); //报名有效结束时间
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.mainTables, _conn).IndexData("ActivityEnrolRecord", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("ActId"); //活动
+            fields.Add("UserId"); //创客
+            fields.Add("EnrolMonth"); //报名有效月份
+            fields.Add("EffectStartTime"); //报名有效开始时间
+            fields.Add("EffectEndTime"); //报名有效结束时间
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.mainTables, _conn).IndexData("ActivityEnrolRecord", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public ActivityEnrolRecord Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            ActivityEnrolRecord editData = db.ActivityEnrolRecord.FirstOrDefault(m => m.Id == Id) ?? new ActivityEnrolRecord();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from ActivityEnrolRecord where 1=1" + condition, _conn);
+            if (dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.ActivityEnrolRecord.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if (check)
+            {
+
+            }
+            int Id = new DbService(AppConfig.Base.mainTables, _conn).Add("ActivityEnrolRecord", fields, 0);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if (check)
+            {
+
+            }
+            new DbService(AppConfig.Base.mainTables, _conn).Edit("ActivityEnrolRecord", fields, Id);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.mainTables, _conn).Edit("ActivityEnrolRecord", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.mainTables, _conn).Delete("ActivityEnrolRecord", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.mainTables, _conn).Sort("ActivityEnrolRecord", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count; i++)
+            {
+                JsonData dr = list[i];
+
+                db.ActivityEnrolRecord.Add(new ActivityEnrolRecord()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+
+        // }
+    }
+}

+ 210 - 0
Service/Main/ActivityInfoService.cs

@@ -0,0 +1,210 @@
+/*
+ * 活动信息
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Main;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Main
+{
+    public class ActivityInfoService
+    {
+        string _conn = "";
+        public ActivityInfoService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("ActCode"); //活动编号
+            fields.Add("ActType"); //活动类型
+            fields.Add("ActName"); //活动名称
+            fields.Add("BrandId"); //产品类型
+            fields.Add("LimitTopBuddy"); //顶级创客设置
+            fields.Add("IsTop"); //是否置顶
+            fields.Add("EffectStartDate"); //活动开始时间
+            fields.Add("EffectEndDate"); //活动结束时间
+            fields.Add("Remark"); //备注
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.mainTables, _conn).IndexData("ActivityInfo", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("ActCode"); //活动编号
+            fields.Add("ActType"); //活动类型
+            fields.Add("ActName"); //活动名称
+            fields.Add("BrandId"); //产品类型
+            fields.Add("LimitTopBuddy"); //顶级创客设置
+            fields.Add("IsTop"); //是否置顶
+            fields.Add("EffectStartDate"); //活动开始时间
+            fields.Add("EffectEndDate"); //活动结束时间
+            fields.Add("Remark"); //备注
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.mainTables, _conn).IndexData("ActivityInfo", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public ActivityInfo Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            ActivityInfo editData = db.ActivityInfo.FirstOrDefault(m => m.Id == Id) ?? new ActivityInfo();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from ActivityInfo where 1=1" + condition, _conn);
+            if (dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.ActivityInfo.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if (check)
+            {
+
+            }
+            int Id = new DbService(AppConfig.Base.mainTables, _conn).Add("ActivityInfo", fields, 0);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if (check)
+            {
+
+            }
+            new DbService(AppConfig.Base.mainTables, _conn).Edit("ActivityInfo", fields, Id);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.mainTables, _conn).Edit("ActivityInfo", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.mainTables, _conn).Delete("ActivityInfo", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.mainTables, _conn).Sort("ActivityInfo", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count; i++)
+            {
+                JsonData dr = list[i];
+
+                db.ActivityInfo.Add(new ActivityInfo()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+
+        // }
+    }
+}

+ 206 - 0
Service/Main/ActivityPrizeDetailService.cs

@@ -0,0 +1,206 @@
+/*
+ * 活动奖励明细
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Main;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Main
+{
+    public class ActivityPrizeDetailService
+    {
+        string _conn = "";
+        public ActivityPrizeDetailService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("TradeAmt"); //合伙人团队交易总金额
+            fields.Add("CheckStatus"); //同步状态
+            fields.Add("TradeMonth"); //交易月份
+            fields.Add("OtherProdCreditTradeAmt"); //其他组合计算产品贷记卡交易总金额
+            fields.Add("CreditTradeAmt"); //合伙人团队贷记卡交易总金额
+            fields.Add("ActRewardAmt"); //合伙人团队交易活动奖励金额
+            fields.Add("ProfitRate"); //活动奖励对应分成比例
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.mainTables, _conn).IndexData("ActivityPrizeDetail", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("TradeAmt"); //合伙人团队交易总金额
+            fields.Add("CheckStatus"); //同步状态
+            fields.Add("TradeMonth"); //交易月份
+            fields.Add("OtherProdCreditTradeAmt"); //其他组合计算产品贷记卡交易总金额
+            fields.Add("CreditTradeAmt"); //合伙人团队贷记卡交易总金额
+            fields.Add("ActRewardAmt"); //合伙人团队交易活动奖励金额
+            fields.Add("ProfitRate"); //活动奖励对应分成比例
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.mainTables, _conn).IndexData("ActivityPrizeDetail", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public ActivityPrizeDetail Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            ActivityPrizeDetail editData = db.ActivityPrizeDetail.FirstOrDefault(m => m.Id == Id) ?? new ActivityPrizeDetail();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from ActivityPrizeDetail where 1=1" + condition, _conn);
+            if (dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.ActivityPrizeDetail.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if (check)
+            {
+
+            }
+            int Id = new DbService(AppConfig.Base.mainTables, _conn).Add("ActivityPrizeDetail", fields, 0);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if (check)
+            {
+
+            }
+            new DbService(AppConfig.Base.mainTables, _conn).Edit("ActivityPrizeDetail", fields, Id);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.mainTables, _conn).Edit("ActivityPrizeDetail", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.mainTables, _conn).Delete("ActivityPrizeDetail", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.mainTables, _conn).Sort("ActivityPrizeDetail", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count; i++)
+            {
+                JsonData dr = list[i];
+
+                db.ActivityPrizeDetail.Add(new ActivityPrizeDetail()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+
+        // }
+    }
+}

+ 198 - 0
Service/Main/ActivityRedPackageJoinsService.cs

@@ -0,0 +1,198 @@
+/*
+ * 红包活动-参与记录
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Main;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Main
+{
+    public class ActivityRedPackageJoinsService
+    {
+        string _conn = "";
+        public ActivityRedPackageJoinsService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("UserId"); //创客
+            fields.Add("ActivityDate"); //期数
+            fields.Add("PrizeAmt"); //中奖金额
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.mainTables, _conn).IndexData("ActivityRedPackageJoins", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("UserId"); //创客
+            fields.Add("ActivityDate"); //期数
+            fields.Add("PrizeAmt"); //中奖金额
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.mainTables, _conn).IndexData("ActivityRedPackageJoins", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public ActivityRedPackageJoins Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            ActivityRedPackageJoins editData = db.ActivityRedPackageJoins.FirstOrDefault(m => m.Id == Id) ?? new ActivityRedPackageJoins();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from ActivityRedPackageJoins where 1=1" + condition, _conn);
+            if (dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.ActivityRedPackageJoins.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if (check)
+            {
+
+            }
+            int Id = new DbService(AppConfig.Base.mainTables, _conn).Add("ActivityRedPackageJoins", fields, 0);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if (check)
+            {
+
+            }
+            new DbService(AppConfig.Base.mainTables, _conn).Edit("ActivityRedPackageJoins", fields, Id);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.mainTables, _conn).Edit("ActivityRedPackageJoins", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.mainTables, _conn).Delete("ActivityRedPackageJoins", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.mainTables, _conn).Sort("ActivityRedPackageJoins", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count; i++)
+            {
+                JsonData dr = list[i];
+
+                db.ActivityRedPackageJoins.Add(new ActivityRedPackageJoins()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+
+        // }
+    }
+}

+ 198 - 0
Service/Main/ActivityRedPackageStockService.cs

@@ -0,0 +1,198 @@
+/*
+ * 红包活动-预定红包库
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Main;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Main
+{
+    public class ActivityRedPackageStockService
+    {
+        string _conn = "";
+        public ActivityRedPackageStockService()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("UserId"); //创客
+            fields.Add("PrizeAmt"); //红包金额
+            fields.Add("ActivityDate"); //期数
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.mainTables, _conn).IndexData("ActivityRedPackageStock", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("UserId"); //创客
+            fields.Add("PrizeAmt"); //红包金额
+            fields.Add("ActivityDate"); //期数
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.mainTables, _conn).IndexData("ActivityRedPackageStock", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public ActivityRedPackageStock Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            ActivityRedPackageStock editData = db.ActivityRedPackageStock.FirstOrDefault(m => m.Id == Id) ?? new ActivityRedPackageStock();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from ActivityRedPackageStock where 1=1" + condition, _conn);
+            if (dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.ActivityRedPackageStock.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if (check)
+            {
+
+            }
+            int Id = new DbService(AppConfig.Base.mainTables, _conn).Add("ActivityRedPackageStock", fields, 0);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if (check)
+            {
+
+            }
+            new DbService(AppConfig.Base.mainTables, _conn).Edit("ActivityRedPackageStock", fields, Id);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.mainTables, _conn).Edit("ActivityRedPackageStock", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.mainTables, _conn).Delete("ActivityRedPackageStock", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.mainTables, _conn).Sort("ActivityRedPackageStock", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count; i++)
+            {
+                JsonData dr = list[i];
+
+                db.ActivityRedPackageStock.Add(new ActivityRedPackageStock()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+
+        // }
+    }
+}

+ 200 - 0
Service/Main/ActivityRedPackageTop10Service.cs

@@ -0,0 +1,200 @@
+/*
+ * 红包活动-排行榜
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.Models.Main;
+using Library;
+using LitJson;
+
+namespace MySystem.Service.Main
+{
+    public class ActivityRedPackageTop10Service
+    {
+        string _conn = "";
+        public ActivityRedPackageTop10Service()
+        {
+            _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        /// <summary>
+        /// 查询列表
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("UserId"); //创客
+            fields.Add("PrizeAmt"); //金额
+            fields.Add("TimeNum"); //次数
+            fields.Add("Kind"); //类别
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.mainTables, _conn).IndexData("ActivityRedPackageTop10", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列
+            fields.Add("Id");
+            fields.Add("CreateDate"); //添加时间
+            fields.Add("Status"); //状态
+            fields.Add("UserId"); //创客
+            fields.Add("PrizeAmt"); //金额
+            fields.Add("TimeNum"); //次数
+            fields.Add("Kind"); //类别
+
+            Dictionary<string, object> obj = new DbService(AppConfig.Base.mainTables, _conn).IndexData("ActivityRedPackageTop10", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public ActivityRedPackageTop10 Query(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            ActivityRedPackageTop10 editData = db.ActivityRedPackageTop10.FirstOrDefault(m => m.Id == Id) ?? new ActivityRedPackageTop10();
+            db.Dispose();
+            return editData;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public int Count(string condition = "")
+        {
+            int result = 0;
+            DataTable dt = CustomerSqlConn.dtable("select count(Id) from ActivityRedPackageTop10 where 1=1" + condition, _conn);
+            if (dt.Rows.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public bool Exist(int Id)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            bool check = db.ActivityRedPackageTop10.Any(m => m.Id == Id);
+            db.Dispose();
+            return check;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if (check)
+            {
+
+            }
+            int Id = new DbService(AppConfig.Base.mainTables, _conn).Add("ActivityRedPackageTop10", fields, 0);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if (check)
+            {
+
+            }
+            new DbService(AppConfig.Base.mainTables, _conn).Edit("ActivityRedPackageTop10", fields, Id);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbService(AppConfig.Base.mainTables, _conn).Edit("ActivityRedPackageTop10", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public void Delete(int Id)
+        {
+            new DbService(AppConfig.Base.mainTables, _conn).Delete("ActivityRedPackageTop10", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public void Sort(int Id, int Sort)
+        {
+            new DbService(AppConfig.Base.mainTables, _conn).Sort("ActivityRedPackageTop10", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public void Import(string ExcelData)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count; i++)
+            {
+                JsonData dr = list[i];
+
+                db.ActivityRedPackageTop10.Add(new ActivityRedPackageTop10()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+
+                });
+                db.SaveChanges();
+            }
+            db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+
+        // }
+    }
+}

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно