DuGuYang 2 жил өмнө
parent
commit
4a03bd8c18
39 өөрчлөгдсөн 3637 нэмэгдсэн , 1297 устгасан
  1. 3 2
      Areas/Api/Controllers/BaseController.cs
  2. 117 0
      Areas/Api/Controllers/SysAdminController.cs
  3. 3 1
      Config/Base.cs
  4. 26 0
      Models/Bs/Advertisment.cs
  5. 30 0
      Models/Bs/Col.cs
  6. 11 0
      Models/Bs/MenuRight.cs
  7. 28 0
      Models/Bs/MsgBlackList.cs
  8. 34 0
      Models/Bs/MsgPersonal.cs
  9. 37 0
      Models/Bs/MsgPlacard.cs
  10. 25 0
      Models/Bs/MsgPlacardRead.cs
  11. 31 0
      Models/Bs/MsgPush.cs
  12. 38 0
      Models/Bs/MsgSms.cs
  13. 27 0
      Models/Bs/MsgSmsSet.cs
  14. 29 0
      Models/Bs/MsgTemplate.cs
  15. 26 0
      Models/Bs/OperateLog.cs
  16. 23 0
      Models/Bs/OperateRightList.cs
  17. 24 0
      Models/Bs/PageInfo.cs
  18. 45 0
      Models/Bs/PublicAccountSet.cs
  19. 19 0
      Models/Bs/RightDic.cs
  20. 26 0
      Models/Bs/SysAdmin.cs
  21. 24 0
      Models/Bs/SysAdminRole.cs
  22. 13 0
      Models/Bs/SysLog.cs
  23. 41 0
      Models/Bs/SystemSet.cs
  24. 26 0
      Models/Bs/UploadParams.cs
  25. 1613 0
      Models/Bs/WebCMSEntities.cs
  26. 107 107
      Service/Main1/ConsumerOrdersService.cs
  27. 291 291
      Service/Main1/MerchantAddInfoService.cs
  28. 83 83
      Service/Main1/MerchantDepositBackService.cs
  29. 59 59
      Service/Main1/MerchantDepositOrderService.cs
  30. 15 15
      Service/Main1/MerchantDepositReturnsService.cs
  31. 91 91
      Service/Main1/MerchantInfoService.cs
  32. 107 107
      Service/Main2/ConsumerOrdersService.cs
  33. 291 291
      Service/Main2/MerchantAddInfoService.cs
  34. 83 83
      Service/Main2/MerchantDepositBackService.cs
  35. 59 59
      Service/Main2/MerchantDepositOrderService.cs
  36. 15 15
      Service/Main2/MerchantDepositReturnsService.cs
  37. 91 91
      Service/Main2/MerchantInfoService.cs
  38. 25 2
      Startup.cs
  39. 1 0
      appsettings.Development.json

+ 3 - 2
Areas/Api/Controllers/BaseController.cs

@@ -22,8 +22,9 @@ namespace MySystem.Areas.Api.Controllers
         {
             _accessor = accessor;
         }
-        public Models.Main1.WebCMSEntities maindb = new Models.Main1.WebCMSEntities();
-        public Models.Main2.WebCMSEntities main1db = new Models.Main2.WebCMSEntities();
+        public Models.Main1.WebCMSEntities bsdb = new Models.Main1.WebCMSEntities();
+        public Models.Main1.WebCMSEntities main1db = new Models.Main1.WebCMSEntities();
+        public Models.Main2.WebCMSEntities main2db = new Models.Main2.WebCMSEntities();
 
         public static string ApiKey = "G6H7@J8%";
         public static string Host = Library.ConfigurationManager.AppSettings["Host"].ToString();

+ 117 - 0
Areas/Api/Controllers/SysAdminController.cs

@@ -0,0 +1,117 @@
+// /*
+//  * 后台管理员
+//  */
+
+// using System;
+// using System.Web;
+// using System.Collections.Generic;
+// using Microsoft.AspNetCore.Mvc;
+// using Microsoft.AspNetCore.Http;
+// using MySystem.Models.Bs;
+// using Library;
+// using LitJson;
+// using Microsoft.AspNetCore.Authorization;
+// using MySystem.Service.Bs;
+
+// namespace MySystem.Areas.Api.Controllers.v1
+// {
+//     [Area("Api")]
+//     [Route("Api/v1/[controller]/[action]")]
+//     public class SysAdminController : BaseController
+//     {
+//         public SysAdminController(IHttpContextAccessor accessor) : base(accessor)
+//         {
+//         }
+
+//         #region 登录
+
+//         public JsonResult Login(string value)
+//         {
+//             value = PublicFunction.DesDecrypt(value);
+//             JsonData jsonObj = JsonMapper.ToObject(value);
+//             string userName = jsonObj["userName"].ToString(); //账号
+//             string pwd = jsonObj["pwd"].ToString(); //密码
+//             SysAdminNew sys = SysAdminNewService.Query(userName, function.MD5_32(pwd));
+//             if(sys.Id == 0)
+//             {
+//                 return Json(new AppResultJson() { Status = "-1", Info = "账号或密码不正确" });
+//             }
+//             int RoleId = int.Parse(function.CheckInt(sys.Role));
+//             SysAdminRoleNew Role = SysAdminRoleNewService.Query(RoleId);
+//             string RightInfo = function.CheckNull(Role.RightInfo);
+//             Dictionary<string, object> obj = new Dictionary<string, object>(); //返回字段
+//             obj.Add("rightList", new AdminRightList().GetRight(sys.Role, RightInfo)); //权限列表
+//             obj.Add("apiToken", PublicFunction.AppToken(sys.AdminName)); //后台所有接口API所需的token
+//             obj.Add("apiTokenExpiredDate", DateTime.Now.AddDays(10).ToString("yyyy-MM-dd HH:mm:ss"));
+//             string token = dbconn.Encrypt3DES(sys.Id.ToString() + "-" + function.ConvertDateTimeInt(DateTime.Now));
+//             RefreshTokens check = RefreshTokensService.Query(sys.Id);
+//             if(check.UserId == 0)
+//             {
+//                 Dictionary<string, object> Fields = new Dictionary<string, object>();
+//                 Fields.Add("UserId", sys.Id);
+//                 Fields.Add("ExpiredDate", DateTime.Now.AddDays(10));
+//                 Fields.Add("RefreshToken", token);
+//                 RefreshTokensService.Add(Fields);
+//             }
+//             else
+//             {
+//                 Dictionary<string, object> Fields = new Dictionary<string, object>();
+//                 Fields.Add("ExpiredDate", DateTime.Now.AddDays(10));
+//                 Fields.Add("RefreshToken", token);
+//                 RefreshTokensService.Edit(Fields, sys.Id);
+//             }
+//             List<string> roles = new List<string>();
+//             roles.Add(sys.Role);
+//             obj.Add("roles", roles);
+//             obj.Add("realName", sys.RealName);
+//             obj.Add("refreshToken", token); //主token,用于刷新apiToken
+//             AppConfig.LoginSession.sysId = sys.Id;
+//             AppConfig.LoginSession.sysAdminName = sys.AdminName;
+//             AppConfig.LoginSession.sysRealName = sys.RealName;
+//             return Json(new AppResultJson() { Status = "1", Info = "", Data = obj });
+//         }
+
+//         #endregion
+
+//         #region 刷新token
+
+//         public JsonResult RefreshToken(string value)
+//         {
+//             value = PublicFunction.DesDecrypt(value);
+//             JsonData jsonObj = JsonMapper.ToObject(value);
+//             string refreshToken = jsonObj["refreshToken"].ToString(); //账号        
+//             Dictionary<string, object> obj = new Dictionary<string, object>(); //返回字段
+//             string[] data = dbconn.Decrypt3DES(refreshToken).Split('-');
+//             int Id = int.Parse(data[0]);
+//             SysAdminNew sys = SysAdminNewService.Query(Id);
+//             if(sys.Id == 0)
+//             {
+//                 return Json(new AppResultJson() { Status = "-1", Info = "刷新失败" });
+//             }
+//             obj.Add("apiToken", PublicFunction.AppToken(sys.AdminName)); //后台所有接口API所需的token
+//             obj.Add("apiTokenExpiredDate", DateTime.Now.AddDays(10));
+//             string token = dbconn.Encrypt3DES(sys.Id.ToString() + "-" + function.ConvertDateTimeInt(DateTime.Now));
+//             RefreshTokensNew check = RefreshTokensNewService.Query(sys.Id);
+//             if(check.UserId == 0)
+//             {
+//                 Dictionary<string, object> Fields = new Dictionary<string, object>();
+//                 Fields.Add("UserId", sys.Id);
+//                 Fields.Add("ExpiredDate", DateTime.Now.AddDays(10));
+//                 Fields.Add("RefreshToken", token);
+//                 RefreshTokensNewService.Add(Fields);
+//             }
+//             else
+//             {
+//                 Dictionary<string, object> Fields = new Dictionary<string, object>();
+//                 Fields.Add("ExpiredDate", DateTime.Now.AddDays(10));
+//                 Fields.Add("RefreshToken", token);
+//                 RefreshTokensNewService.Edit(Fields, sys.Id);
+//             }
+//             obj.Add("refreshToken", token); //主token,用于刷新apiToken
+//             return Json(new AppResultJson() { Status = "1", Info = "", Data = obj });
+//         }
+
+//         #endregion
+
+//     }
+// }

+ 3 - 1
Config/Base.cs

@@ -6,7 +6,8 @@ namespace AppConfig
     public class Base
     {
         public static string ApiKey = "G6H7@J8%";
-        public static string BsSqlConnStr = ConfigurationManager.AppSettings["ConfigSqlConnStr"].ToString();
+        public static string ConfigSqlConnStr = ConfigurationManager.AppSettings["ConfigSqlConnStr"].ToString();
+        public static string BsSqlConnStr = ConfigurationManager.AppSettings["BsSqlConnStr"].ToString();
         public static string SqlConnStr = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
         public static string SqlConnStr1 = ConfigurationManager.AppSettings["SqlConnStr1"].ToString();
         public static string SqlConnStr2 = ConfigurationManager.AppSettings["SqlConnStr2"].ToString();
@@ -16,6 +17,7 @@ namespace AppConfig
         public static string defaultImage = Library.ConfigurationManager.AppSettings["Host"].ToString() + "/skin/app/default/static/images/default.jpg";
         #region 数据库结构
         public static Dictionary<string, Dictionary<string, string>> dbTables = new Dictionary<string, Dictionary<string, string>>();
+        public static Dictionary<string, Dictionary<string, string>> bsTables = new Dictionary<string, Dictionary<string, string>>();
         public static Dictionary<string, Dictionary<string, string>> main1Tables = new Dictionary<string, Dictionary<string, string>>();
         public static Dictionary<string, Dictionary<string, string>> main2Tables = new Dictionary<string, Dictionary<string, string>>();
         public static Dictionary<string, Dictionary<string, string>> configTables = new Dictionary<string, Dictionary<string, string>>();

+ 26 - 0
Models/Bs/Advertisment.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Bs
+{
+    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; }
+    }
+}

+ 30 - 0
Models/Bs/Col.cs

@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Bs
+{
+    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; }
+    }
+}

+ 11 - 0
Models/Bs/MenuRight.cs

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

+ 28 - 0
Models/Bs/MsgBlackList.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Bs
+{
+    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/Bs/MsgPersonal.cs

@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Bs
+{
+    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/Bs/MsgPlacard.cs

@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Bs
+{
+    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/Bs/MsgPlacardRead.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Bs
+{
+    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/Bs/MsgPush.cs

@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Bs
+{
+    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/Bs/MsgSms.cs

@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Bs
+{
+    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/Bs/MsgSmsSet.cs

@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Bs
+{
+    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/Bs/MsgTemplate.cs

@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Bs
+{
+    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; }
+    }
+}

+ 26 - 0
Models/Bs/OperateLog.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Bs
+{
+    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/Bs/OperateRightList.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Bs
+{
+    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/Bs/PageInfo.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Bs
+{
+    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; }
+    }
+}

+ 45 - 0
Models/Bs/PublicAccountSet.cs

@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Bs
+{
+    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/Bs/RightDic.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Bs
+{
+    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; }
+    }
+}

+ 26 - 0
Models/Bs/SysAdmin.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Bs
+{
+    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 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/Bs/SysAdminRole.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Bs
+{
+    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/Bs/SysLog.cs

@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Bs
+{
+    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/Bs/SystemSet.cs

@@ -0,0 +1,41 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Bs
+{
+    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/Bs/UploadParams.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Bs
+{
+    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; }
+    }
+}

+ 1613 - 0
Models/Bs/WebCMSEntities.cs

@@ -0,0 +1,1613 @@
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata;
+
+namespace MySystem.Models.Bs
+{
+    public partial class WebCMSEntities : DbContext
+    {
+        public WebCMSEntities()
+        {
+        }
+
+        public WebCMSEntities(DbContextOptions<WebCMSEntities> options)
+            : base(options)
+        {
+        }
+
+        public virtual DbSet<Advertisment> Advertisment { get; set; }
+        public virtual DbSet<Col> Col { 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<OperateLog> OperateLog { get; set; }
+        public virtual DbSet<OperateRightList> OperateRightList { get; set; }
+        public virtual DbSet<PageInfo> PageInfo { get; set; }
+        public virtual DbSet<PublicAccountSet> PublicAccountSet { get; set; }
+        public virtual DbSet<RightDic> RightDic { 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; }
+
+        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
+        {
+            if (!optionsBuilder.IsConfigured)
+            {
+                optionsBuilder.UseMySql(Library.ConfigurationManager.AppSettings["BsSqlConnStr"].ToString(), x => x.ServerVersion("5.7.17-mysql"));
+            }
+        }
+
+        protected override void OnModelCreating(ModelBuilder modelBuilder)
+        {
+            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<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<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<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<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<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.LastLoginDate).HasColumnType("datetime");
+
+                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.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<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)");
+            });
+
+            OnModelCreatingPartial(modelBuilder);
+        }
+
+        partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
+    }
+}

+ 107 - 107
Service/Main1/ConsumerOrdersService.cs

@@ -66,7 +66,7 @@ namespace MySystem.Service.Main1
         public static ConsumerOrders Query(int Id)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("*", "ConsumerOrders", Id);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<ConsumerOrders>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -81,7 +81,7 @@ namespace MySystem.Service.Main1
         public static ConsumerOrders Query(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("*", "ConsumerOrders", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<ConsumerOrders>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -99,12 +99,12 @@ namespace MySystem.Service.Main1
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query(fields, "ConsumerOrders", condition);
             return obj;
         }
-        
+
         public static decimal Sum(string condition, string field)
         {
             decimal amount = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("Sum(" + field + ") " + field + "", "ConsumerOrders", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 amount = decimal.Parse(obj[field].ToString());
             }
@@ -120,7 +120,7 @@ namespace MySystem.Service.Main1
         {
             int result = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("count(" + field + ") " + field + "", "ConsumerOrders", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 result = int.Parse(function.CheckInt(obj[field].ToString()));
             }
@@ -135,7 +135,7 @@ namespace MySystem.Service.Main1
         public static bool Exist(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("1", "ConsumerOrders", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return true;
             }
@@ -149,60 +149,60 @@ namespace MySystem.Service.Main1
         /// <returns></returns>
         public static AppResultJson Add(Dictionary<string, object> fields, bool check = true)
         {
-            if(check)
+            if (check)
             {
                 if (string.IsNullOrEmpty(fields["MerchantId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商户" };
-}
-if (string.IsNullOrEmpty(fields["ConsumerId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写消费者" };
-}
-if (string.IsNullOrEmpty(fields["PayMode"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写支付方式" };
-}
-if (string.IsNullOrEmpty(fields["PayMoney"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写支付金额" };
-}
-if (!function.IsNum(fields["PayMoney"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的支付金额" };
-}
-if (string.IsNullOrEmpty(fields["ReturnMoney"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写已返金额" };
-}
-if (!function.IsNum(fields["ReturnMoney"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的已返金额" };
-}
-if (string.IsNullOrEmpty(fields["MaxDivi"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写最大分红" };
-}
-if (!function.IsNum(fields["MaxDivi"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的最大分红" };
-}
-if (string.IsNullOrEmpty(fields["CurDivi"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写当前分红" };
-}
-if (!function.IsNum(fields["CurDivi"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的当前分红" };
-}
-if (string.IsNullOrEmpty(fields["IsAct"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写是否活动" };
-}
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商户" };
+                }
+                if (string.IsNullOrEmpty(fields["ConsumerId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写消费者" };
+                }
+                if (string.IsNullOrEmpty(fields["PayMode"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写支付方式" };
+                }
+                if (string.IsNullOrEmpty(fields["PayMoney"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写支付金额" };
+                }
+                if (!function.IsNum(fields["PayMoney"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的支付金额" };
+                }
+                if (string.IsNullOrEmpty(fields["ReturnMoney"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写已返金额" };
+                }
+                if (!function.IsNum(fields["ReturnMoney"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的已返金额" };
+                }
+                if (string.IsNullOrEmpty(fields["MaxDivi"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写最大分红" };
+                }
+                if (!function.IsNum(fields["MaxDivi"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的最大分红" };
+                }
+                if (string.IsNullOrEmpty(fields["CurDivi"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写当前分红" };
+                }
+                if (!function.IsNum(fields["CurDivi"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的当前分红" };
+                }
+                if (string.IsNullOrEmpty(fields["IsAct"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写是否活动" };
+                }
 
             }
             int Id = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Add("ConsumerOrders", fields, 0);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -212,60 +212,60 @@ if (string.IsNullOrEmpty(fields["IsAct"].ToString()))
         /// <param name="Id">主键Id</param>
         public static AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
         {
-            if(check)
+            if (check)
             {
                 if (string.IsNullOrEmpty(fields["MerchantId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商户" };
-}
-if (string.IsNullOrEmpty(fields["ConsumerId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写消费者" };
-}
-if (string.IsNullOrEmpty(fields["PayMode"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写支付方式" };
-}
-if (string.IsNullOrEmpty(fields["PayMoney"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写支付金额" };
-}
-if (!function.IsNum(fields["PayMoney"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的支付金额" };
-}
-if (string.IsNullOrEmpty(fields["ReturnMoney"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写已返金额" };
-}
-if (!function.IsNum(fields["ReturnMoney"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的已返金额" };
-}
-if (string.IsNullOrEmpty(fields["MaxDivi"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写最大分红" };
-}
-if (!function.IsNum(fields["MaxDivi"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的最大分红" };
-}
-if (string.IsNullOrEmpty(fields["CurDivi"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写当前分红" };
-}
-if (!function.IsNum(fields["CurDivi"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的当前分红" };
-}
-if (string.IsNullOrEmpty(fields["IsAct"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写是否活动" };
-}
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商户" };
+                }
+                if (string.IsNullOrEmpty(fields["ConsumerId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写消费者" };
+                }
+                if (string.IsNullOrEmpty(fields["PayMode"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写支付方式" };
+                }
+                if (string.IsNullOrEmpty(fields["PayMoney"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写支付金额" };
+                }
+                if (!function.IsNum(fields["PayMoney"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的支付金额" };
+                }
+                if (string.IsNullOrEmpty(fields["ReturnMoney"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写已返金额" };
+                }
+                if (!function.IsNum(fields["ReturnMoney"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的已返金额" };
+                }
+                if (string.IsNullOrEmpty(fields["MaxDivi"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写最大分红" };
+                }
+                if (!function.IsNum(fields["MaxDivi"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的最大分红" };
+                }
+                if (string.IsNullOrEmpty(fields["CurDivi"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写当前分红" };
+                }
+                if (!function.IsNum(fields["CurDivi"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的当前分红" };
+                }
+                if (string.IsNullOrEmpty(fields["IsAct"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写是否活动" };
+                }
 
             }
             new DbServiceNew(AppConfig.Base.main1Tables, _conn).Edit("ConsumerOrders", fields, Id);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -309,12 +309,12 @@ if (string.IsNullOrEmpty(fields["IsAct"].ToString()))
             // for (int i = 1; i < list.Count;i++ )
             // {
             //     JsonData dr = list[i];
-                
+
             //     db.ConsumerOrders.Add(new ConsumerOrders()
             //     {
             //         CreateDate = DateTime.Now,
             //         UpdateDate = DateTime.Now,
-                    
+
             //     });
             //     db.SaveChanges();
             // }
@@ -329,7 +329,7 @@ if (string.IsNullOrEmpty(fields["IsAct"].ToString()))
         /// <returns></returns>
         // public static void ExportExcel(List<RelationData> relationData, string condition)
         // {
-            
+
         // }
     }
 }

+ 291 - 291
Service/Main1/MerchantAddInfoService.cs

@@ -66,7 +66,7 @@ namespace MySystem.Service.Main1
         public static MerchantAddInfo Query(int Id)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("*", "MerchantAddInfo", Id);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantAddInfo>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -81,7 +81,7 @@ namespace MySystem.Service.Main1
         public static MerchantAddInfo Query(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("*", "MerchantAddInfo", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantAddInfo>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -99,12 +99,12 @@ namespace MySystem.Service.Main1
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query(fields, "MerchantAddInfo", condition);
             return obj;
         }
-        
+
         public static decimal Sum(string condition, string field)
         {
             decimal amount = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("Sum(" + field + ") " + field + "", "MerchantAddInfo", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 amount = decimal.Parse(obj[field].ToString());
             }
@@ -120,7 +120,7 @@ namespace MySystem.Service.Main1
         {
             int result = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("count(" + field + ") " + field + "", "MerchantAddInfo", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 result = int.Parse(function.CheckInt(obj[field].ToString()));
             }
@@ -135,7 +135,7 @@ namespace MySystem.Service.Main1
         public static bool Exist(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("1", "MerchantAddInfo", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return true;
             }
@@ -149,152 +149,152 @@ namespace MySystem.Service.Main1
         /// <returns></returns>
         public static AppResultJson Add(Dictionary<string, object> fields, bool check = true)
         {
-            if(check)
+            if (check)
             {
                 if (string.IsNullOrEmpty(fields["BusinessCode"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写申请编号" };
-}
-if (string.IsNullOrEmpty(fields["ContactName"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写管理员姓名" };
-}
-if (string.IsNullOrEmpty(fields["ContactIdNumber"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写管理员身份证件号码" };
-}
-if (function.CheckIdCard(fields["ContactIdNumber"].ToString()) == "")
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的管理员身份证件号码" };
-}
-if (string.IsNullOrEmpty(fields["OpenId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写管理员微信openid" };
-}
-if (string.IsNullOrEmpty(fields["MobilePhone"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写联系手机" };
-}
-if (function.CheckMobile(fields["MobilePhone"].ToString()) == "")
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的联系手机" };
-}
-if (string.IsNullOrEmpty(fields["ContactEmail"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写联系邮箱" };
-}
-if (string.IsNullOrEmpty(fields["SubjectType"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写主体类型" };
-}
-if (string.IsNullOrEmpty(fields["LicenseNumber"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写统一社会信用代码" };
-}
-if (string.IsNullOrEmpty(fields["LegalPerson"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写个体户经营者/法人姓名" };
-}
-if (string.IsNullOrEmpty(fields["MerchantShortname"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商户简称" };
-}
-if (string.IsNullOrEmpty(fields["SalesScenesType"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写经营场景类型" };
-}
-if (string.IsNullOrEmpty(fields["BizStoreName"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写门店名称" };
-}
-if (string.IsNullOrEmpty(fields["BizAddressCode"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写门店省市编码" };
-}
-if (string.IsNullOrEmpty(fields["BizStoreAddress"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写门店地址" };
-}
-if (string.IsNullOrEmpty(fields["MpAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写服务商公众号APPID" };
-}
-if (string.IsNullOrEmpty(fields["MpSubAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商家公众号APPID" };
-}
-if (string.IsNullOrEmpty(fields["MiniProgramAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写服务商小程序APPID" };
-}
-if (string.IsNullOrEmpty(fields["MiniProgramSubAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商家小程序APPID" };
-}
-if (string.IsNullOrEmpty(fields["AppAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写服务商应用APPID" };
-}
-if (string.IsNullOrEmpty(fields["AppSubAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商家应用APPID" };
-}
-if (string.IsNullOrEmpty(fields["WebDomain"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写互联网网站域名" };
-}
-if (string.IsNullOrEmpty(fields["WebAppId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写互联网网站对应的商家APPID" };
-}
-if (string.IsNullOrEmpty(fields["SubCorpId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商家企业微信CorpID" };
-}
-if (string.IsNullOrEmpty(fields["SettlementId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写入驻结算规则ID" };
-}
-if (string.IsNullOrEmpty(fields["QualificationType"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写所属行业" };
-}
-if (string.IsNullOrEmpty(fields["ActivitiesId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写优惠费率活动ID" };
-}
-if (string.IsNullOrEmpty(fields["BankAccountType"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写账户类型" };
-}
-if (string.IsNullOrEmpty(fields["AccountName"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写开户名称" };
-}
-if (string.IsNullOrEmpty(fields["AccountBank"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写开户银行" };
-}
-if (string.IsNullOrEmpty(fields["BankAddressCode"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写开户银行省市编码" };
-}
-if (string.IsNullOrEmpty(fields["BankBranchId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写开户银行联行号" };
-}
-if (string.IsNullOrEmpty(fields["BankName"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写开户银行全称" };
-}
-if (string.IsNullOrEmpty(fields["AccountNumber"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写银行账号" };
-}
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写申请编号" };
+                }
+                if (string.IsNullOrEmpty(fields["ContactName"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写管理员姓名" };
+                }
+                if (string.IsNullOrEmpty(fields["ContactIdNumber"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写管理员身份证件号码" };
+                }
+                if (function.CheckIdCard(fields["ContactIdNumber"].ToString()) == "")
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的管理员身份证件号码" };
+                }
+                if (string.IsNullOrEmpty(fields["OpenId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写管理员微信openid" };
+                }
+                if (string.IsNullOrEmpty(fields["MobilePhone"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写联系手机" };
+                }
+                if (function.CheckMobile(fields["MobilePhone"].ToString()) == "")
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的联系手机" };
+                }
+                if (string.IsNullOrEmpty(fields["ContactEmail"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写联系邮箱" };
+                }
+                if (string.IsNullOrEmpty(fields["SubjectType"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写主体类型" };
+                }
+                if (string.IsNullOrEmpty(fields["LicenseNumber"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写统一社会信用代码" };
+                }
+                if (string.IsNullOrEmpty(fields["LegalPerson"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写个体户经营者/法人姓名" };
+                }
+                if (string.IsNullOrEmpty(fields["MerchantShortname"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商户简称" };
+                }
+                if (string.IsNullOrEmpty(fields["SalesScenesType"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写经营场景类型" };
+                }
+                if (string.IsNullOrEmpty(fields["BizStoreName"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写门店名称" };
+                }
+                if (string.IsNullOrEmpty(fields["BizAddressCode"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写门店省市编码" };
+                }
+                if (string.IsNullOrEmpty(fields["BizStoreAddress"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写门店地址" };
+                }
+                if (string.IsNullOrEmpty(fields["MpAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写服务商公众号APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["MpSubAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商家公众号APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["MiniProgramAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写服务商小程序APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["MiniProgramSubAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商家小程序APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["AppAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写服务商应用APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["AppSubAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商家应用APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["WebDomain"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写互联网网站域名" };
+                }
+                if (string.IsNullOrEmpty(fields["WebAppId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写互联网网站对应的商家APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["SubCorpId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商家企业微信CorpID" };
+                }
+                if (string.IsNullOrEmpty(fields["SettlementId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写入驻结算规则ID" };
+                }
+                if (string.IsNullOrEmpty(fields["QualificationType"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写所属行业" };
+                }
+                if (string.IsNullOrEmpty(fields["ActivitiesId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写优惠费率活动ID" };
+                }
+                if (string.IsNullOrEmpty(fields["BankAccountType"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写账户类型" };
+                }
+                if (string.IsNullOrEmpty(fields["AccountName"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写开户名称" };
+                }
+                if (string.IsNullOrEmpty(fields["AccountBank"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写开户银行" };
+                }
+                if (string.IsNullOrEmpty(fields["BankAddressCode"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写开户银行省市编码" };
+                }
+                if (string.IsNullOrEmpty(fields["BankBranchId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写开户银行联行号" };
+                }
+                if (string.IsNullOrEmpty(fields["BankName"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写开户银行全称" };
+                }
+                if (string.IsNullOrEmpty(fields["AccountNumber"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写银行账号" };
+                }
 
             }
             int Id = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Add("MerchantAddInfo", fields, 0);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -304,152 +304,152 @@ if (string.IsNullOrEmpty(fields["AccountNumber"].ToString()))
         /// <param name="Id">主键Id</param>
         public static AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
         {
-            if(check)
+            if (check)
             {
                 if (string.IsNullOrEmpty(fields["BusinessCode"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写申请编号" };
-}
-if (string.IsNullOrEmpty(fields["ContactName"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写管理员姓名" };
-}
-if (string.IsNullOrEmpty(fields["ContactIdNumber"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写管理员身份证件号码" };
-}
-if (function.CheckIdCard(fields["ContactIdNumber"].ToString()) == "")
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的管理员身份证件号码" };
-}
-if (string.IsNullOrEmpty(fields["OpenId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写管理员微信openid" };
-}
-if (string.IsNullOrEmpty(fields["MobilePhone"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写联系手机" };
-}
-if (function.CheckMobile(fields["MobilePhone"].ToString()) == "")
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的联系手机" };
-}
-if (string.IsNullOrEmpty(fields["ContactEmail"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写联系邮箱" };
-}
-if (string.IsNullOrEmpty(fields["SubjectType"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写主体类型" };
-}
-if (string.IsNullOrEmpty(fields["LicenseNumber"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写统一社会信用代码" };
-}
-if (string.IsNullOrEmpty(fields["LegalPerson"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写个体户经营者/法人姓名" };
-}
-if (string.IsNullOrEmpty(fields["MerchantShortname"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商户简称" };
-}
-if (string.IsNullOrEmpty(fields["SalesScenesType"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写经营场景类型" };
-}
-if (string.IsNullOrEmpty(fields["BizStoreName"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写门店名称" };
-}
-if (string.IsNullOrEmpty(fields["BizAddressCode"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写门店省市编码" };
-}
-if (string.IsNullOrEmpty(fields["BizStoreAddress"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写门店地址" };
-}
-if (string.IsNullOrEmpty(fields["MpAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写服务商公众号APPID" };
-}
-if (string.IsNullOrEmpty(fields["MpSubAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商家公众号APPID" };
-}
-if (string.IsNullOrEmpty(fields["MiniProgramAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写服务商小程序APPID" };
-}
-if (string.IsNullOrEmpty(fields["MiniProgramSubAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商家小程序APPID" };
-}
-if (string.IsNullOrEmpty(fields["AppAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写服务商应用APPID" };
-}
-if (string.IsNullOrEmpty(fields["AppSubAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商家应用APPID" };
-}
-if (string.IsNullOrEmpty(fields["WebDomain"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写互联网网站域名" };
-}
-if (string.IsNullOrEmpty(fields["WebAppId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写互联网网站对应的商家APPID" };
-}
-if (string.IsNullOrEmpty(fields["SubCorpId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商家企业微信CorpID" };
-}
-if (string.IsNullOrEmpty(fields["SettlementId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写入驻结算规则ID" };
-}
-if (string.IsNullOrEmpty(fields["QualificationType"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写所属行业" };
-}
-if (string.IsNullOrEmpty(fields["ActivitiesId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写优惠费率活动ID" };
-}
-if (string.IsNullOrEmpty(fields["BankAccountType"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写账户类型" };
-}
-if (string.IsNullOrEmpty(fields["AccountName"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写开户名称" };
-}
-if (string.IsNullOrEmpty(fields["AccountBank"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写开户银行" };
-}
-if (string.IsNullOrEmpty(fields["BankAddressCode"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写开户银行省市编码" };
-}
-if (string.IsNullOrEmpty(fields["BankBranchId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写开户银行联行号" };
-}
-if (string.IsNullOrEmpty(fields["BankName"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写开户银行全称" };
-}
-if (string.IsNullOrEmpty(fields["AccountNumber"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写银行账号" };
-}
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写申请编号" };
+                }
+                if (string.IsNullOrEmpty(fields["ContactName"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写管理员姓名" };
+                }
+                if (string.IsNullOrEmpty(fields["ContactIdNumber"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写管理员身份证件号码" };
+                }
+                if (function.CheckIdCard(fields["ContactIdNumber"].ToString()) == "")
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的管理员身份证件号码" };
+                }
+                if (string.IsNullOrEmpty(fields["OpenId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写管理员微信openid" };
+                }
+                if (string.IsNullOrEmpty(fields["MobilePhone"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写联系手机" };
+                }
+                if (function.CheckMobile(fields["MobilePhone"].ToString()) == "")
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的联系手机" };
+                }
+                if (string.IsNullOrEmpty(fields["ContactEmail"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写联系邮箱" };
+                }
+                if (string.IsNullOrEmpty(fields["SubjectType"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写主体类型" };
+                }
+                if (string.IsNullOrEmpty(fields["LicenseNumber"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写统一社会信用代码" };
+                }
+                if (string.IsNullOrEmpty(fields["LegalPerson"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写个体户经营者/法人姓名" };
+                }
+                if (string.IsNullOrEmpty(fields["MerchantShortname"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商户简称" };
+                }
+                if (string.IsNullOrEmpty(fields["SalesScenesType"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写经营场景类型" };
+                }
+                if (string.IsNullOrEmpty(fields["BizStoreName"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写门店名称" };
+                }
+                if (string.IsNullOrEmpty(fields["BizAddressCode"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写门店省市编码" };
+                }
+                if (string.IsNullOrEmpty(fields["BizStoreAddress"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写门店地址" };
+                }
+                if (string.IsNullOrEmpty(fields["MpAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写服务商公众号APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["MpSubAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商家公众号APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["MiniProgramAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写服务商小程序APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["MiniProgramSubAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商家小程序APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["AppAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写服务商应用APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["AppSubAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商家应用APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["WebDomain"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写互联网网站域名" };
+                }
+                if (string.IsNullOrEmpty(fields["WebAppId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写互联网网站对应的商家APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["SubCorpId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商家企业微信CorpID" };
+                }
+                if (string.IsNullOrEmpty(fields["SettlementId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写入驻结算规则ID" };
+                }
+                if (string.IsNullOrEmpty(fields["QualificationType"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写所属行业" };
+                }
+                if (string.IsNullOrEmpty(fields["ActivitiesId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写优惠费率活动ID" };
+                }
+                if (string.IsNullOrEmpty(fields["BankAccountType"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写账户类型" };
+                }
+                if (string.IsNullOrEmpty(fields["AccountName"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写开户名称" };
+                }
+                if (string.IsNullOrEmpty(fields["AccountBank"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写开户银行" };
+                }
+                if (string.IsNullOrEmpty(fields["BankAddressCode"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写开户银行省市编码" };
+                }
+                if (string.IsNullOrEmpty(fields["BankBranchId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写开户银行联行号" };
+                }
+                if (string.IsNullOrEmpty(fields["BankName"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写开户银行全称" };
+                }
+                if (string.IsNullOrEmpty(fields["AccountNumber"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写银行账号" };
+                }
 
             }
             new DbServiceNew(AppConfig.Base.main1Tables, _conn).Edit("MerchantAddInfo", fields, Id);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -493,12 +493,12 @@ if (string.IsNullOrEmpty(fields["AccountNumber"].ToString()))
             // for (int i = 1; i < list.Count;i++ )
             // {
             //     JsonData dr = list[i];
-                
+
             //     db.MerchantAddInfo.Add(new MerchantAddInfo()
             //     {
             //         CreateDate = DateTime.Now,
             //         UpdateDate = DateTime.Now,
-                    
+
             //     });
             //     db.SaveChanges();
             // }
@@ -513,7 +513,7 @@ if (string.IsNullOrEmpty(fields["AccountNumber"].ToString()))
         /// <returns></returns>
         // public static void ExportExcel(List<RelationData> relationData, string condition)
         // {
-            
+
         // }
     }
 }

+ 83 - 83
Service/Main1/MerchantDepositBackService.cs

@@ -66,7 +66,7 @@ namespace MySystem.Service.Main1
         public static MerchantDepositBack Query(int Id)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("*", "MerchantDepositBack", Id);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantDepositBack>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -81,7 +81,7 @@ namespace MySystem.Service.Main1
         public static MerchantDepositBack Query(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("*", "MerchantDepositBack", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantDepositBack>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -99,12 +99,12 @@ namespace MySystem.Service.Main1
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query(fields, "MerchantDepositBack", condition);
             return obj;
         }
-        
+
         public static decimal Sum(string condition, string field)
         {
             decimal amount = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("Sum(" + field + ") " + field + "", "MerchantDepositBack", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 amount = decimal.Parse(obj[field].ToString());
             }
@@ -120,7 +120,7 @@ namespace MySystem.Service.Main1
         {
             int result = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("count(" + field + ") " + field + "", "MerchantDepositBack", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 result = int.Parse(function.CheckInt(obj[field].ToString()));
             }
@@ -135,7 +135,7 @@ namespace MySystem.Service.Main1
         public static bool Exist(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("1", "MerchantDepositBack", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return true;
             }
@@ -149,48 +149,48 @@ namespace MySystem.Service.Main1
         /// <returns></returns>
         public static AppResultJson Add(Dictionary<string, object> fields, bool check = true)
         {
-            if(check)
+            if (check)
             {
                 if (string.IsNullOrEmpty(fields["MerchantId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商户Id" };
-}
-if (!function.IsInt(fields["MerchantId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户Id" };
-}
-if (string.IsNullOrEmpty(fields["ReturnAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写退还金额" };
-}
-if (!function.IsInt(fields["ReturnAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的退还金额" };
-}
-if (string.IsNullOrEmpty(fields["ReturnWay"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写退还方式" };
-}
-if (!function.IsInt(fields["ReturnWay"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的退还方式" };
-}
-if (string.IsNullOrEmpty(fields["ApplyNo"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写申请单号" };
-}
-if (string.IsNullOrEmpty(fields["UserId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写创客Id" };
-}
-if (!function.IsInt(fields["UserId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的创客Id" };
-}
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商户Id" };
+                }
+                if (!function.IsInt(fields["MerchantId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户Id" };
+                }
+                if (string.IsNullOrEmpty(fields["ReturnAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写退还金额" };
+                }
+                if (!function.IsInt(fields["ReturnAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的退还金额" };
+                }
+                if (string.IsNullOrEmpty(fields["ReturnWay"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写退还方式" };
+                }
+                if (!function.IsInt(fields["ReturnWay"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的退还方式" };
+                }
+                if (string.IsNullOrEmpty(fields["ApplyNo"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写申请单号" };
+                }
+                if (string.IsNullOrEmpty(fields["UserId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写创客Id" };
+                }
+                if (!function.IsInt(fields["UserId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的创客Id" };
+                }
 
             }
             int Id = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Add("MerchantDepositBack", fields, 0);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -200,48 +200,48 @@ if (!function.IsInt(fields["UserId"].ToString()))
         /// <param name="Id">主键Id</param>
         public static AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
         {
-            if(check)
+            if (check)
             {
                 if (string.IsNullOrEmpty(fields["MerchantId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商户Id" };
-}
-if (!function.IsInt(fields["MerchantId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户Id" };
-}
-if (string.IsNullOrEmpty(fields["ReturnAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写退还金额" };
-}
-if (!function.IsInt(fields["ReturnAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的退还金额" };
-}
-if (string.IsNullOrEmpty(fields["ReturnWay"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写退还方式" };
-}
-if (!function.IsInt(fields["ReturnWay"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的退还方式" };
-}
-if (string.IsNullOrEmpty(fields["ApplyNo"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写申请单号" };
-}
-if (string.IsNullOrEmpty(fields["UserId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写创客Id" };
-}
-if (!function.IsInt(fields["UserId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的创客Id" };
-}
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商户Id" };
+                }
+                if (!function.IsInt(fields["MerchantId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户Id" };
+                }
+                if (string.IsNullOrEmpty(fields["ReturnAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写退还金额" };
+                }
+                if (!function.IsInt(fields["ReturnAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的退还金额" };
+                }
+                if (string.IsNullOrEmpty(fields["ReturnWay"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写退还方式" };
+                }
+                if (!function.IsInt(fields["ReturnWay"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的退还方式" };
+                }
+                if (string.IsNullOrEmpty(fields["ApplyNo"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写申请单号" };
+                }
+                if (string.IsNullOrEmpty(fields["UserId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写创客Id" };
+                }
+                if (!function.IsInt(fields["UserId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的创客Id" };
+                }
 
             }
             new DbServiceNew(AppConfig.Base.main1Tables, _conn).Edit("MerchantDepositBack", fields, Id);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -285,12 +285,12 @@ if (!function.IsInt(fields["UserId"].ToString()))
             // for (int i = 1; i < list.Count;i++ )
             // {
             //     JsonData dr = list[i];
-                
+
             //     db.MerchantDepositBack.Add(new MerchantDepositBack()
             //     {
             //         CreateDate = DateTime.Now,
             //         UpdateDate = DateTime.Now,
-                    
+
             //     });
             //     db.SaveChanges();
             // }
@@ -305,7 +305,7 @@ if (!function.IsInt(fields["UserId"].ToString()))
         /// <returns></returns>
         // public static void ExportExcel(List<RelationData> relationData, string condition)
         // {
-            
+
         // }
     }
 }

+ 59 - 59
Service/Main1/MerchantDepositOrderService.cs

@@ -66,7 +66,7 @@ namespace MySystem.Service.Main1
         public static MerchantDepositOrder Query(int Id)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("*", "MerchantDepositOrder", Id);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantDepositOrder>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -81,7 +81,7 @@ namespace MySystem.Service.Main1
         public static MerchantDepositOrder Query(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("*", "MerchantDepositOrder", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantDepositOrder>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -99,12 +99,12 @@ namespace MySystem.Service.Main1
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query(fields, "MerchantDepositOrder", condition);
             return obj;
         }
-        
+
         public static decimal Sum(string condition, string field)
         {
             decimal amount = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("Sum(" + field + ") " + field + "", "MerchantDepositOrder", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 amount = decimal.Parse(obj[field].ToString());
             }
@@ -120,7 +120,7 @@ namespace MySystem.Service.Main1
         {
             int result = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("count(" + field + ") " + field + "", "MerchantDepositOrder", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 result = int.Parse(function.CheckInt(obj[field].ToString()));
             }
@@ -135,7 +135,7 @@ namespace MySystem.Service.Main1
         public static bool Exist(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("1", "MerchantDepositOrder", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return true;
             }
@@ -149,36 +149,36 @@ namespace MySystem.Service.Main1
         /// <returns></returns>
         public static AppResultJson Add(Dictionary<string, object> fields, bool check = true)
         {
-            if(check)
+            if (check)
             {
                 if (string.IsNullOrEmpty(fields["MerchantId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商户Id" };
-}
-if (!function.IsInt(fields["MerchantId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户Id" };
-}
-if (string.IsNullOrEmpty(fields["UserId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写创客Id" };
-}
-if (!function.IsInt(fields["UserId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的创客Id" };
-}
-if (!function.IsNum(fields["ActPayPrice"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的激活支付金额" };
-}
-if (string.IsNullOrEmpty(fields["OrderNo"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写订单号" };
-}
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商户Id" };
+                }
+                if (!function.IsInt(fields["MerchantId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户Id" };
+                }
+                if (string.IsNullOrEmpty(fields["UserId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写创客Id" };
+                }
+                if (!function.IsInt(fields["UserId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的创客Id" };
+                }
+                if (!function.IsNum(fields["ActPayPrice"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的激活支付金额" };
+                }
+                if (string.IsNullOrEmpty(fields["OrderNo"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写订单号" };
+                }
 
             }
             int Id = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Add("MerchantDepositOrder", fields, 0);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -188,36 +188,36 @@ if (string.IsNullOrEmpty(fields["OrderNo"].ToString()))
         /// <param name="Id">主键Id</param>
         public static AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
         {
-            if(check)
+            if (check)
             {
                 if (string.IsNullOrEmpty(fields["MerchantId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商户Id" };
-}
-if (!function.IsInt(fields["MerchantId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户Id" };
-}
-if (string.IsNullOrEmpty(fields["UserId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写创客Id" };
-}
-if (!function.IsInt(fields["UserId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的创客Id" };
-}
-if (!function.IsNum(fields["ActPayPrice"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的激活支付金额" };
-}
-if (string.IsNullOrEmpty(fields["OrderNo"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写订单号" };
-}
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商户Id" };
+                }
+                if (!function.IsInt(fields["MerchantId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户Id" };
+                }
+                if (string.IsNullOrEmpty(fields["UserId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写创客Id" };
+                }
+                if (!function.IsInt(fields["UserId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的创客Id" };
+                }
+                if (!function.IsNum(fields["ActPayPrice"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的激活支付金额" };
+                }
+                if (string.IsNullOrEmpty(fields["OrderNo"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写订单号" };
+                }
 
             }
             new DbServiceNew(AppConfig.Base.main1Tables, _conn).Edit("MerchantDepositOrder", fields, Id);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -261,12 +261,12 @@ if (string.IsNullOrEmpty(fields["OrderNo"].ToString()))
             // for (int i = 1; i < list.Count;i++ )
             // {
             //     JsonData dr = list[i];
-                
+
             //     db.MerchantDepositOrder.Add(new MerchantDepositOrder()
             //     {
             //         CreateDate = DateTime.Now,
             //         UpdateDate = DateTime.Now,
-                    
+
             //     });
             //     db.SaveChanges();
             // }
@@ -281,7 +281,7 @@ if (string.IsNullOrEmpty(fields["OrderNo"].ToString()))
         /// <returns></returns>
         // public static void ExportExcel(List<RelationData> relationData, string condition)
         // {
-            
+
         // }
     }
 }

+ 15 - 15
Service/Main1/MerchantDepositReturnsService.cs

@@ -66,7 +66,7 @@ namespace MySystem.Service.Main1
         public static MerchantDepositReturns Query(int Id)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("*", "MerchantDepositReturns", Id);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantDepositReturns>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -81,7 +81,7 @@ namespace MySystem.Service.Main1
         public static MerchantDepositReturns Query(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("*", "MerchantDepositReturns", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantDepositReturns>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -99,12 +99,12 @@ namespace MySystem.Service.Main1
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query(fields, "MerchantDepositReturns", condition);
             return obj;
         }
-        
+
         public static decimal Sum(string condition, string field)
         {
             decimal amount = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("Sum(" + field + ") " + field + "", "MerchantDepositReturns", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 amount = decimal.Parse(obj[field].ToString());
             }
@@ -120,7 +120,7 @@ namespace MySystem.Service.Main1
         {
             int result = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("count(" + field + ") " + field + "", "MerchantDepositReturns", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 result = int.Parse(function.CheckInt(obj[field].ToString()));
             }
@@ -135,7 +135,7 @@ namespace MySystem.Service.Main1
         public static bool Exist(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("1", "MerchantDepositReturns", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return true;
             }
@@ -149,12 +149,12 @@ namespace MySystem.Service.Main1
         /// <returns></returns>
         public static AppResultJson Add(Dictionary<string, object> fields, bool check = true)
         {
-            if(check)
+            if (check)
             {
-                
+
             }
             int Id = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Add("MerchantDepositReturns", fields, 0);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -164,12 +164,12 @@ namespace MySystem.Service.Main1
         /// <param name="Id">主键Id</param>
         public static AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
         {
-            if(check)
+            if (check)
             {
-                
+
             }
             new DbServiceNew(AppConfig.Base.main1Tables, _conn).Edit("MerchantDepositReturns", fields, Id);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -213,12 +213,12 @@ namespace MySystem.Service.Main1
             // for (int i = 1; i < list.Count;i++ )
             // {
             //     JsonData dr = list[i];
-                
+
             //     db.MerchantDepositReturns.Add(new MerchantDepositReturns()
             //     {
             //         CreateDate = DateTime.Now,
             //         UpdateDate = DateTime.Now,
-                    
+
             //     });
             //     db.SaveChanges();
             // }
@@ -233,7 +233,7 @@ namespace MySystem.Service.Main1
         /// <returns></returns>
         // public static void ExportExcel(List<RelationData> relationData, string condition)
         // {
-            
+
         // }
     }
 }

+ 91 - 91
Service/Main1/MerchantInfoService.cs

@@ -66,7 +66,7 @@ namespace MySystem.Service.Main1
         public static MerchantInfo Query(int Id)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("*", "MerchantInfo", Id);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantInfo>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -81,7 +81,7 @@ namespace MySystem.Service.Main1
         public static MerchantInfo Query(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("*", "MerchantInfo", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantInfo>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -99,12 +99,12 @@ namespace MySystem.Service.Main1
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query(fields, "MerchantInfo", condition);
             return obj;
         }
-        
+
         public static decimal Sum(string condition, string field)
         {
             decimal amount = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("Sum(" + field + ") " + field + "", "MerchantInfo", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 amount = decimal.Parse(obj[field].ToString());
             }
@@ -120,7 +120,7 @@ namespace MySystem.Service.Main1
         {
             int result = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("count(" + field + ") " + field + "", "MerchantInfo", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 result = int.Parse(function.CheckInt(obj[field].ToString()));
             }
@@ -135,7 +135,7 @@ namespace MySystem.Service.Main1
         public static bool Exist(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Query("1", "MerchantInfo", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return true;
             }
@@ -149,52 +149,52 @@ namespace MySystem.Service.Main1
         /// <returns></returns>
         public static AppResultJson Add(Dictionary<string, object> fields, bool check = true)
         {
-            if(check)
+            if (check)
             {
                 if (string.IsNullOrEmpty(fields["Name"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
-}
-if (string.IsNullOrEmpty(fields["Mobile"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写手机号" };
-}
-if (string.IsNullOrEmpty(fields["ActivationStatus"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写激活状态" };
-}
-if (string.IsNullOrEmpty(fields["ActMaxAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写活动应返金额" };
-}
-if (!function.IsNum(fields["ActMaxAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的活动应返金额" };
-}
-if (string.IsNullOrEmpty(fields["ActCurrentAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写活动已返金额" };
-}
-if (!function.IsNum(fields["ActCurrentAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的活动已返金额" };
-}
-if (!function.IsInt(fields["IsAct"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户激活标记" };
-}
-if (!function.IsInt(fields["ExamineStatus"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的服务费考核状态" };
-}
-if (!function.IsInt(fields["Months"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的达标月数" };
-}
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+                }
+                if (string.IsNullOrEmpty(fields["Mobile"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写手机号" };
+                }
+                if (string.IsNullOrEmpty(fields["ActivationStatus"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写激活状态" };
+                }
+                if (string.IsNullOrEmpty(fields["ActMaxAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写活动应返金额" };
+                }
+                if (!function.IsNum(fields["ActMaxAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的活动应返金额" };
+                }
+                if (string.IsNullOrEmpty(fields["ActCurrentAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写活动已返金额" };
+                }
+                if (!function.IsNum(fields["ActCurrentAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的活动已返金额" };
+                }
+                if (!function.IsInt(fields["IsAct"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户激活标记" };
+                }
+                if (!function.IsInt(fields["ExamineStatus"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的服务费考核状态" };
+                }
+                if (!function.IsInt(fields["Months"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的达标月数" };
+                }
 
             }
             int Id = new DbServiceNew(AppConfig.Base.main1Tables, _conn).Add("MerchantInfo", fields, 0);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -204,52 +204,52 @@ if (!function.IsInt(fields["Months"].ToString()))
         /// <param name="Id">主键Id</param>
         public static AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
         {
-            if(check)
+            if (check)
             {
                 if (string.IsNullOrEmpty(fields["Name"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
-}
-if (string.IsNullOrEmpty(fields["Mobile"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写手机号" };
-}
-if (string.IsNullOrEmpty(fields["ActivationStatus"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写激活状态" };
-}
-if (string.IsNullOrEmpty(fields["ActMaxAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写活动应返金额" };
-}
-if (!function.IsNum(fields["ActMaxAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的活动应返金额" };
-}
-if (string.IsNullOrEmpty(fields["ActCurrentAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写活动已返金额" };
-}
-if (!function.IsNum(fields["ActCurrentAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的活动已返金额" };
-}
-if (!function.IsInt(fields["IsAct"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户激活标记" };
-}
-if (!function.IsInt(fields["ExamineStatus"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的服务费考核状态" };
-}
-if (!function.IsInt(fields["Months"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的达标月数" };
-}
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+                }
+                if (string.IsNullOrEmpty(fields["Mobile"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写手机号" };
+                }
+                if (string.IsNullOrEmpty(fields["ActivationStatus"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写激活状态" };
+                }
+                if (string.IsNullOrEmpty(fields["ActMaxAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写活动应返金额" };
+                }
+                if (!function.IsNum(fields["ActMaxAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的活动应返金额" };
+                }
+                if (string.IsNullOrEmpty(fields["ActCurrentAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写活动已返金额" };
+                }
+                if (!function.IsNum(fields["ActCurrentAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的活动已返金额" };
+                }
+                if (!function.IsInt(fields["IsAct"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户激活标记" };
+                }
+                if (!function.IsInt(fields["ExamineStatus"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的服务费考核状态" };
+                }
+                if (!function.IsInt(fields["Months"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的达标月数" };
+                }
 
             }
             new DbServiceNew(AppConfig.Base.main1Tables, _conn).Edit("MerchantInfo", fields, Id);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -293,12 +293,12 @@ if (!function.IsInt(fields["Months"].ToString()))
             // for (int i = 1; i < list.Count;i++ )
             // {
             //     JsonData dr = list[i];
-                
+
             //     db.MerchantInfo.Add(new MerchantInfo()
             //     {
             //         CreateDate = DateTime.Now,
             //         UpdateDate = DateTime.Now,
-                    
+
             //     });
             //     db.SaveChanges();
             // }
@@ -313,7 +313,7 @@ if (!function.IsInt(fields["Months"].ToString()))
         /// <returns></returns>
         // public static void ExportExcel(List<RelationData> relationData, string condition)
         // {
-            
+
         // }
     }
 }

+ 107 - 107
Service/Main2/ConsumerOrdersService.cs

@@ -66,7 +66,7 @@ namespace MySystem.Service.Main2
         public static ConsumerOrders Query(int Id)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("*", "ConsumerOrders", Id);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<ConsumerOrders>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -81,7 +81,7 @@ namespace MySystem.Service.Main2
         public static ConsumerOrders Query(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("*", "ConsumerOrders", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<ConsumerOrders>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -99,12 +99,12 @@ namespace MySystem.Service.Main2
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query(fields, "ConsumerOrders", condition);
             return obj;
         }
-        
+
         public static decimal Sum(string condition, string field)
         {
             decimal amount = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("Sum(" + field + ") " + field + "", "ConsumerOrders", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 amount = decimal.Parse(obj[field].ToString());
             }
@@ -120,7 +120,7 @@ namespace MySystem.Service.Main2
         {
             int result = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("count(" + field + ") " + field + "", "ConsumerOrders", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 result = int.Parse(function.CheckInt(obj[field].ToString()));
             }
@@ -135,7 +135,7 @@ namespace MySystem.Service.Main2
         public static bool Exist(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("1", "ConsumerOrders", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return true;
             }
@@ -149,60 +149,60 @@ namespace MySystem.Service.Main2
         /// <returns></returns>
         public static AppResultJson Add(Dictionary<string, object> fields, bool check = true)
         {
-            if(check)
+            if (check)
             {
                 if (string.IsNullOrEmpty(fields["MerchantId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商户" };
-}
-if (string.IsNullOrEmpty(fields["ConsumerId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写消费者" };
-}
-if (string.IsNullOrEmpty(fields["PayMode"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写支付方式" };
-}
-if (string.IsNullOrEmpty(fields["PayMoney"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写支付金额" };
-}
-if (!function.IsNum(fields["PayMoney"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的支付金额" };
-}
-if (string.IsNullOrEmpty(fields["ReturnMoney"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写已返金额" };
-}
-if (!function.IsNum(fields["ReturnMoney"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的已返金额" };
-}
-if (string.IsNullOrEmpty(fields["MaxDivi"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写最大分红" };
-}
-if (!function.IsNum(fields["MaxDivi"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的最大分红" };
-}
-if (string.IsNullOrEmpty(fields["CurDivi"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写当前分红" };
-}
-if (!function.IsNum(fields["CurDivi"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的当前分红" };
-}
-if (string.IsNullOrEmpty(fields["IsAct"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写是否活动" };
-}
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商户" };
+                }
+                if (string.IsNullOrEmpty(fields["ConsumerId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写消费者" };
+                }
+                if (string.IsNullOrEmpty(fields["PayMode"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写支付方式" };
+                }
+                if (string.IsNullOrEmpty(fields["PayMoney"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写支付金额" };
+                }
+                if (!function.IsNum(fields["PayMoney"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的支付金额" };
+                }
+                if (string.IsNullOrEmpty(fields["ReturnMoney"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写已返金额" };
+                }
+                if (!function.IsNum(fields["ReturnMoney"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的已返金额" };
+                }
+                if (string.IsNullOrEmpty(fields["MaxDivi"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写最大分红" };
+                }
+                if (!function.IsNum(fields["MaxDivi"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的最大分红" };
+                }
+                if (string.IsNullOrEmpty(fields["CurDivi"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写当前分红" };
+                }
+                if (!function.IsNum(fields["CurDivi"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的当前分红" };
+                }
+                if (string.IsNullOrEmpty(fields["IsAct"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写是否活动" };
+                }
 
             }
             int Id = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Add("ConsumerOrders", fields, 0);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -212,60 +212,60 @@ if (string.IsNullOrEmpty(fields["IsAct"].ToString()))
         /// <param name="Id">主键Id</param>
         public static AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
         {
-            if(check)
+            if (check)
             {
                 if (string.IsNullOrEmpty(fields["MerchantId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商户" };
-}
-if (string.IsNullOrEmpty(fields["ConsumerId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写消费者" };
-}
-if (string.IsNullOrEmpty(fields["PayMode"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写支付方式" };
-}
-if (string.IsNullOrEmpty(fields["PayMoney"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写支付金额" };
-}
-if (!function.IsNum(fields["PayMoney"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的支付金额" };
-}
-if (string.IsNullOrEmpty(fields["ReturnMoney"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写已返金额" };
-}
-if (!function.IsNum(fields["ReturnMoney"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的已返金额" };
-}
-if (string.IsNullOrEmpty(fields["MaxDivi"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写最大分红" };
-}
-if (!function.IsNum(fields["MaxDivi"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的最大分红" };
-}
-if (string.IsNullOrEmpty(fields["CurDivi"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写当前分红" };
-}
-if (!function.IsNum(fields["CurDivi"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的当前分红" };
-}
-if (string.IsNullOrEmpty(fields["IsAct"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写是否活动" };
-}
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商户" };
+                }
+                if (string.IsNullOrEmpty(fields["ConsumerId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写消费者" };
+                }
+                if (string.IsNullOrEmpty(fields["PayMode"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写支付方式" };
+                }
+                if (string.IsNullOrEmpty(fields["PayMoney"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写支付金额" };
+                }
+                if (!function.IsNum(fields["PayMoney"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的支付金额" };
+                }
+                if (string.IsNullOrEmpty(fields["ReturnMoney"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写已返金额" };
+                }
+                if (!function.IsNum(fields["ReturnMoney"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的已返金额" };
+                }
+                if (string.IsNullOrEmpty(fields["MaxDivi"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写最大分红" };
+                }
+                if (!function.IsNum(fields["MaxDivi"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的最大分红" };
+                }
+                if (string.IsNullOrEmpty(fields["CurDivi"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写当前分红" };
+                }
+                if (!function.IsNum(fields["CurDivi"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的当前分红" };
+                }
+                if (string.IsNullOrEmpty(fields["IsAct"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写是否活动" };
+                }
 
             }
             new DbServiceNew(AppConfig.Base.main2Tables, _conn).Edit("ConsumerOrders", fields, Id);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -309,12 +309,12 @@ if (string.IsNullOrEmpty(fields["IsAct"].ToString()))
             // for (int i = 1; i < list.Count;i++ )
             // {
             //     JsonData dr = list[i];
-                
+
             //     db.ConsumerOrders.Add(new ConsumerOrders()
             //     {
             //         CreateDate = DateTime.Now,
             //         UpdateDate = DateTime.Now,
-                    
+
             //     });
             //     db.SaveChanges();
             // }
@@ -329,7 +329,7 @@ if (string.IsNullOrEmpty(fields["IsAct"].ToString()))
         /// <returns></returns>
         // public static void ExportExcel(List<RelationData> relationData, string condition)
         // {
-            
+
         // }
     }
 }

+ 291 - 291
Service/Main2/MerchantAddInfoService.cs

@@ -66,7 +66,7 @@ namespace MySystem.Service.Main2
         public static MerchantAddInfo Query(int Id)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("*", "MerchantAddInfo", Id);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantAddInfo>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -81,7 +81,7 @@ namespace MySystem.Service.Main2
         public static MerchantAddInfo Query(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("*", "MerchantAddInfo", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantAddInfo>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -99,12 +99,12 @@ namespace MySystem.Service.Main2
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query(fields, "MerchantAddInfo", condition);
             return obj;
         }
-        
+
         public static decimal Sum(string condition, string field)
         {
             decimal amount = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("Sum(" + field + ") " + field + "", "MerchantAddInfo", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 amount = decimal.Parse(obj[field].ToString());
             }
@@ -120,7 +120,7 @@ namespace MySystem.Service.Main2
         {
             int result = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("count(" + field + ") " + field + "", "MerchantAddInfo", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 result = int.Parse(function.CheckInt(obj[field].ToString()));
             }
@@ -135,7 +135,7 @@ namespace MySystem.Service.Main2
         public static bool Exist(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("1", "MerchantAddInfo", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return true;
             }
@@ -149,152 +149,152 @@ namespace MySystem.Service.Main2
         /// <returns></returns>
         public static AppResultJson Add(Dictionary<string, object> fields, bool check = true)
         {
-            if(check)
+            if (check)
             {
                 if (string.IsNullOrEmpty(fields["BusinessCode"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写申请编号" };
-}
-if (string.IsNullOrEmpty(fields["ContactName"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写管理员姓名" };
-}
-if (string.IsNullOrEmpty(fields["ContactIdNumber"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写管理员身份证件号码" };
-}
-if (function.CheckIdCard(fields["ContactIdNumber"].ToString()) == "")
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的管理员身份证件号码" };
-}
-if (string.IsNullOrEmpty(fields["OpenId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写管理员微信openid" };
-}
-if (string.IsNullOrEmpty(fields["MobilePhone"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写联系手机" };
-}
-if (function.CheckMobile(fields["MobilePhone"].ToString()) == "")
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的联系手机" };
-}
-if (string.IsNullOrEmpty(fields["ContactEmail"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写联系邮箱" };
-}
-if (string.IsNullOrEmpty(fields["SubjectType"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写主体类型" };
-}
-if (string.IsNullOrEmpty(fields["LicenseNumber"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写统一社会信用代码" };
-}
-if (string.IsNullOrEmpty(fields["LegalPerson"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写个体户经营者/法人姓名" };
-}
-if (string.IsNullOrEmpty(fields["MerchantShortname"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商户简称" };
-}
-if (string.IsNullOrEmpty(fields["SalesScenesType"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写经营场景类型" };
-}
-if (string.IsNullOrEmpty(fields["BizStoreName"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写门店名称" };
-}
-if (string.IsNullOrEmpty(fields["BizAddressCode"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写门店省市编码" };
-}
-if (string.IsNullOrEmpty(fields["BizStoreAddress"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写门店地址" };
-}
-if (string.IsNullOrEmpty(fields["MpAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写服务商公众号APPID" };
-}
-if (string.IsNullOrEmpty(fields["MpSubAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商家公众号APPID" };
-}
-if (string.IsNullOrEmpty(fields["MiniProgramAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写服务商小程序APPID" };
-}
-if (string.IsNullOrEmpty(fields["MiniProgramSubAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商家小程序APPID" };
-}
-if (string.IsNullOrEmpty(fields["AppAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写服务商应用APPID" };
-}
-if (string.IsNullOrEmpty(fields["AppSubAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商家应用APPID" };
-}
-if (string.IsNullOrEmpty(fields["WebDomain"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写互联网网站域名" };
-}
-if (string.IsNullOrEmpty(fields["WebAppId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写互联网网站对应的商家APPID" };
-}
-if (string.IsNullOrEmpty(fields["SubCorpId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商家企业微信CorpID" };
-}
-if (string.IsNullOrEmpty(fields["SettlementId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写入驻结算规则ID" };
-}
-if (string.IsNullOrEmpty(fields["QualificationType"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写所属行业" };
-}
-if (string.IsNullOrEmpty(fields["ActivitiesId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写优惠费率活动ID" };
-}
-if (string.IsNullOrEmpty(fields["BankAccountType"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写账户类型" };
-}
-if (string.IsNullOrEmpty(fields["AccountName"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写开户名称" };
-}
-if (string.IsNullOrEmpty(fields["AccountBank"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写开户银行" };
-}
-if (string.IsNullOrEmpty(fields["BankAddressCode"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写开户银行省市编码" };
-}
-if (string.IsNullOrEmpty(fields["BankBranchId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写开户银行联行号" };
-}
-if (string.IsNullOrEmpty(fields["BankName"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写开户银行全称" };
-}
-if (string.IsNullOrEmpty(fields["AccountNumber"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写银行账号" };
-}
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写申请编号" };
+                }
+                if (string.IsNullOrEmpty(fields["ContactName"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写管理员姓名" };
+                }
+                if (string.IsNullOrEmpty(fields["ContactIdNumber"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写管理员身份证件号码" };
+                }
+                if (function.CheckIdCard(fields["ContactIdNumber"].ToString()) == "")
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的管理员身份证件号码" };
+                }
+                if (string.IsNullOrEmpty(fields["OpenId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写管理员微信openid" };
+                }
+                if (string.IsNullOrEmpty(fields["MobilePhone"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写联系手机" };
+                }
+                if (function.CheckMobile(fields["MobilePhone"].ToString()) == "")
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的联系手机" };
+                }
+                if (string.IsNullOrEmpty(fields["ContactEmail"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写联系邮箱" };
+                }
+                if (string.IsNullOrEmpty(fields["SubjectType"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写主体类型" };
+                }
+                if (string.IsNullOrEmpty(fields["LicenseNumber"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写统一社会信用代码" };
+                }
+                if (string.IsNullOrEmpty(fields["LegalPerson"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写个体户经营者/法人姓名" };
+                }
+                if (string.IsNullOrEmpty(fields["MerchantShortname"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商户简称" };
+                }
+                if (string.IsNullOrEmpty(fields["SalesScenesType"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写经营场景类型" };
+                }
+                if (string.IsNullOrEmpty(fields["BizStoreName"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写门店名称" };
+                }
+                if (string.IsNullOrEmpty(fields["BizAddressCode"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写门店省市编码" };
+                }
+                if (string.IsNullOrEmpty(fields["BizStoreAddress"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写门店地址" };
+                }
+                if (string.IsNullOrEmpty(fields["MpAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写服务商公众号APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["MpSubAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商家公众号APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["MiniProgramAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写服务商小程序APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["MiniProgramSubAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商家小程序APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["AppAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写服务商应用APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["AppSubAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商家应用APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["WebDomain"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写互联网网站域名" };
+                }
+                if (string.IsNullOrEmpty(fields["WebAppId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写互联网网站对应的商家APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["SubCorpId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商家企业微信CorpID" };
+                }
+                if (string.IsNullOrEmpty(fields["SettlementId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写入驻结算规则ID" };
+                }
+                if (string.IsNullOrEmpty(fields["QualificationType"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写所属行业" };
+                }
+                if (string.IsNullOrEmpty(fields["ActivitiesId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写优惠费率活动ID" };
+                }
+                if (string.IsNullOrEmpty(fields["BankAccountType"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写账户类型" };
+                }
+                if (string.IsNullOrEmpty(fields["AccountName"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写开户名称" };
+                }
+                if (string.IsNullOrEmpty(fields["AccountBank"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写开户银行" };
+                }
+                if (string.IsNullOrEmpty(fields["BankAddressCode"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写开户银行省市编码" };
+                }
+                if (string.IsNullOrEmpty(fields["BankBranchId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写开户银行联行号" };
+                }
+                if (string.IsNullOrEmpty(fields["BankName"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写开户银行全称" };
+                }
+                if (string.IsNullOrEmpty(fields["AccountNumber"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写银行账号" };
+                }
 
             }
             int Id = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Add("MerchantAddInfo", fields, 0);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -304,152 +304,152 @@ if (string.IsNullOrEmpty(fields["AccountNumber"].ToString()))
         /// <param name="Id">主键Id</param>
         public static AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
         {
-            if(check)
+            if (check)
             {
                 if (string.IsNullOrEmpty(fields["BusinessCode"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写申请编号" };
-}
-if (string.IsNullOrEmpty(fields["ContactName"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写管理员姓名" };
-}
-if (string.IsNullOrEmpty(fields["ContactIdNumber"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写管理员身份证件号码" };
-}
-if (function.CheckIdCard(fields["ContactIdNumber"].ToString()) == "")
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的管理员身份证件号码" };
-}
-if (string.IsNullOrEmpty(fields["OpenId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写管理员微信openid" };
-}
-if (string.IsNullOrEmpty(fields["MobilePhone"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写联系手机" };
-}
-if (function.CheckMobile(fields["MobilePhone"].ToString()) == "")
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的联系手机" };
-}
-if (string.IsNullOrEmpty(fields["ContactEmail"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写联系邮箱" };
-}
-if (string.IsNullOrEmpty(fields["SubjectType"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写主体类型" };
-}
-if (string.IsNullOrEmpty(fields["LicenseNumber"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写统一社会信用代码" };
-}
-if (string.IsNullOrEmpty(fields["LegalPerson"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写个体户经营者/法人姓名" };
-}
-if (string.IsNullOrEmpty(fields["MerchantShortname"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商户简称" };
-}
-if (string.IsNullOrEmpty(fields["SalesScenesType"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写经营场景类型" };
-}
-if (string.IsNullOrEmpty(fields["BizStoreName"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写门店名称" };
-}
-if (string.IsNullOrEmpty(fields["BizAddressCode"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写门店省市编码" };
-}
-if (string.IsNullOrEmpty(fields["BizStoreAddress"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写门店地址" };
-}
-if (string.IsNullOrEmpty(fields["MpAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写服务商公众号APPID" };
-}
-if (string.IsNullOrEmpty(fields["MpSubAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商家公众号APPID" };
-}
-if (string.IsNullOrEmpty(fields["MiniProgramAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写服务商小程序APPID" };
-}
-if (string.IsNullOrEmpty(fields["MiniProgramSubAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商家小程序APPID" };
-}
-if (string.IsNullOrEmpty(fields["AppAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写服务商应用APPID" };
-}
-if (string.IsNullOrEmpty(fields["AppSubAppid"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商家应用APPID" };
-}
-if (string.IsNullOrEmpty(fields["WebDomain"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写互联网网站域名" };
-}
-if (string.IsNullOrEmpty(fields["WebAppId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写互联网网站对应的商家APPID" };
-}
-if (string.IsNullOrEmpty(fields["SubCorpId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商家企业微信CorpID" };
-}
-if (string.IsNullOrEmpty(fields["SettlementId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写入驻结算规则ID" };
-}
-if (string.IsNullOrEmpty(fields["QualificationType"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写所属行业" };
-}
-if (string.IsNullOrEmpty(fields["ActivitiesId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写优惠费率活动ID" };
-}
-if (string.IsNullOrEmpty(fields["BankAccountType"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写账户类型" };
-}
-if (string.IsNullOrEmpty(fields["AccountName"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写开户名称" };
-}
-if (string.IsNullOrEmpty(fields["AccountBank"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写开户银行" };
-}
-if (string.IsNullOrEmpty(fields["BankAddressCode"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写开户银行省市编码" };
-}
-if (string.IsNullOrEmpty(fields["BankBranchId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写开户银行联行号" };
-}
-if (string.IsNullOrEmpty(fields["BankName"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写开户银行全称" };
-}
-if (string.IsNullOrEmpty(fields["AccountNumber"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写银行账号" };
-}
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写申请编号" };
+                }
+                if (string.IsNullOrEmpty(fields["ContactName"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写管理员姓名" };
+                }
+                if (string.IsNullOrEmpty(fields["ContactIdNumber"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写管理员身份证件号码" };
+                }
+                if (function.CheckIdCard(fields["ContactIdNumber"].ToString()) == "")
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的管理员身份证件号码" };
+                }
+                if (string.IsNullOrEmpty(fields["OpenId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写管理员微信openid" };
+                }
+                if (string.IsNullOrEmpty(fields["MobilePhone"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写联系手机" };
+                }
+                if (function.CheckMobile(fields["MobilePhone"].ToString()) == "")
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的联系手机" };
+                }
+                if (string.IsNullOrEmpty(fields["ContactEmail"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写联系邮箱" };
+                }
+                if (string.IsNullOrEmpty(fields["SubjectType"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写主体类型" };
+                }
+                if (string.IsNullOrEmpty(fields["LicenseNumber"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写统一社会信用代码" };
+                }
+                if (string.IsNullOrEmpty(fields["LegalPerson"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写个体户经营者/法人姓名" };
+                }
+                if (string.IsNullOrEmpty(fields["MerchantShortname"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商户简称" };
+                }
+                if (string.IsNullOrEmpty(fields["SalesScenesType"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写经营场景类型" };
+                }
+                if (string.IsNullOrEmpty(fields["BizStoreName"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写门店名称" };
+                }
+                if (string.IsNullOrEmpty(fields["BizAddressCode"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写门店省市编码" };
+                }
+                if (string.IsNullOrEmpty(fields["BizStoreAddress"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写门店地址" };
+                }
+                if (string.IsNullOrEmpty(fields["MpAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写服务商公众号APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["MpSubAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商家公众号APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["MiniProgramAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写服务商小程序APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["MiniProgramSubAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商家小程序APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["AppAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写服务商应用APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["AppSubAppid"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商家应用APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["WebDomain"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写互联网网站域名" };
+                }
+                if (string.IsNullOrEmpty(fields["WebAppId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写互联网网站对应的商家APPID" };
+                }
+                if (string.IsNullOrEmpty(fields["SubCorpId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商家企业微信CorpID" };
+                }
+                if (string.IsNullOrEmpty(fields["SettlementId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写入驻结算规则ID" };
+                }
+                if (string.IsNullOrEmpty(fields["QualificationType"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写所属行业" };
+                }
+                if (string.IsNullOrEmpty(fields["ActivitiesId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写优惠费率活动ID" };
+                }
+                if (string.IsNullOrEmpty(fields["BankAccountType"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写账户类型" };
+                }
+                if (string.IsNullOrEmpty(fields["AccountName"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写开户名称" };
+                }
+                if (string.IsNullOrEmpty(fields["AccountBank"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写开户银行" };
+                }
+                if (string.IsNullOrEmpty(fields["BankAddressCode"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写开户银行省市编码" };
+                }
+                if (string.IsNullOrEmpty(fields["BankBranchId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写开户银行联行号" };
+                }
+                if (string.IsNullOrEmpty(fields["BankName"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写开户银行全称" };
+                }
+                if (string.IsNullOrEmpty(fields["AccountNumber"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写银行账号" };
+                }
 
             }
             new DbServiceNew(AppConfig.Base.main2Tables, _conn).Edit("MerchantAddInfo", fields, Id);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -493,12 +493,12 @@ if (string.IsNullOrEmpty(fields["AccountNumber"].ToString()))
             // for (int i = 1; i < list.Count;i++ )
             // {
             //     JsonData dr = list[i];
-                
+
             //     db.MerchantAddInfo.Add(new MerchantAddInfo()
             //     {
             //         CreateDate = DateTime.Now,
             //         UpdateDate = DateTime.Now,
-                    
+
             //     });
             //     db.SaveChanges();
             // }
@@ -513,7 +513,7 @@ if (string.IsNullOrEmpty(fields["AccountNumber"].ToString()))
         /// <returns></returns>
         // public static void ExportExcel(List<RelationData> relationData, string condition)
         // {
-            
+
         // }
     }
 }

+ 83 - 83
Service/Main2/MerchantDepositBackService.cs

@@ -66,7 +66,7 @@ namespace MySystem.Service.Main2
         public static MerchantDepositBack Query(int Id)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("*", "MerchantDepositBack", Id);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantDepositBack>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -81,7 +81,7 @@ namespace MySystem.Service.Main2
         public static MerchantDepositBack Query(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("*", "MerchantDepositBack", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantDepositBack>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -99,12 +99,12 @@ namespace MySystem.Service.Main2
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query(fields, "MerchantDepositBack", condition);
             return obj;
         }
-        
+
         public static decimal Sum(string condition, string field)
         {
             decimal amount = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("Sum(" + field + ") " + field + "", "MerchantDepositBack", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 amount = decimal.Parse(obj[field].ToString());
             }
@@ -120,7 +120,7 @@ namespace MySystem.Service.Main2
         {
             int result = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("count(" + field + ") " + field + "", "MerchantDepositBack", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 result = int.Parse(function.CheckInt(obj[field].ToString()));
             }
@@ -135,7 +135,7 @@ namespace MySystem.Service.Main2
         public static bool Exist(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("1", "MerchantDepositBack", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return true;
             }
@@ -149,48 +149,48 @@ namespace MySystem.Service.Main2
         /// <returns></returns>
         public static AppResultJson Add(Dictionary<string, object> fields, bool check = true)
         {
-            if(check)
+            if (check)
             {
                 if (string.IsNullOrEmpty(fields["MerchantId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商户Id" };
-}
-if (!function.IsInt(fields["MerchantId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户Id" };
-}
-if (string.IsNullOrEmpty(fields["ReturnAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写退还金额" };
-}
-if (!function.IsInt(fields["ReturnAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的退还金额" };
-}
-if (string.IsNullOrEmpty(fields["ReturnWay"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写退还方式" };
-}
-if (!function.IsInt(fields["ReturnWay"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的退还方式" };
-}
-if (string.IsNullOrEmpty(fields["ApplyNo"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写申请单号" };
-}
-if (string.IsNullOrEmpty(fields["UserId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写创客Id" };
-}
-if (!function.IsInt(fields["UserId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的创客Id" };
-}
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商户Id" };
+                }
+                if (!function.IsInt(fields["MerchantId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户Id" };
+                }
+                if (string.IsNullOrEmpty(fields["ReturnAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写退还金额" };
+                }
+                if (!function.IsInt(fields["ReturnAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的退还金额" };
+                }
+                if (string.IsNullOrEmpty(fields["ReturnWay"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写退还方式" };
+                }
+                if (!function.IsInt(fields["ReturnWay"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的退还方式" };
+                }
+                if (string.IsNullOrEmpty(fields["ApplyNo"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写申请单号" };
+                }
+                if (string.IsNullOrEmpty(fields["UserId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写创客Id" };
+                }
+                if (!function.IsInt(fields["UserId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的创客Id" };
+                }
 
             }
             int Id = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Add("MerchantDepositBack", fields, 0);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -200,48 +200,48 @@ if (!function.IsInt(fields["UserId"].ToString()))
         /// <param name="Id">主键Id</param>
         public static AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
         {
-            if(check)
+            if (check)
             {
                 if (string.IsNullOrEmpty(fields["MerchantId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商户Id" };
-}
-if (!function.IsInt(fields["MerchantId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户Id" };
-}
-if (string.IsNullOrEmpty(fields["ReturnAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写退还金额" };
-}
-if (!function.IsInt(fields["ReturnAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的退还金额" };
-}
-if (string.IsNullOrEmpty(fields["ReturnWay"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写退还方式" };
-}
-if (!function.IsInt(fields["ReturnWay"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的退还方式" };
-}
-if (string.IsNullOrEmpty(fields["ApplyNo"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写申请单号" };
-}
-if (string.IsNullOrEmpty(fields["UserId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写创客Id" };
-}
-if (!function.IsInt(fields["UserId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的创客Id" };
-}
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商户Id" };
+                }
+                if (!function.IsInt(fields["MerchantId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户Id" };
+                }
+                if (string.IsNullOrEmpty(fields["ReturnAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写退还金额" };
+                }
+                if (!function.IsInt(fields["ReturnAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的退还金额" };
+                }
+                if (string.IsNullOrEmpty(fields["ReturnWay"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写退还方式" };
+                }
+                if (!function.IsInt(fields["ReturnWay"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的退还方式" };
+                }
+                if (string.IsNullOrEmpty(fields["ApplyNo"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写申请单号" };
+                }
+                if (string.IsNullOrEmpty(fields["UserId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写创客Id" };
+                }
+                if (!function.IsInt(fields["UserId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的创客Id" };
+                }
 
             }
             new DbServiceNew(AppConfig.Base.main2Tables, _conn).Edit("MerchantDepositBack", fields, Id);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -285,12 +285,12 @@ if (!function.IsInt(fields["UserId"].ToString()))
             // for (int i = 1; i < list.Count;i++ )
             // {
             //     JsonData dr = list[i];
-                
+
             //     db.MerchantDepositBack.Add(new MerchantDepositBack()
             //     {
             //         CreateDate = DateTime.Now,
             //         UpdateDate = DateTime.Now,
-                    
+
             //     });
             //     db.SaveChanges();
             // }
@@ -305,7 +305,7 @@ if (!function.IsInt(fields["UserId"].ToString()))
         /// <returns></returns>
         // public static void ExportExcel(List<RelationData> relationData, string condition)
         // {
-            
+
         // }
     }
 }

+ 59 - 59
Service/Main2/MerchantDepositOrderService.cs

@@ -66,7 +66,7 @@ namespace MySystem.Service.Main2
         public static MerchantDepositOrder Query(int Id)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("*", "MerchantDepositOrder", Id);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantDepositOrder>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -81,7 +81,7 @@ namespace MySystem.Service.Main2
         public static MerchantDepositOrder Query(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("*", "MerchantDepositOrder", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantDepositOrder>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -99,12 +99,12 @@ namespace MySystem.Service.Main2
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query(fields, "MerchantDepositOrder", condition);
             return obj;
         }
-        
+
         public static decimal Sum(string condition, string field)
         {
             decimal amount = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("Sum(" + field + ") " + field + "", "MerchantDepositOrder", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 amount = decimal.Parse(obj[field].ToString());
             }
@@ -120,7 +120,7 @@ namespace MySystem.Service.Main2
         {
             int result = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("count(" + field + ") " + field + "", "MerchantDepositOrder", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 result = int.Parse(function.CheckInt(obj[field].ToString()));
             }
@@ -135,7 +135,7 @@ namespace MySystem.Service.Main2
         public static bool Exist(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("1", "MerchantDepositOrder", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return true;
             }
@@ -149,36 +149,36 @@ namespace MySystem.Service.Main2
         /// <returns></returns>
         public static AppResultJson Add(Dictionary<string, object> fields, bool check = true)
         {
-            if(check)
+            if (check)
             {
                 if (string.IsNullOrEmpty(fields["MerchantId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商户Id" };
-}
-if (!function.IsInt(fields["MerchantId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户Id" };
-}
-if (string.IsNullOrEmpty(fields["UserId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写创客Id" };
-}
-if (!function.IsInt(fields["UserId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的创客Id" };
-}
-if (!function.IsNum(fields["ActPayPrice"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的激活支付金额" };
-}
-if (string.IsNullOrEmpty(fields["OrderNo"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写订单号" };
-}
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商户Id" };
+                }
+                if (!function.IsInt(fields["MerchantId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户Id" };
+                }
+                if (string.IsNullOrEmpty(fields["UserId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写创客Id" };
+                }
+                if (!function.IsInt(fields["UserId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的创客Id" };
+                }
+                if (!function.IsNum(fields["ActPayPrice"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的激活支付金额" };
+                }
+                if (string.IsNullOrEmpty(fields["OrderNo"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写订单号" };
+                }
 
             }
             int Id = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Add("MerchantDepositOrder", fields, 0);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -188,36 +188,36 @@ if (string.IsNullOrEmpty(fields["OrderNo"].ToString()))
         /// <param name="Id">主键Id</param>
         public static AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
         {
-            if(check)
+            if (check)
             {
                 if (string.IsNullOrEmpty(fields["MerchantId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写商户Id" };
-}
-if (!function.IsInt(fields["MerchantId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户Id" };
-}
-if (string.IsNullOrEmpty(fields["UserId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写创客Id" };
-}
-if (!function.IsInt(fields["UserId"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的创客Id" };
-}
-if (!function.IsNum(fields["ActPayPrice"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的激活支付金额" };
-}
-if (string.IsNullOrEmpty(fields["OrderNo"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写订单号" };
-}
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写商户Id" };
+                }
+                if (!function.IsInt(fields["MerchantId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户Id" };
+                }
+                if (string.IsNullOrEmpty(fields["UserId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写创客Id" };
+                }
+                if (!function.IsInt(fields["UserId"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的创客Id" };
+                }
+                if (!function.IsNum(fields["ActPayPrice"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的激活支付金额" };
+                }
+                if (string.IsNullOrEmpty(fields["OrderNo"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写订单号" };
+                }
 
             }
             new DbServiceNew(AppConfig.Base.main2Tables, _conn).Edit("MerchantDepositOrder", fields, Id);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -261,12 +261,12 @@ if (string.IsNullOrEmpty(fields["OrderNo"].ToString()))
             // for (int i = 1; i < list.Count;i++ )
             // {
             //     JsonData dr = list[i];
-                
+
             //     db.MerchantDepositOrder.Add(new MerchantDepositOrder()
             //     {
             //         CreateDate = DateTime.Now,
             //         UpdateDate = DateTime.Now,
-                    
+
             //     });
             //     db.SaveChanges();
             // }
@@ -281,7 +281,7 @@ if (string.IsNullOrEmpty(fields["OrderNo"].ToString()))
         /// <returns></returns>
         // public static void ExportExcel(List<RelationData> relationData, string condition)
         // {
-            
+
         // }
     }
 }

+ 15 - 15
Service/Main2/MerchantDepositReturnsService.cs

@@ -66,7 +66,7 @@ namespace MySystem.Service.Main2
         public static MerchantDepositReturns Query(int Id)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("*", "MerchantDepositReturns", Id);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantDepositReturns>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -81,7 +81,7 @@ namespace MySystem.Service.Main2
         public static MerchantDepositReturns Query(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("*", "MerchantDepositReturns", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantDepositReturns>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -99,12 +99,12 @@ namespace MySystem.Service.Main2
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query(fields, "MerchantDepositReturns", condition);
             return obj;
         }
-        
+
         public static decimal Sum(string condition, string field)
         {
             decimal amount = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("Sum(" + field + ") " + field + "", "MerchantDepositReturns", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 amount = decimal.Parse(obj[field].ToString());
             }
@@ -120,7 +120,7 @@ namespace MySystem.Service.Main2
         {
             int result = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("count(" + field + ") " + field + "", "MerchantDepositReturns", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 result = int.Parse(function.CheckInt(obj[field].ToString()));
             }
@@ -135,7 +135,7 @@ namespace MySystem.Service.Main2
         public static bool Exist(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("1", "MerchantDepositReturns", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return true;
             }
@@ -149,12 +149,12 @@ namespace MySystem.Service.Main2
         /// <returns></returns>
         public static AppResultJson Add(Dictionary<string, object> fields, bool check = true)
         {
-            if(check)
+            if (check)
             {
-                
+
             }
             int Id = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Add("MerchantDepositReturns", fields, 0);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -164,12 +164,12 @@ namespace MySystem.Service.Main2
         /// <param name="Id">主键Id</param>
         public static AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
         {
-            if(check)
+            if (check)
             {
-                
+
             }
             new DbServiceNew(AppConfig.Base.main2Tables, _conn).Edit("MerchantDepositReturns", fields, Id);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -213,12 +213,12 @@ namespace MySystem.Service.Main2
             // for (int i = 1; i < list.Count;i++ )
             // {
             //     JsonData dr = list[i];
-                
+
             //     db.MerchantDepositReturns.Add(new MerchantDepositReturns()
             //     {
             //         CreateDate = DateTime.Now,
             //         UpdateDate = DateTime.Now,
-                    
+
             //     });
             //     db.SaveChanges();
             // }
@@ -233,7 +233,7 @@ namespace MySystem.Service.Main2
         /// <returns></returns>
         // public static void ExportExcel(List<RelationData> relationData, string condition)
         // {
-            
+
         // }
     }
 }

+ 91 - 91
Service/Main2/MerchantInfoService.cs

@@ -66,7 +66,7 @@ namespace MySystem.Service.Main2
         public static MerchantInfo Query(int Id)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("*", "MerchantInfo", Id);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantInfo>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -81,7 +81,7 @@ namespace MySystem.Service.Main2
         public static MerchantInfo Query(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("*", "MerchantInfo", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantInfo>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
             }
@@ -99,12 +99,12 @@ namespace MySystem.Service.Main2
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query(fields, "MerchantInfo", condition);
             return obj;
         }
-        
+
         public static decimal Sum(string condition, string field)
         {
             decimal amount = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("Sum(" + field + ") " + field + "", "MerchantInfo", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 amount = decimal.Parse(obj[field].ToString());
             }
@@ -120,7 +120,7 @@ namespace MySystem.Service.Main2
         {
             int result = 0;
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("count(" + field + ") " + field + "", "MerchantInfo", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 result = int.Parse(function.CheckInt(obj[field].ToString()));
             }
@@ -135,7 +135,7 @@ namespace MySystem.Service.Main2
         public static bool Exist(string condition)
         {
             Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("1", "MerchantInfo", condition);
-            if(obj.Keys.Count > 0)
+            if (obj.Keys.Count > 0)
             {
                 return true;
             }
@@ -149,52 +149,52 @@ namespace MySystem.Service.Main2
         /// <returns></returns>
         public static AppResultJson Add(Dictionary<string, object> fields, bool check = true)
         {
-            if(check)
+            if (check)
             {
                 if (string.IsNullOrEmpty(fields["Name"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
-}
-if (string.IsNullOrEmpty(fields["Mobile"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写手机号" };
-}
-if (string.IsNullOrEmpty(fields["ActivationStatus"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写激活状态" };
-}
-if (string.IsNullOrEmpty(fields["ActMaxAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写活动应返金额" };
-}
-if (!function.IsNum(fields["ActMaxAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的活动应返金额" };
-}
-if (string.IsNullOrEmpty(fields["ActCurrentAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写活动已返金额" };
-}
-if (!function.IsNum(fields["ActCurrentAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的活动已返金额" };
-}
-if (!function.IsInt(fields["IsAct"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户激活标记" };
-}
-if (!function.IsInt(fields["ExamineStatus"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的服务费考核状态" };
-}
-if (!function.IsInt(fields["Months"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的达标月数" };
-}
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+                }
+                if (string.IsNullOrEmpty(fields["Mobile"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写手机号" };
+                }
+                if (string.IsNullOrEmpty(fields["ActivationStatus"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写激活状态" };
+                }
+                if (string.IsNullOrEmpty(fields["ActMaxAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写活动应返金额" };
+                }
+                if (!function.IsNum(fields["ActMaxAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的活动应返金额" };
+                }
+                if (string.IsNullOrEmpty(fields["ActCurrentAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写活动已返金额" };
+                }
+                if (!function.IsNum(fields["ActCurrentAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的活动已返金额" };
+                }
+                if (!function.IsInt(fields["IsAct"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户激活标记" };
+                }
+                if (!function.IsInt(fields["ExamineStatus"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的服务费考核状态" };
+                }
+                if (!function.IsInt(fields["Months"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的达标月数" };
+                }
 
             }
             int Id = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Add("MerchantInfo", fields, 0);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -204,52 +204,52 @@ if (!function.IsInt(fields["Months"].ToString()))
         /// <param name="Id">主键Id</param>
         public static AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
         {
-            if(check)
+            if (check)
             {
                 if (string.IsNullOrEmpty(fields["Name"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
-}
-if (string.IsNullOrEmpty(fields["Mobile"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写手机号" };
-}
-if (string.IsNullOrEmpty(fields["ActivationStatus"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写激活状态" };
-}
-if (string.IsNullOrEmpty(fields["ActMaxAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写活动应返金额" };
-}
-if (!function.IsNum(fields["ActMaxAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的活动应返金额" };
-}
-if (string.IsNullOrEmpty(fields["ActCurrentAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写活动已返金额" };
-}
-if (!function.IsNum(fields["ActCurrentAmount"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的活动已返金额" };
-}
-if (!function.IsInt(fields["IsAct"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户激活标记" };
-}
-if (!function.IsInt(fields["ExamineStatus"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的服务费考核状态" };
-}
-if (!function.IsInt(fields["Months"].ToString()))
-{
-    return new AppResultJson() { Status = "-1", Info = "请填写正确的达标月数" };
-}
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+                }
+                if (string.IsNullOrEmpty(fields["Mobile"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写手机号" };
+                }
+                if (string.IsNullOrEmpty(fields["ActivationStatus"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写激活状态" };
+                }
+                if (string.IsNullOrEmpty(fields["ActMaxAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写活动应返金额" };
+                }
+                if (!function.IsNum(fields["ActMaxAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的活动应返金额" };
+                }
+                if (string.IsNullOrEmpty(fields["ActCurrentAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写活动已返金额" };
+                }
+                if (!function.IsNum(fields["ActCurrentAmount"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的活动已返金额" };
+                }
+                if (!function.IsInt(fields["IsAct"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的商户激活标记" };
+                }
+                if (!function.IsInt(fields["ExamineStatus"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的服务费考核状态" };
+                }
+                if (!function.IsInt(fields["Months"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写正确的达标月数" };
+                }
 
             }
             new DbServiceNew(AppConfig.Base.main2Tables, _conn).Edit("MerchantInfo", fields, Id);
-            return new AppResultJson(){ Status = "1", Data = Id };
+            return new AppResultJson() { Status = "1", Data = Id };
         }
 
         /// <summary>
@@ -293,12 +293,12 @@ if (!function.IsInt(fields["Months"].ToString()))
             // for (int i = 1; i < list.Count;i++ )
             // {
             //     JsonData dr = list[i];
-                
+
             //     db.MerchantInfo.Add(new MerchantInfo()
             //     {
             //         CreateDate = DateTime.Now,
             //         UpdateDate = DateTime.Now,
-                    
+
             //     });
             //     db.SaveChanges();
             // }
@@ -313,7 +313,7 @@ if (!function.IsInt(fields["Months"].ToString()))
         /// <returns></returns>
         // public static void ExportExcel(List<RelationData> relationData, string condition)
         // {
-            
+
         // }
     }
 }

+ 25 - 2
Startup.cs

@@ -131,10 +131,33 @@ namespace MySystem
 
             initMain1Server();//直连
             initMain2Server();//银联
-            initBsServer();
+            initBsServer();//bs
+            initYbfServer();
         }
 
         //初始化数据结构
+        private void initBsServer()
+        {
+            Dictionary<string, Dictionary<string, string>> tables = new Dictionary<string, Dictionary<string, string>>();
+            string connstr = Configuration["Setting:ConfigSqlConnStr"];
+            System.Data.DataTable tablecollection = Library.CustomerSqlConn.dtable("select DISTINCT TABLE_NAME from information_schema.columns where table_schema = 'BsSqlConnStr'", connstr);
+            foreach (System.Data.DataRow subtable in tablecollection.Rows)
+            {
+                Dictionary<string, string> Columns = new Dictionary<string, string>();
+                System.Data.DataTable columncollection = Library.CustomerSqlConn.dtable("select COLUMN_NAME,DATA_TYPE from information_schema.columns where table_schema = 'BsSqlConnStr' and TABLE_NAME='" + subtable["TABLE_NAME"].ToString() + "'", connstr);
+                foreach (System.Data.DataRow column in columncollection.Rows)
+                {
+                    string datatype = column["DATA_TYPE"].ToString();
+                    if (datatype == "decimal")
+                    {
+                        datatype = "numeric";
+                    }
+                    Columns.Add(column["COLUMN_NAME"].ToString(), datatype);
+                }
+                tables.Add(subtable["TABLE_NAME"].ToString(), Columns);
+            }
+            AppConfig.Base.bsTables = tables;
+        }
         private void initMain1Server()
         {
             Dictionary<string, Dictionary<string, string>> tables = new Dictionary<string, Dictionary<string, string>>();
@@ -179,7 +202,7 @@ namespace MySystem
             }
             AppConfig.Base.main2Tables = tables;
         }
-        private void initBsServer()
+        private void initYbfServer()
         {
             Dictionary<string, Dictionary<string, string>> tables = new Dictionary<string, Dictionary<string, string>>();
             string connstr = Configuration["Setting:ConfigSqlConnStr"];

+ 1 - 0
appsettings.Development.json

@@ -13,6 +13,7 @@
     "SourceHost": "http://mpap.kexiaoshuang.com",
     "Database": "MpAdminServer",
     "SqlConnStr": "server=47.109.31.237;port=3306;user=MpMainServer;password=Qg7PI5FzvF1uvQUy;database=MpMainServer;charset=utf8;",
+    "BsSqlConnStr": "server=47.109.31.237;port=3306;user=QrCodePlateBsServer;password=ld5Px33wvhyEz44P;database=QrCodePlateBsServer;charset=utf8;",
     "SqlConnStr1": "server=47.109.31.237;port=3306;user=QrCodePlateMainServer;password=ll4DFaALMu9YIooM;database=QrCodePlateMainServer;charset=utf8;",
     "SqlConnStr2": "server=47.109.31.237;port=3306;user=QrCodePlateMainServer;password=ll4DFaALMu9YIooM;database=QrCodePlateMainServer2;charset=utf8;",
     "ConfigSqlConnStr": "server=47.109.31.237;port=3306;user=MpConfigServer;password=SlmLkOclGoy8oKwU;database=MpConfigServer;charset=utf8;",