Browse Source

完成,待测试

DuGuYang 1 year ago
parent
commit
acde03e6bc
75 changed files with 4979 additions and 4039 deletions
  1. 430 0
      AppStart/Alipay/AlipayFunction.cs
  2. 268 0
      AppStart/Alipay/Request/AlipayOpenAgentCommonSignRequest.cs
  3. 126 0
      AppStart/Alipay/Request/AlipayOpenAgentCommonsignConfirmRequest.cs
  4. 24 0
      AppStart/Alipay/Request/AlipayOpenMiniVersionAuditedCancelModel.cs
  5. 30 0
      AppStart/Alipay/Request/AlipayOpenMiniVersionOnlineModel.cs
  6. 12 0
      AppStart/Alipay/Response/AlipayOpenAgentCommonSignResponse.cs
  7. 17 0
      AppStart/Alipay/Response/AlipayOpenAgentCommonsignConfirmResponse.cs
  8. 0 1
      Areas/Api/Controllers/BaseController.cs
  9. 222 0
      Areas/Api/Controllers/v1/MainServer/ConsumersController.cs
  10. 96 1
      Areas/Api/Controllers/v1/MainServer/MerchantInfoController.cs
  11. BIN
      BLL/MySystemLib.dll
  12. 0 0
      BLL/Newtonsoft.Json.dll
  13. 2 0
      Config/Base.cs
  14. 2 2
      MainModels/ConsumerOrders.cs
  15. 7 0
      MainModels/MerchantInfo.cs
  16. 4 4
      MainModels/SysWithdrawalApplyRecord.cs
  17. 103 0
      MainModels/WebCMSEntities.cs
  18. 1 0
      MainModels2/ConsumerOrders.cs
  19. 8 1
      MainModels2/MerchantInfo.cs
  20. 36 0
      MainModels2/WebCMSEntities.cs
  21. 0 25
      OpModels/ActMerDaySummary.cs
  22. 0 25
      OpModels/ActMerMonthSummary.cs
  23. 0 26
      OpModels/Advertisment.cs
  24. 0 27
      OpModels/AmountRecord.cs
  25. 0 30
      OpModels/Col.cs
  26. 0 26
      OpModels/MachineApplyOpRecord.cs
  27. 0 11
      OpModels/MenuRight.cs
  28. 0 28
      OpModels/MsgBlackList.cs
  29. 0 34
      OpModels/MsgPersonal.cs
  30. 0 37
      OpModels/MsgPlacard.cs
  31. 0 25
      OpModels/MsgPlacardRead.cs
  32. 0 31
      OpModels/MsgPush.cs
  33. 0 38
      OpModels/MsgSms.cs
  34. 0 27
      OpModels/MsgSmsSet.cs
  35. 0 29
      OpModels/MsgTemplate.cs
  36. 0 11
      OpModels/OperateForCode.cs
  37. 0 26
      OpModels/OperateLog.cs
  38. 0 23
      OpModels/OperateRightList.cs
  39. 0 24
      OpModels/PageInfo.cs
  40. 0 25
      OpModels/PosCouponDaySummary.cs
  41. 0 24
      OpModels/PosCouponForOp.cs
  42. 0 25
      OpModels/PosCouponMonthSummary.cs
  43. 0 31
      OpModels/PosCouponOrders.cs
  44. 0 26
      OpModels/PosCouponRecord.cs
  45. 0 20
      OpModels/PosCoupons.cs
  46. 0 21
      OpModels/PosMachines.cs
  47. 0 45
      OpModels/PublicAccountSet.cs
  48. 0 19
      OpModels/RightDic.cs
  49. 0 25
      OpModels/SendDaySummary.cs
  50. 0 25
      OpModels/SendMonthSummary.cs
  51. 0 22
      OpModels/StoreActMerDaySummary.cs
  52. 0 22
      OpModels/StoreActMerMonthSummary.cs
  53. 0 27
      OpModels/StoreMachineApply.cs
  54. 0 22
      OpModels/StoreSendDaySummary.cs
  55. 0 22
      OpModels/StoreSendMonthSummary.cs
  56. 0 35
      OpModels/SysAdmin.cs
  57. 0 24
      OpModels/SysAdminRole.cs
  58. 0 13
      OpModels/SysLog.cs
  59. 0 41
      OpModels/SystemSet.cs
  60. 0 26
      OpModels/UploadParams.cs
  61. 0 30
      OpModels/UserAccount.cs
  62. 0 33
      OpModels/UserAccountRecord.cs
  63. 0 42
      OpModels/UserCashRecord.cs
  64. 0 2881
      OpModels/WebCMSEntities.cs
  65. 1 1
      Program.cs
  66. 319 0
      Services/Main/ConsumerOrdersService.cs
  67. 319 0
      Services/Main/ConsumerProfitService.cs
  68. 319 0
      Services/Main/ConsumersService.cs
  69. 519 0
      Services/Main/MerchantAddInfoService.cs
  70. 319 0
      Services/Main/MerchantInfoService.cs
  71. 319 0
      Services/Main2/ConsumerOrdersService.cs
  72. 319 0
      Services/Main2/ConsumerProfitService.cs
  73. 319 0
      Services/Main2/ConsumersService.cs
  74. 519 0
      Services/Main2/MerchantAddInfoService.cs
  75. 319 0
      Services/Main2/MerchantInfoService.cs

File diff suppressed because it is too large
+ 430 - 0
AppStart/Alipay/AlipayFunction.cs


+ 268 - 0
AppStart/Alipay/Request/AlipayOpenAgentCommonSignRequest.cs

@@ -0,0 +1,268 @@
+using System;
+using System.Collections.Generic;
+using Aop.Api.Response;
+using Aop.Api.Util;
+
+namespace Aop.Api.Request
+{
+    /// <summary>
+    /// AOP API: alipay.open.agent.common.sign
+    /// </summary>
+    public class AlipayOpenAgentCommonSignRequest : IAopUploadRequest<AlipayOpenAgentCommonSignResponse>
+    {
+        /// <summary>
+        /// 支付宝生活号(原服务窗)名称(1 app_name、app_demo;2 web_sites;3 alipay_life_name;4 wechat_official_account_name。1、2、3、4至少选择一个填写)
+        /// </summary>
+        public string AlipayLifeName { get; set; }
+
+        /// <summary>
+        /// APP demo,格式为.apk;或者应用说明文档, 格式为.doc .docx .pdf格式(1 app_name、app_demo;2 web_sites;3 alipay_life_name;4 wechat_official_account_name。1、2、3、4至少选择一个填写)
+        /// </summary>
+        public FileItem AppDemo { get; set; }
+
+        /// <summary>
+        /// 商户的APP应用名称(1 app_name、app_demo;2 web_sites;3 alipay_life_name;4 wechat_official_account_name。1、2、3、4至少选择一个填写)
+        /// </summary>
+        public string AppName { get; set; }
+
+        /// <summary>
+        /// 代商户操作事务编号,通过alipay.open.agent.create接口进行创建。
+        /// </summary>
+        public string BatchNo { get; set; }
+
+        /// <summary>
+        /// 营业执照授权函图片,个体工商户如果使用总公司或其他公司的营业执照认证需上传该授权函图片,最小5KB,最大5M,图片格式必须为:png、bmp、gif、jpg、jpeg
+        /// </summary>
+        public FileItem BusinessLicenseAuthPic { get; set; }
+
+        /// <summary>
+        /// 营业执照号码
+        /// </summary>
+        public string BusinessLicenseNo { get; set; }
+
+        /// <summary>
+        /// 营业执照图片。被代创建商户运营主体为个人账户必填,企业账户无需填写。图片最小5KB,最大5M,图片格式必须为:png、bmp、gif、jpg、jpeg。
+        /// </summary>
+        public FileItem BusinessLicensePic { get; set; }
+
+        /// <summary>
+        /// 营业期限
+        /// </summary>
+        public string DateLimitation { get; set; }
+
+        /// <summary>
+        /// 营业期限是否长期有效
+        /// </summary>
+        public Nullable<bool> LongTerm { get; set; }
+
+        /// <summary>
+        /// <a href="https://doc.open.alipay.com/doc2/detail.htm?spm=a219a.7629140.0.0.59bgD2&treeId=222&articleId=105364&docType=1#s1">商家经营类目</a> 中的“经营类目编码”
+        /// </summary>
+        public string MccCode { get; set; }
+
+        /// <summary>
+        /// isv要代商户签约产品码,产品码是支付宝内部对产品的唯一标识
+        /// </summary>
+        public string ProductCode { get; set; }
+
+        /// <summary>
+        /// 店铺内景图片,最小5KB,最大5M,图片格式必须为:png、bmp、gif、jpg、jpeg。
+        /// </summary>
+        public FileItem ShopScenePic { get; set; }
+
+        /// <summary>
+        /// 店铺门头照图片,最小5KB,最大5M,图片格式必须为:png、bmp、gif、jpg、jpeg。
+        /// </summary>
+        public FileItem ShopSignBoardPic { get; set; }
+
+        /// <summary>
+        /// 企业特殊资质图片,可参考 <a href="https://doc.open.alipay.com/doc2/detail.htm?spm=a219a.7629140.0.0.59bgD2&treeId=222&articleId=105364&docType=1#s1">商家经营类目</a> 中的“需要的特殊资质证书”。文件最小为 5KB,最大为5M,图片格式必须为:png、bmp、gif、jpg、jpeg。
+        /// </summary>
+        public FileItem SpecialLicensePic { get; set; }
+
+        /// <summary>
+        /// 网站首页截图,最小5KB,最大5M,图片格式必须为:png、bmp、gif、jpg、jpeg
+        /// </summary>
+        public FileItem WebHomeScreenshot { get; set; }
+
+        /// <summary>
+        /// 网站商品页截图,最小5KB,最大5M,图片格式必须为:png、bmp、gif、jpg、jpeg
+        /// </summary>
+        public FileItem WebItemScreenshot { get; set; }
+
+        /// <summary>
+        /// 网站支付页截图,最小5KB,最大5M,图片格式必须为:png、bmp、gif、jpg、jpeg
+        /// </summary>
+        public FileItem WebPayScreenshot { get; set; }
+
+        /// <summary>
+        /// 接入网址信息(1 app_name、app_demo;2 web_sites;3 alipay_life_name;4 wechat_official_account_name。1、2、3、4至少选择一个填写)
+        /// </summary>
+        public List<string> WebSites { get; set; }
+
+        /// <summary>
+        /// 接入网址的授权涵,格式为.doc .docx .pdf格式
+        /// </summary>
+        public FileItem WebSitesLoa { get; set; }
+
+        /// <summary>
+        /// 网站状态,枚举值为:已上线,未上线
+        /// </summary>
+        public string WebStatus { get; set; }
+
+        /// <summary>
+        /// 可以登录此网站的测试账户
+        /// </summary>
+        public string WebTestAccount { get; set; }
+
+        /// <summary>
+        /// 可以登录此网站的账户的密码。对应web_test_account的登录密码
+        /// </summary>
+        public string WebTestAccountPassword { get; set; }
+
+        /// <summary>
+        /// 微信公众号名称(1 app_name、app_demo;2 web_sites;3 alipay_life_name;4 wechat_official_account_name。1、2、3、4至少选择一个填写)
+        /// </summary>
+        public string WechatOfficialAccountName { get; set; }
+
+        #region IAopRequest Members
+		private bool needEncrypt=false;
+		private string apiVersion = "1.0";
+		private string terminalType;
+		private string terminalInfo;
+        private string prodCode;
+		private string notifyUrl;
+        private string returnUrl;
+		private AopObject bizModel;
+        private Dictionary<string, string> udfParams; //add user-defined text parameters
+
+    	 public void SetNeedEncrypt(bool needEncrypt){
+             this.needEncrypt=needEncrypt;
+        }
+
+        public bool GetNeedEncrypt(){
+
+            return this.needEncrypt;
+        }
+
+		public void SetNotifyUrl(string notifyUrl){
+            this.notifyUrl = notifyUrl;
+        }
+
+        public string GetNotifyUrl(){
+            return this.notifyUrl;
+        }
+
+        public void SetReturnUrl(string returnUrl){
+            this.returnUrl = returnUrl;
+        }
+
+        public string GetReturnUrl(){
+            return this.returnUrl;
+        }
+
+		public void SetTerminalType(String terminalType){
+			this.terminalType=terminalType;
+		}
+
+    	public string GetTerminalType(){
+    		return this.terminalType;
+    	}
+
+    	public void SetTerminalInfo(String terminalInfo){
+    		this.terminalInfo=terminalInfo;
+    	}
+
+    	public string GetTerminalInfo(){
+    		return this.terminalInfo;
+    	}
+
+        public void SetProdCode(String prodCode){
+            this.prodCode=prodCode;
+        }
+
+        public string GetProdCode(){
+            return this.prodCode;
+        }
+
+		public void SetApiVersion(string apiVersion){
+            this.apiVersion=apiVersion;
+        }
+
+        public string GetApiVersion(){
+            return this.apiVersion;
+        }
+
+        public string GetApiName()
+        {
+            return "alipay.open.agent.common.sign";
+        }
+
+        public void PutOtherTextParam(string key, string value) 
+        {
+            if(this.udfParams == null) 
+            {
+                this.udfParams = new Dictionary<string, string>();
+            }
+            this.udfParams.Add(key, value);
+        }
+
+        public IDictionary<string, string> GetParameters()
+        {
+            AopDictionary parameters = new AopDictionary();
+            parameters.Add("alipay_life_name", this.AlipayLifeName);
+            parameters.Add("app_name", this.AppName);
+            parameters.Add("batch_no", this.BatchNo);
+            parameters.Add("business_license_no", this.BusinessLicenseNo);
+            parameters.Add("date_limitation", this.DateLimitation);
+            parameters.Add("long_term", this.LongTerm);
+            parameters.Add("mcc_code", this.MccCode);
+            parameters.Add("product_code", this.ProductCode);
+            parameters.Add("web_sites", this.WebSites);
+            parameters.Add("web_status", this.WebStatus);
+            parameters.Add("web_test_account", this.WebTestAccount);
+            parameters.Add("web_test_account_password", this.WebTestAccountPassword);
+            parameters.Add("wechat_official_account_name", this.WechatOfficialAccountName);
+            if(udfParams != null) 
+            {
+                foreach (string key in this.udfParams.Keys)
+                {
+                    parameters.Add(key, this.udfParams[key]);
+                }
+            }
+            return parameters;
+        }
+		
+		public AopObject GetBizModel()
+        {
+            return this.bizModel;
+        }
+
+        public void SetBizModel(AopObject bizModel)
+        {
+            this.bizModel = bizModel;
+        }
+
+        #endregion
+
+        #region IAopUploadRequest Members
+
+        public IDictionary<string, FileItem> GetFileParameters()
+        {
+            IDictionary<string, FileItem> parameters = new Dictionary<string, FileItem>();
+            parameters.Add("app_demo", this.AppDemo);
+            parameters.Add("business_license_auth_pic", this.BusinessLicenseAuthPic);
+            parameters.Add("business_license_pic", this.BusinessLicensePic);
+            parameters.Add("shop_scene_pic", this.ShopScenePic);
+            parameters.Add("shop_sign_board_pic", this.ShopSignBoardPic);
+            parameters.Add("special_license_pic", this.SpecialLicensePic);
+            parameters.Add("web_home_screenshot", this.WebHomeScreenshot);
+            parameters.Add("web_item_screenshot", this.WebItemScreenshot);
+            parameters.Add("web_pay_screenshot", this.WebPayScreenshot);
+            parameters.Add("web_sites_loa", this.WebSitesLoa);
+            return parameters;
+        }
+
+        #endregion
+    }
+}

+ 126 - 0
AppStart/Alipay/Request/AlipayOpenAgentCommonsignConfirmRequest.cs

@@ -0,0 +1,126 @@
+using System;
+using Aop.Api.Domain;
+using System.Collections.Generic;
+using Aop.Api.Response;
+
+namespace Aop.Api.Request
+{
+    /// <summary>
+    /// AOP API: alipay.open.agent.commonsign.confirm
+    /// </summary>
+    public class AlipayOpenAgentCommonsignConfirmRequest : IAopRequest<AlipayOpenAgentCommonsignConfirmResponse>
+    {
+        /// <summary>
+        /// 代商户签约,提交信息确认接口
+        /// </summary>
+        public string BizContent { get; set; }
+
+        #region IAopRequest Members
+        private bool  needEncrypt=false;
+        private string apiVersion = "1.0";
+	    private string terminalType;
+	    private string terminalInfo;
+        private string prodCode;
+	    private string notifyUrl;
+        private string returnUrl;
+	    private AopObject bizModel;
+        private Dictionary<string, string> udfParams; //add user-defined text parameters
+
+		public void SetNeedEncrypt(bool needEncrypt){
+             this.needEncrypt=needEncrypt;
+        }
+
+        public bool GetNeedEncrypt(){
+
+            return this.needEncrypt;
+        }
+
+		public void SetNotifyUrl(string notifyUrl){
+            this.notifyUrl = notifyUrl;
+        }
+
+        public string GetNotifyUrl(){
+            return this.notifyUrl;
+        }
+
+        public void SetReturnUrl(string returnUrl){
+            this.returnUrl = returnUrl;
+        }
+
+        public string GetReturnUrl(){
+            return this.returnUrl;
+        }
+
+        public void SetTerminalType(String terminalType){
+			this.terminalType=terminalType;
+		}
+
+    	public string GetTerminalType(){
+    		return this.terminalType;
+    	}
+
+    	public void SetTerminalInfo(String terminalInfo){
+    		this.terminalInfo=terminalInfo;
+    	}
+
+    	public string GetTerminalInfo(){
+    		return this.terminalInfo;
+    	}
+
+        public void SetProdCode(String prodCode){
+            this.prodCode=prodCode;
+        }
+
+        public string GetProdCode(){
+            return this.prodCode;
+        }
+
+        public string GetApiName()
+        {
+            return "alipay.open.agent.commonsign.confirm";
+        }
+
+        public void SetApiVersion(string apiVersion){
+            this.apiVersion=apiVersion;
+        }
+
+        public string GetApiVersion(){
+            return this.apiVersion;
+        }
+
+        public void PutOtherTextParam(string key, string value) 
+        {
+            if(this.udfParams == null) 
+            {
+                this.udfParams = new Dictionary<string, string>();
+            }
+            this.udfParams.Add(key, value);
+        }
+
+        public IDictionary<string, string> GetParameters()
+        {
+            AopDictionary parameters = new AopDictionary();
+            parameters.Add("biz_content", this.BizContent);
+            if(udfParams != null) 
+            {
+                foreach (string key in this.udfParams.Keys)
+                {
+                    parameters.Add(key, this.udfParams[key]);
+                }
+            }
+            return parameters;
+        }
+
+		public AopObject GetBizModel()
+        {
+            return this.bizModel;
+        }
+
+        public void SetBizModel(AopObject bizModel)
+        {
+            this.bizModel = bizModel;
+        }
+
+        #endregion
+    }
+}

+ 24 - 0
AppStart/Alipay/Request/AlipayOpenMiniVersionAuditedCancelModel.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Xml.Serialization;
+
+namespace Aop.Api.Request
+{
+    /// <summary>
+    /// AlipayOpenMiniVersionAuditedCancelModel Data Structure.
+    /// </summary>
+    [Serializable]
+    public class AlipayOpenMiniVersionAuditedCancelModel : AopObject
+    {
+        /// <summary>
+        /// 商家小程序版本号。可将已过审、审核被驳回的小程序版本退回到开发中的状态。
+        /// </summary>
+        [XmlElement("app_version")]
+        public string AppVersion { get; set; }
+
+        /// <summary>
+        /// 小程序投放的端参数,例如投放到支付宝钱包是支付宝端。默认支付宝端。支持: com.alipay.alipaywallet:支付宝端; com.alipay.iot.xpaas:支付宝IoT端。
+        /// </summary>
+        [XmlElement("bundle_id")]
+        public string BundleId { get; set; }
+    }
+}

+ 30 - 0
AppStart/Alipay/Request/AlipayOpenMiniVersionOnlineModel.cs

@@ -0,0 +1,30 @@
+using System;
+using System.Xml.Serialization;
+
+namespace Aop.Api.Request
+{
+    /// <summary>
+    /// AlipayOpenMiniVersionOnlineModel Data Structure.
+    /// </summary>
+    [Serializable]
+    public class AlipayOpenMiniVersionOnlineModel : AopObject
+    {
+        /// <summary>
+        /// 商家小程序版本号,需为审核通过状态或灰度中版本。
+        /// </summary>
+        [XmlElement("app_version")]
+        public string AppVersion { get; set; }
+
+        /// <summary>
+        /// 小程序投放的端参数,例如投放到支付宝钱包是支付宝端。默认支付宝端。支持: com.alipay.alipaywallet:支付宝端; com.alipay.iot.xpaas:支付宝IoT端。
+        /// </summary>
+        [XmlElement("bundle_id")]
+        public string BundleId { get; set; }
+
+        /// <summary>
+        /// true - 性能优先; false - 覆盖优先(默认)
+        /// </summary>
+        [XmlElement("downgrade")]
+        public bool Downgrade { get; set; }
+    }
+}

+ 12 - 0
AppStart/Alipay/Response/AlipayOpenAgentCommonSignResponse.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Xml.Serialization;
+
+namespace Aop.Api.Response
+{
+    /// <summary>
+    /// AlipayOpenAgentCommonSignResponse.
+    /// </summary>
+    public class AlipayOpenAgentCommonSignResponse : AopResponse
+    {
+    }
+}

+ 17 - 0
AppStart/Alipay/Response/AlipayOpenAgentCommonsignConfirmResponse.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Xml.Serialization;
+
+namespace Aop.Api.Response
+{
+    /// <summary>
+    /// AlipayOpenAgentCommonsignConfirmResponse.
+    /// </summary>
+    public class AlipayOpenAgentCommonsignConfirmResponse : AopResponse
+    {
+        /// <summary>
+        /// 签约单号
+        /// </summary>
+        [XmlElement("order_no")]
+        public string OrderNo { get; set; }
+    }
+}

+ 0 - 1
Areas/Api/Controllers/BaseController.cs

@@ -21,7 +21,6 @@ namespace MySystem.Areas.Api.Controllers
         public WebCMSEntities maindb = new WebCMSEntities();
         public MainModels2.WebCMSEntities maindb2 = new MainModels2.WebCMSEntities();
         public MiniModels.WebCMSEntities minidb = new MiniModels.WebCMSEntities();
-        public OpModels.WebCMSEntities opdb = new OpModels.WebCMSEntities();
 
         public string ApiKey = "G6H7@J8%";
         public string Host = Library.ConfigurationManager.AppSettings["Host"].ToString();

+ 222 - 0
Areas/Api/Controllers/v1/MainServer/ConsumersController.cs

@@ -0,0 +1,222 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Http;
+using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Options;
+using Microsoft.AspNetCore.Authorization;
+using MySystem.MainModels;
+using LitJson;
+using Library;
+using System.Security.Cryptography;
+using System.Text;
+
+namespace MySystem.Areas.Api.Controllers.v1
+{
+    [Area("Api")]
+    [Route("/v1/QrCodePlateMain/[controller]/[action]")]
+    public class ConsumersController : BaseController
+    {
+        public ConsumersController(IHttpContextAccessor accessor, ILogger<BaseController> logger, IOptions<Setting> setting) : base(accessor, logger, setting)
+        {
+        }
+
+
+        #region 首页-首页-个人信息-返现金额
+        // [Authorize]
+        public JsonResult AmountInfo(string value)
+        {
+            value = DesDecrypt(value);
+            JsonData data = JsonMapper.ToObject(value);
+            Dictionary<string, object> Obj = AmountInfoDo(value);
+            return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
+        }
+        private Dictionary<string, object> AmountInfoDo(string value)
+        {
+            JsonData data = JsonMapper.ToObject(value);
+            string OpenId = data["OpenId"].ToString(); //微信或支付宝Id
+            int Kind = int.Parse(data["Kind"].ToString()); //类型(1 支付宝 2 微信)
+            if (Kind == 1)
+            {
+                OpenId = AlipayMiniOpenIdDo(OpenId);
+            }
+            if (Kind == 2)
+            {
+                OpenId = WeChatMiniOpenIdDo(OpenId);
+            }
+            Dictionary<string, object> Obj = new Dictionary<string, object>();
+            var HeadPhoto = "";
+            var NickName = "";
+            var TotalAmount = 0.00M;
+            var Amount = 0.00M;
+            var Amount2 = 0.00M;
+            var consumer = Services.Main.ConsumersService.Query(" and WechatOpenId=" + OpenId + "");
+            var consumer2 = Services.Main2.ConsumersService.Query(" and WechatOpenId=" + OpenId + "");
+            Amount = Services.Main.ConsumerProfitService.Sum(" and ConsumerId=" + consumer.Id + "", "GetMoney");
+            Amount2 = Services.Main.ConsumerProfitService.Sum(" and ConsumerId=" + consumer.Id + "", "GetMoney");
+            TotalAmount = Amount + Amount2;
+            if (consumer.Id > 0)
+            {
+                HeadPhoto = consumer.HeadPhoto;
+                NickName = consumer.NickName;
+            }
+            if (consumer2.Id > 0)
+            {
+                HeadPhoto = consumer2.HeadPhoto;
+                NickName = consumer2.NickName;
+            }
+            Obj.Add("Amount", TotalAmount); //累计返现金额
+            Obj.Add("HeadPhoto", HeadPhoto); //头像
+            Obj.Add("NickName", NickName); //昵称
+
+            return Obj;
+        }
+        #endregion
+
+
+        #region 首页-首页-个人信息-修改个人信息
+        // [Authorize]
+        public JsonResult EditPersonalInfo(string value)
+        {
+            value = DesDecrypt(value);
+            JsonData data = JsonMapper.ToObject(value);
+            AppResultJson result = EditPersonalInfoDo(value);
+            return Json(new AppResultJson() { Status = result.Status, Info = result.Info, Data = result.Data });
+        }
+        private AppResultJson EditPersonalInfoDo(string value)
+        {
+            JsonData data = JsonMapper.ToObject(value);
+            string OpenId = data["OpenId"].ToString(); //微信或支付宝Id
+            int Kind = int.Parse(data["Kind"].ToString()); //类型(1 支付宝 2 微信)
+            string HeadPhoto = data["HeadPhoto"].ToString(); //头像
+            string NickName = data["NickName"].ToString(); //昵称
+            if (Kind == 1)
+            {
+                OpenId = AlipayMiniOpenIdDo(OpenId);
+            }
+            if (Kind == 2)
+            {
+                OpenId = WeChatMiniOpenIdDo(OpenId);
+            }
+            Dictionary<string, object> Obj = new Dictionary<string, object>();
+            var consumer = maindb.Consumers.FirstOrDefault(m => m.WechatOpenId == OpenId) ?? new Consumers();
+            var consumer2 = maindb2.Consumers.FirstOrDefault(m => m.WechatOpenId == OpenId) ?? new MainModels2.Consumers();
+            // var consumer = Services.Main.ConsumersService.Query(" and WechatOpenId=" + OpenId + "");
+            // var consumer2 = Services.Main2.ConsumersService.Query(" and WechatOpenId=" + OpenId + "");
+            if (string.IsNullOrEmpty(OpenId))
+            {
+                return new AppResultJson() { Status = "-1", Info = "微信或支付宝Id为空" };
+            }
+            if (consumer.Id > 0)
+            {
+                if (!string.IsNullOrEmpty(HeadPhoto))
+                {
+                    consumer.HeadPhoto = HeadPhoto;
+                }
+                if (!string.IsNullOrEmpty(NickName))
+                {
+                    consumer.NickName = NickName;
+                }
+            }
+            if (consumer2.Id > 0)
+            {
+                if (!string.IsNullOrEmpty(HeadPhoto))
+                {
+                    consumer2.HeadPhoto = HeadPhoto;
+                }
+                if (!string.IsNullOrEmpty(NickName))
+                {
+                    consumer2.NickName = NickName;
+                }
+            }
+            maindb.SaveChanges();
+            maindb2.SaveChanges();
+            return new AppResultJson() { Status = "1", Info = "", Data = Obj };
+        }
+        #endregion
+
+
+        #region 消费者-微信小程序通过code获取openid
+        public string WeChatMiniOpenIdDo(string code)
+        {
+            string url = "https://api.weixin.qq.com/sns/jscode2session?appid=" + new WeChatFunction().AppId + "&secret=" + new WeChatFunction().AppSecret + "&js_code=" + code + "&grant_type=authorization_code";
+            function.WriteLog(url, "微信小程序通过code获取openid");
+            string result = function.GetWebRequest(url);
+            function.WriteLog(result + "\n", "微信小程序通过code获取openid");
+            JsonData jsonObj = JsonMapper.ToObject(result);
+            string openid = jsonObj["openid"].ToString();
+            return openid;
+        }
+
+        public Dictionary<string, string> getPhoneNumber(string encryptedData, string iv, string session_key)
+        {
+            Dictionary<string, string> Obj = new Dictionary<string, string>();
+            try
+            {
+                byte[] encryData = Convert.FromBase64String(encryptedData);
+                RijndaelManaged rijndaelCipher = new RijndaelManaged();
+                rijndaelCipher.Key = Convert.FromBase64String(session_key);
+                rijndaelCipher.IV = Convert.FromBase64String(iv);
+                rijndaelCipher.Mode = CipherMode.CBC;
+                rijndaelCipher.Padding = PaddingMode.PKCS7;
+                ICryptoTransform transform = rijndaelCipher.CreateDecryptor();
+                byte[] plainText = transform.TransformFinalBlock(encryData, 0, encryData.Length);
+                string result = Encoding.Default.GetString(plainText);
+
+                dynamic model = Newtonsoft.Json.Linq.JToken.Parse(result) as dynamic;
+                string phoneNumber = model.phoneNumber;
+                //return model.phoneNumber;
+                if (string.IsNullOrEmpty(phoneNumber))
+                {
+                    phoneNumber = "";
+                }
+                Obj.Add("Mobile", phoneNumber);
+            }
+            catch (Exception ex)
+            {
+                Obj.Add("Mobile", "err");
+                function.WriteLog(DateTime.Now.ToString(), "微信小程序获取手机号异常");
+                function.WriteLog(encryptedData, "微信小程序获取手机号异常");
+                function.WriteLog(iv, "微信小程序获取手机号异常");
+                function.WriteLog(session_key, "微信小程序获取手机号异常");
+                function.WriteLog(ex.ToString(), "微信小程序获取手机号异常");
+                function.WriteLog("\r\n\r\n", "微信小程序获取手机号异常");
+            }
+            return Obj;
+        }
+        public string filterEmoji(string str)
+        {
+            string origin = str;
+            try
+            {
+                //关键代码
+                foreach (var a in str)
+                {
+                    byte[] bts = System.Text.Encoding.UTF32.GetBytes(a.ToString());
+                    if (bts[0].ToString() == "253" && bts[1].ToString() == "255")
+                    {
+                        str = str.Replace(a.ToString(), "");
+                    }
+                }
+            }
+            catch
+            {
+                str = origin;
+            }
+            return str;
+        }
+        #endregion
+
+
+        #region 消费者-支付宝通过code获取openid
+        public string AlipayMiniOpenIdDo(string code)
+        {
+            string openid = new AlipayFunction(_accessor.HttpContext).GetAlipayUserId(code);
+            return openid;
+        }
+        #endregion
+
+    }
+}

+ 96 - 1
Areas/Api/Controllers/v1/MainServer/MerchantInfoController.cs

@@ -14,12 +14,107 @@ using Library;
 namespace MySystem.Areas.Api.Controllers.v1
 {
     [Area("Api")]
-    [Route("Api/v1/[controller]/[action]")]
+    [Route("/v1/QrCodePlateMain/[controller]/[action]")]
     public class MerchantInfoController : BaseController
     {
         public MerchantInfoController(IHttpContextAccessor accessor, ILogger<BaseController> logger, IOptions<Setting> setting) : base(accessor, logger, setting)
         {
         }
 
+
+        #region 首页-首页-商户门店信息-列表
+        [Authorize]
+        public JsonResult MerchantInfoList(string value)
+        {
+            value = DesDecrypt(value);
+            JsonData data = JsonMapper.ToObject(value);
+            List<Dictionary<string, object>> dataList = MerchantInfoListDo(value);
+            return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
+        }
+        private List<Dictionary<string, object>> MerchantInfoListDo(string value)
+        {
+            JsonData data = JsonMapper.ToObject(value);
+            string Area = data["Area"].ToString(); //地区
+            var Longitude = function.CheckNum(data["Longitude"].ToString()); //经度
+            var Latitude = function.CheckNum(data["Latitude"].ToString()); //纬度
+            int Sort = int.Parse(data["Sort"].ToString()); //排序(1 人气值降序 2 距离升序)
+            int pageSize = int.Parse(function.CheckInt(data["page_size"].ToString()));
+            int pageNum = int.Parse(function.CheckInt(data["page_num"].ToString()));
+            string condition = " WHERE 1=1";
+            if (!string.IsNullOrEmpty(data["Area"].ToString()))
+            {
+                condition += " AND s.Area=" + Area;
+            }
+            if (!string.IsNullOrEmpty(data["Sort"].ToString()))
+            {
+                if (Sort == 1) condition += " AND ORDER BY s.Popularity DESC";
+                if (Sort == 2) condition += " AND ORDER BY s.distance";
+            }
+            string limitString = " LIMIT " + pageSize;
+            if (pageNum > 1)
+            {
+                int skipNum = pageSize * (pageNum - 1);
+                limitString = " LIMIT " + skipNum + "," + pageSize;
+            }
+            condition += limitString;
+            List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
+            DataTable dt = CustomerSqlConn.dtable("SELECT DISTINCT s.Name,s.Id,s.Kind,s.Areas,s.Address,s.Popularity,s.Longitude,s.Latitude,s.ServicePhone,s.CertMerchantName,s.MerchantShortname,s.StoreEntrancePic,s.BusinessName,s.distance FROM(SELECT aa.*, FORMAT(ST_DISTANCE(POINT(aa.Longitude, aa.Latitude), POINT(" + Longitude + ", " + Latitude + ")),2) AS distance FROM (SELECT a.Id,1 Kind,,a.Name,a.Areas,a.Address,a.Popularity,a.Longitude,a.Latitude,b.ServicePhone,b.CertMerchantName,b.MerchantShortname,b.StoreEntrancePic,b.QualificationType BusinessName FROM(SELECT Id,Name,Areas,Address,Popularity,Longitude,Latitude,Mobile FROM QrCodePlateMainServer.MerchantInfo WHERE IsAct=1 AND (Status=2 OR QueryCount=2))a LEFT JOIN (SELECT Id,ServicePhone,CertMerchantName,MerchantShortname,StoreEntrancePic,SalesScenesType,Qualifications,QualificationType,BizAddressCode,BizStoreAddress FROM QrCodePlateMainServer.MerchantAddInfo)b ON a.Id=b.Id UNION ALL SELECT a.Id,2 Kind,,a.Name,a.Areas,a.Address,a.Popularity,a.Longitude,a.Latitude,b.ServicePhone,b.CertMerchantName,b.MerchantShortname,b.StoreEntrancePic,c.Name BusinessName FROM(SELECT Id,Name,Areas,Address,Popularity,Longitude,Latitude,Mobile FROM QrCodePlateMainServer2.MerchantInfo WHERE IsAct=1 AND (Status=2 OR QueryCount=2))a LEFT JOIN (SELECT Id,ServicePhone,CertMerchantName,MerchantShortname,StoreEntrancePic,BusinessId,BizAddressCode,BizStoreAddress FROM QrCodePlateMainServer2.MerchantAddInfo)b ON a.Id=b.Id LEFT JOIN (SELECT * FROM BusinessScope)c ON b.BusinessId=c.Id)aa)s" + condition, AppConfig.Base.SqlConnStr);
+            foreach (DataRow dr in dt.Rows)
+            {
+                Dictionary<string, object> curData = new Dictionary<string, object>();
+                var Kind = int.Parse(dr["Kind"].ToString()); //商户类型(1 直连 2 银联)
+                string[] StoreEntrancePic = dr["StoreEntrancePic"].ToString().Split(',');
+                curData.Add("Kind", Kind); //商户类型(1 直连 2 银联)
+                curData.Add("StoreEntrancePic", StoreEntrancePic[0]); //门店门头照片
+                curData.Add("BizStoreAddress", dr["Areas"].ToString() + dr["Address"].ToString()); //门店地址
+                curData.Add("Popularity", dr["Popularity"].ToString()); //人气值
+                curData.Add("Distance", dr["distance"].ToString()); //距离
+            }
+            return dataList;
+        }
+        #endregion
+
+
+        #region 首页-首页-商户门店信息-详情
+        // [Authorize]
+        public JsonResult MerchantInfoDetail(string value)
+        {
+            value = DesDecrypt(value);
+            JsonData data = JsonMapper.ToObject(value);
+            Dictionary<string, object> Obj = MerchantInfoDetailDo(value);
+            return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
+        }
+        private Dictionary<string, object> MerchantInfoDetailDo(string value)
+        {
+            JsonData data = JsonMapper.ToObject(value);
+            int Id = int.Parse(data["Id"].ToString()); //商户Id
+            int Kind = int.Parse(data["Kind"].ToString()); //商户类型(1 直连 2 银联)
+            MerchantAddInfo merAddInfo = new MerchantAddInfo();
+            MerchantInfo merInfo = new MerchantInfo();
+            if (Kind == 1)
+            {
+                merAddInfo = Services.Main.MerchantAddInfoService.Query(Id);
+                merInfo = Services.Main.MerchantInfoService.Query(Id);
+            }
+            if (Kind == 2)
+            {
+                merAddInfo = Services.Main.MerchantAddInfoService.Query(Id);
+                merInfo = Services.Main.MerchantInfoService.Query(Id);
+            }
+            Dictionary<string, object> Obj = new Dictionary<string, object>();
+            var Atlas = merAddInfo.StoreEntrancePic.Split(',');
+            Obj.Add("Atlas", Atlas); //图集
+            Obj.Add("BusinessHours", merInfo.BusinessHours == null ? "周一至周五 09:00-22:00" : "周一至周五 09:00 - 22:00"); //营业时间
+            Obj.Add("MerchantMobile", merInfo.Mobile); //商户电话
+            Obj.Add("Introduction", merInfo.BriefIntroduction == null ? "暂无..." : "暂无..."); //商户简介
+            Obj.Add("Longitude", merInfo.Longitude); //经度
+            Obj.Add("Latitude", merInfo.Latitude); //纬度
+            Obj.Add("StoreEntrancePic", merAddInfo.StoreEntrancePic); //门店门头照片
+            Obj.Add("BizStoreAddress", merInfo.Areas + merInfo.Address); //门店地址
+
+            return Obj;
+        }
+        #endregion
+
     }
 }

BIN
BLL/MySystemLib.dll


+ 0 - 0
BLL/Newtonsoft.Json.dll


+ 2 - 0
Config/Base.cs

@@ -12,9 +12,11 @@ namespace AppConfig
         public static string defaultImage = Library.ConfigurationManager.AppSettings["Host"].ToString() + "/skin/app/default/static/images/default.jpg";
         
         public static string SqlConnStr = Library.ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        public static string SqlConnStr2 = Library.ConfigurationManager.AppSettings["SqlConnStr2"].ToString();
         public static string StatConnRds = Library.ConfigurationManager.AppSettings["StatSqlConnStr"].ToString();
         #region 数据库结构
         public static Dictionary<string, Dictionary<string, string>> mainTables = 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>> statTables = new Dictionary<string, Dictionary<string, string>>();
         public static Dictionary<string, Dictionary<string, string>> bsTables = new Dictionary<string, Dictionary<string, string>>();
 

+ 2 - 2
MainModels/ConsumerOrders.cs

@@ -30,9 +30,9 @@ namespace MySystem.MainModels
         public int UserId { get; set; }
         public decimal MerchantActualAmount { get; set; }
         public string DivideLog { get; set; }
-        public int DivideFlag { get; set; }
-        public DateTime? DivideDate { get; set; }
         public string TradePayNo { get; set; }
         public int SetRecordId { get; set; }
+        public int DivideFlag { get; set; }
+        public DateTime? DivideDate { get; set; }
     }
 }

+ 7 - 0
MainModels/MerchantInfo.cs

@@ -48,5 +48,12 @@ namespace MySystem.MainModels
         public int IsAct { get; set; }
         public int ExamineStatus { get; set; }
         public int Months { get; set; }
+        public DateTime? EndTime { get; set; }
+        public DateTime? StartTime { get; set; }
+        public string BusinessHours { get; set; }
+        public string BriefIntroduction { get; set; }
+        public int Popularity { get; set; }
+        public decimal Latitude { get; set; }
+        public decimal Longitude { get; set; }
     }
 }

+ 4 - 4
OpModels/StoreForOperate.cs → MainModels/SysWithdrawalApplyRecord.cs

@@ -1,9 +1,9 @@
 using System;
 using System.Collections.Generic;
 
-namespace MySystem.OpModels
+namespace MySystem.MainModels
 {
-    public partial class StoreForOperate
+    public partial class SysWithdrawalApplyRecord
     {
         public int Id { get; set; }
         public int Sort { get; set; }
@@ -17,7 +17,7 @@ namespace MySystem.OpModels
         public string SeoTitle { get; set; }
         public string SeoKeyword { get; set; }
         public string SeoDescription { get; set; }
-        public int StoreId { get; set; }
-        public int OpId { get; set; }
+        public string AccountNo { get; set; }
+        public string ApplyNo { get; set; }
     }
 }

+ 103 - 0
MainModels/WebCMSEntities.cs

@@ -217,6 +217,7 @@ namespace MySystem.MainModels
         public virtual DbSet<SysAdminRole> SysAdminRole { get; set; }
         public virtual DbSet<SysLog> SysLog { get; set; }
         public virtual DbSet<SysRechargeRecord> SysRechargeRecord { get; set; }
+        public virtual DbSet<SysWithdrawalApplyRecord> SysWithdrawalApplyRecord { get; set; }
         public virtual DbSet<SystemSet> SystemSet { get; set; }
         public virtual DbSet<TeamApply> TeamApply { get; set; }
         public virtual DbSet<TeamApplyForTeamName> TeamApplyForTeamName { get; set; }
@@ -6864,6 +6865,18 @@ namespace MySystem.MainModels
 
                 entity.Property(e => e.BindStatus).HasColumnType("int(11)");
 
+                entity.Property(e => e.BriefIntroduction)
+                    .HasColumnType("longtext")
+                    .HasComment("简介")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.BusinessHours)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("营业时间段")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.CreateDate).HasColumnType("datetime");
 
                 entity.Property(e => e.CreateMan)
@@ -6871,6 +6884,10 @@ namespace MySystem.MainModels
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.EndTime)
+                    .HasColumnType("datetime")
+                    .HasComment("营业结束时间");
+
                 entity.Property(e => e.ExamineStatus)
                     .HasColumnType("int(11)")
                     .HasComment("服务费考核状态");
@@ -6887,6 +6904,10 @@ namespace MySystem.MainModels
 
                 entity.Property(e => e.LastConsumeDate).HasColumnType("datetime");
 
+                entity.Property(e => e.Latitude)
+                    .HasColumnType("decimal(18,8)")
+                    .HasComment("纬度");
+
                 entity.Property(e => e.LoginPwd)
                     .HasColumnType("varchar(32)")
                     .HasCharSet("utf8")
@@ -6897,6 +6918,10 @@ namespace MySystem.MainModels
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.Longitude)
+                    .HasColumnType("decimal(18,8)")
+                    .HasComment("经度");
+
                 entity.Property(e => e.Mobile)
                     .HasColumnType("varchar(11)")
                     .HasCharSet("utf8")
@@ -6916,6 +6941,10 @@ namespace MySystem.MainModels
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.Popularity)
+                    .HasColumnType("int(11)")
+                    .HasComment("人气值");
+
                 entity.Property(e => e.QueryCount).HasColumnType("int(11)");
 
                 entity.Property(e => e.SeoDescription)
@@ -6939,6 +6968,10 @@ namespace MySystem.MainModels
 
                 entity.Property(e => e.Sort).HasColumnType("int(11)");
 
+                entity.Property(e => e.StartTime)
+                    .HasColumnType("datetime")
+                    .HasComment("营业开始时间");
+
                 entity.Property(e => e.Status).HasColumnType("int(11)");
 
                 entity.Property(e => e.TotalActActual).HasColumnType("decimal(18,2)");
@@ -15080,6 +15113,76 @@ namespace MySystem.MainModels
                 entity.Property(e => e.Version).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<SysWithdrawalApplyRecord>(entity =>
+            {
+                entity.HasComment("润观米提现申请记录");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AccountNo)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("账户号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ApplyNo)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("申请单号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("创建人")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount)
+                    .HasColumnType("int(11)")
+                    .HasComment("点击量");
+
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort)
+                    .HasColumnType("int(11)")
+                    .HasComment("排序序号");
+
+                entity.Property(e => e.Status)
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+
+                entity.Property(e => e.UpdateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("更新人")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version)
+                    .HasColumnType("int(11)")
+                    .HasComment("版本号");
+            });
+
             modelBuilder.Entity<SystemSet>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");

+ 1 - 0
MainModels2/ConsumerOrders.cs

@@ -34,5 +34,6 @@ namespace MySystem.MainModels2
         public string DivideLog { get; set; }
         public string TradePayNo { get; set; }
         public int SetRecordId { get; set; }
+        public int SettleAmount { get; set; }
     }
 }

+ 8 - 1
MainModels2/MerchantInfo.cs

@@ -45,8 +45,15 @@ namespace MySystem.MainModels2
         public decimal AllocationAmount { get; set; }
         public decimal ActMaxAmount { get; set; }
         public decimal ActCurrentAmount { get; set; }
-        public int IsAct { get; set; }
         public int ExamineStatus { get; set; }
         public int Months { get; set; }
+        public int IsAct { get; set; }
+        public DateTime? EndTime { get; set; }
+        public DateTime? StartTime { get; set; }
+        public string BusinessHours { get; set; }
+        public string BriefIntroduction { get; set; }
+        public int Popularity { get; set; }
+        public decimal Latitude { get; set; }
+        public decimal Longitude { get; set; }
     }
 }

+ 36 - 0
MainModels2/WebCMSEntities.cs

@@ -2316,6 +2316,10 @@ namespace MySystem.MainModels2
                     .HasColumnType("int(11)")
                     .HasComment("活动记录Id");
 
+                entity.Property(e => e.SettleAmount)
+                    .HasColumnType("int(11)")
+                    .HasComment("结算金额");
+
                 entity.Property(e => e.SnNo)
                     .HasColumnType("varchar(50)")
                     .HasCharSet("utf8")
@@ -6757,6 +6761,18 @@ namespace MySystem.MainModels2
 
                 entity.Property(e => e.BindStatus).HasColumnType("int(11)");
 
+                entity.Property(e => e.BriefIntroduction)
+                    .HasColumnType("longtext")
+                    .HasComment("简介")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.BusinessHours)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("营业时间段")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.CreateDate).HasColumnType("datetime");
 
                 entity.Property(e => e.CreateMan)
@@ -6764,6 +6780,10 @@ namespace MySystem.MainModels2
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.EndTime)
+                    .HasColumnType("datetime")
+                    .HasComment("营业结束时间");
+
                 entity.Property(e => e.ExamineStatus)
                     .HasColumnType("int(11)")
                     .HasComment("服务费考核状态");
@@ -6780,6 +6800,10 @@ namespace MySystem.MainModels2
 
                 entity.Property(e => e.LastConsumeDate).HasColumnType("datetime");
 
+                entity.Property(e => e.Latitude)
+                    .HasColumnType("decimal(18,8)")
+                    .HasComment("纬度");
+
                 entity.Property(e => e.LoginPwd)
                     .HasColumnType("varchar(32)")
                     .HasCharSet("utf8")
@@ -6790,6 +6814,10 @@ namespace MySystem.MainModels2
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.Longitude)
+                    .HasColumnType("decimal(18,8)")
+                    .HasComment("经度");
+
                 entity.Property(e => e.Mobile)
                     .HasColumnType("varchar(11)")
                     .HasCharSet("utf8")
@@ -6809,6 +6837,10 @@ namespace MySystem.MainModels2
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.Popularity)
+                    .HasColumnType("int(11)")
+                    .HasComment("人气值");
+
                 entity.Property(e => e.QueryCount).HasColumnType("int(11)");
 
                 entity.Property(e => e.SeoDescription)
@@ -6832,6 +6864,10 @@ namespace MySystem.MainModels2
 
                 entity.Property(e => e.Sort).HasColumnType("int(11)");
 
+                entity.Property(e => e.StartTime)
+                    .HasColumnType("datetime")
+                    .HasComment("营业开始时间");
+
                 entity.Property(e => e.Status).HasColumnType("int(11)");
 
                 entity.Property(e => e.TotalActActual).HasColumnType("decimal(18,2)");

+ 0 - 25
OpModels/ActMerDaySummary.cs

@@ -1,25 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.OpModels
-{
-    public partial class ActMerDaySummary
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public int Version { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string CreateMan { get; set; }
-        public string UpdateMan { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public int ActCount { get; set; }
-        public int BrandId { get; set; }
-        public string TradeDate { get; set; }
-        public int OpId { get; set; }
-    }
-}

+ 0 - 25
OpModels/ActMerMonthSummary.cs

@@ -1,25 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.OpModels
-{
-    public partial class ActMerMonthSummary
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public int Version { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string CreateMan { get; set; }
-        public string UpdateMan { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public int ActCount { get; set; }
-        public int BrandId { get; set; }
-        public string TradeMonth { get; set; }
-        public int OpId { get; set; }
-    }
-}

+ 0 - 26
OpModels/Advertisment.cs

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

+ 0 - 27
OpModels/AmountRecord.cs

@@ -1,27 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.OpModels
-{
-    public partial class AmountRecord
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public int Version { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string CreateMan { get; set; }
-        public string UpdateMan { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public int OperateType { get; set; }
-        public decimal AfterAmount { get; set; }
-        public decimal BeforeAmount { get; set; }
-        public decimal UseAmount { get; set; }
-        public int ApplyId { get; set; }
-        public int UserId { get; set; }
-    }
-}

+ 0 - 30
OpModels/Col.cs

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

+ 0 - 26
OpModels/MachineApplyOpRecord.cs

@@ -1,26 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.OpModels
-{
-    public partial class MachineApplyOpRecord
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public int Version { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string CreateMan { get; set; }
-        public string UpdateMan { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public int OpType { get; set; }
-        public string TargetSn { get; set; }
-        public string SourceSn { get; set; }
-        public int ApplyId { get; set; }
-        public int OpId { get; set; }
-    }
-}

+ 0 - 11
OpModels/MenuRight.cs

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

+ 0 - 28
OpModels/MsgBlackList.cs

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

+ 0 - 34
OpModels/MsgPersonal.cs

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

+ 0 - 37
OpModels/MsgPlacard.cs

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

+ 0 - 25
OpModels/MsgPlacardRead.cs

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

+ 0 - 31
OpModels/MsgPush.cs

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

+ 0 - 38
OpModels/MsgSms.cs

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

+ 0 - 27
OpModels/MsgSmsSet.cs

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

+ 0 - 29
OpModels/MsgTemplate.cs

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

+ 0 - 11
OpModels/OperateForCode.cs

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

+ 0 - 26
OpModels/OperateLog.cs

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

+ 0 - 23
OpModels/OperateRightList.cs

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

+ 0 - 24
OpModels/PageInfo.cs

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

+ 0 - 25
OpModels/PosCouponDaySummary.cs

@@ -1,25 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.OpModels
-{
-    public partial class PosCouponDaySummary
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public int Version { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string CreateMan { get; set; }
-        public string UpdateMan { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public int SaleCount { get; set; }
-        public int BrandId { get; set; }
-        public string TradeDate { get; set; }
-        public int OpId { get; set; }
-    }
-}

+ 0 - 24
OpModels/PosCouponForOp.cs

@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.OpModels
-{
-    public partial class PosCouponForOp
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public int Version { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string CreateMan { get; set; }
-        public string UpdateMan { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public int OutNum { get; set; }
-        public int TotalNum { get; set; }
-        public int StockNum { get; set; }
-    }
-}

+ 0 - 25
OpModels/PosCouponMonthSummary.cs

@@ -1,25 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.OpModels
-{
-    public partial class PosCouponMonthSummary
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public int Version { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string CreateMan { get; set; }
-        public string UpdateMan { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public int SaleCount { get; set; }
-        public int BrandId { get; set; }
-        public string TradeMonth { get; set; }
-        public int OpId { get; set; }
-    }
-}

+ 0 - 31
OpModels/PosCouponOrders.cs

@@ -1,31 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.OpModels
-{
-    public partial class PosCouponOrders
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public int Version { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string CreateMan { get; set; }
-        public string UpdateMan { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public int ChangeKind { get; set; }
-        public int ChangeCount { get; set; }
-        public int AfterOut { get; set; }
-        public int AfterTotal { get; set; }
-        public int AfterStock { get; set; }
-        public int BeforeOut { get; set; }
-        public int BeforeTotal { get; set; }
-        public int BeforeStock { get; set; }
-        public string OrderNo { get; set; }
-        public int OpId { get; set; }
-    }
-}

+ 0 - 26
OpModels/PosCouponRecord.cs

@@ -1,26 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.OpModels
-{
-    public partial class PosCouponRecord
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public int Version { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string CreateMan { get; set; }
-        public string UpdateMan { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public int ChangeKind { get; set; }
-        public string OrderNo { get; set; }
-        public int ToUserId { get; set; }
-        public int FromUserId { get; set; }
-        public int PosCouponId { get; set; }
-    }
-}

+ 0 - 20
OpModels/PosCoupons.cs

@@ -1,20 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.OpModels
-{
-    public partial class PosCoupons
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public int PosCouponId { get; set; }
-        public int OpId { get; set; }
-    }
-}

+ 0 - 21
OpModels/PosMachines.cs

@@ -1,21 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.OpModels
-{
-    public partial class PosMachines
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public int PosId { get; set; }
-        public int OpId { get; set; }
-        public int BrandId { get; set; }
-    }
-}

+ 0 - 45
OpModels/PublicAccountSet.cs

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

+ 0 - 19
OpModels/RightDic.cs

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

+ 0 - 25
OpModels/SendDaySummary.cs

@@ -1,25 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.OpModels
-{
-    public partial class SendDaySummary
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public int Version { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string CreateMan { get; set; }
-        public string UpdateMan { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public int SendCount { get; set; }
-        public int BrandId { get; set; }
-        public string TradeDate { get; set; }
-        public int OpId { get; set; }
-    }
-}

+ 0 - 25
OpModels/SendMonthSummary.cs

@@ -1,25 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.OpModels
-{
-    public partial class SendMonthSummary
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public int Version { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string CreateMan { get; set; }
-        public string UpdateMan { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public int SendCount { get; set; }
-        public int BrandId { get; set; }
-        public string TradeMonth { get; set; }
-        public int OpId { get; set; }
-    }
-}

+ 0 - 22
OpModels/StoreActMerDaySummary.cs

@@ -1,22 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.OpModels
-{
-    public partial class StoreActMerDaySummary
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public int ActCount { get; set; }
-        public int BrandId { get; set; }
-        public string TradeDate { get; set; }
-        public int OpId { get; set; }
-    }
-}

+ 0 - 22
OpModels/StoreActMerMonthSummary.cs

@@ -1,22 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.OpModels
-{
-    public partial class StoreActMerMonthSummary
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public int ActCount { get; set; }
-        public int BrandId { get; set; }
-        public string TradeMonth { get; set; }
-        public int OpId { get; set; }
-    }
-}

+ 0 - 27
OpModels/StoreMachineApply.cs

@@ -1,27 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.OpModels
-{
-    public partial class StoreMachineApply
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public int UserId { get; set; }
-        public string SendSn { get; set; }
-        public string ErpCode { get; set; }
-        public string SendMode { get; set; }
-        public decimal UseAmount { get; set; }
-        public int SendNum { get; set; }
-        public int ApplyNum { get; set; }
-        public string ApplyNo { get; set; }
-        public int BrandId { get; set; }
-    }
-}

+ 0 - 22
OpModels/StoreSendDaySummary.cs

@@ -1,22 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.OpModels
-{
-    public partial class StoreSendDaySummary
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public int SendCount { get; set; }
-        public int BrandId { get; set; }
-        public string TradeDate { get; set; }
-        public int OpId { get; set; }
-    }
-}

+ 0 - 22
OpModels/StoreSendMonthSummary.cs

@@ -1,22 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.OpModels
-{
-    public partial class StoreSendMonthSummary
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public int SendCount { get; set; }
-        public int BrandId { get; set; }
-        public string TradeMonth { get; set; }
-        public int OpId { get; set; }
-    }
-}

+ 0 - 35
OpModels/SysAdmin.cs

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

+ 0 - 24
OpModels/SysAdminRole.cs

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

+ 0 - 13
OpModels/SysLog.cs

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

+ 0 - 41
OpModels/SystemSet.cs

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

+ 0 - 26
OpModels/UploadParams.cs

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

+ 0 - 30
OpModels/UserAccount.cs

@@ -1,30 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.OpModels
-{
-    public partial class UserAccount
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public int Version { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string CreateMan { get; set; }
-        public string UpdateMan { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public decimal WithdrawingAmount { get; set; }
-        public decimal ValidAmount { get; set; }
-        public decimal TotalAmount { get; set; }
-        public decimal WithdrawAmount { get; set; }
-        public int AccountStatus { get; set; }
-        public decimal BalanceAmount { get; set; }
-        public decimal FreezeAmount { get; set; }
-        public decimal TotalAmt { get; set; }
-        public int UserId { get; set; }
-    }
-}

+ 0 - 33
OpModels/UserAccountRecord.cs

@@ -1,33 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.OpModels
-{
-    public partial class UserAccountRecord
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public int Version { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string CreateMan { get; set; }
-        public string UpdateMan { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public string TransRecordNo { get; set; }
-        public string Remark { get; set; }
-        public decimal AfterBalanceAmount { get; set; }
-        public decimal BeforeBalanceAmount { get; set; }
-        public decimal AfterFreezeAmount { get; set; }
-        public decimal BeforeFreezeAmount { get; set; }
-        public decimal AfterTotalAmount { get; set; }
-        public decimal BeforeTotalAmount { get; set; }
-        public decimal ChangeAmount { get; set; }
-        public int ProductType { get; set; }
-        public int ChangeType { get; set; }
-        public int UserId { get; set; }
-    }
-}

+ 0 - 42
OpModels/UserCashRecord.cs

@@ -1,42 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.OpModels
-{
-    public partial class UserCashRecord
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public int Version { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string CreateMan { get; set; }
-        public string UpdateMan { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public string Remark { get; set; }
-        public string MediaSource { get; set; }
-        public string Ip { get; set; }
-        public DateTime? PaymentDate { get; set; }
-        public string ReturnMsg { get; set; }
-        public string ReturnCode { get; set; }
-        public string ResData { get; set; }
-        public string ReqData { get; set; }
-        public decimal ManageFee { get; set; }
-        public decimal TradeFee { get; set; }
-        public decimal ActualTradeAmount { get; set; }
-        public decimal TradeAmount { get; set; }
-        public string ChanelName { get; set; }
-        public string ChannelCode { get; set; }
-        public string PayTradeNo { get; set; }
-        public int TradeType { get; set; }
-        public string SettleBankName { get; set; }
-        public string SettleBankCardNo { get; set; }
-        public string IdCardNo { get; set; }
-        public int UserId { get; set; }
-        public string CashOrderNo { get; set; }
-    }
-}

+ 0 - 2881
OpModels/WebCMSEntities.cs

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

+ 1 - 1
Program.cs

@@ -22,7 +22,7 @@ namespace MySystem
                 .ConfigureWebHostDefaults(webBuilder =>
                 {
                     webBuilder
-                    .UseUrls("http://*:5311")
+                    .UseUrls("http://*:5321")
                     .UseKestrel()
                     .UseContentRoot(Directory.GetCurrentDirectory())
                     .UseIISIntegration()

+ 319 - 0
Services/Main/ConsumerOrdersService.cs

@@ -0,0 +1,319 @@
+/*
+ * 订单
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.MainModels;
+using Library;
+using LitJson;
+
+namespace MySystem.Services.Main
+{
+    public class ConsumerOrdersService
+    {
+        static string _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+
+        /// <summary>
+        /// 查询列表(适合多表关联查询)
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public static List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列,不设置则返回全部字段
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).IndexData("ConsumerOrders", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public static List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列,不设置则返回全部字段
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).IndexData("ConsumerOrders", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询列表(单表)
+        /// </summary>
+        /// <param name="fieldList">返回的字段</param>
+        /// <param name="condition">查询条件</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <param name="orderBy">排序</param>
+        /// <returns></returns>
+        public static List<Dictionary<string, object>> List(string fieldList, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = fieldList.Split(',').ToList(); //要显示的列
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).IndexData("ConsumerOrders", new List<RelationData>(), orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static ConsumerOrders Query(int Id)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query("*", "ConsumerOrders", Id);
+            if (obj.Keys.Count > 0)
+            {
+                return Newtonsoft.Json.JsonConvert.DeserializeObject<ConsumerOrders>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
+            }
+            return new ConsumerOrders();
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        public static ConsumerOrders Query(string condition)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query("*", "ConsumerOrders", condition);
+            if (obj.Keys.Count > 0)
+            {
+                return Newtonsoft.Json.JsonConvert.DeserializeObject<ConsumerOrders>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
+            }
+            return new ConsumerOrders();
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="fields">返回的字段</param>
+        /// <returns></returns>
+        public static Dictionary<string, object> Query(string condition, string fields)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _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.mainTables, _conn).Query("Sum(" + field + ") " + field + "", "ConsumerOrders", condition);
+            if (obj.Keys.Count > 0)
+            {
+                amount = decimal.Parse(function.CheckNum(obj[field].ToString()));
+            }
+            return amount;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static int Count(string condition = "", string field = "Id")
+        {
+            int result = 0;
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query("count(" + field + ") " + field + "", "ConsumerOrders", condition);
+            if (obj.Keys.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(obj[field].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static bool Exist(string condition)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query("1", "ConsumerOrders", condition);
+            if (obj.Keys.Count > 0)
+            {
+                return true;
+            }
+            return false;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public static AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if (check)
+            {
+                if (string.IsNullOrEmpty(fields["Name"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+                }
+                if (string.IsNullOrEmpty(fields["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.mainTables, _conn).Add("ConsumerOrders", fields, 0);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public static AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if (check)
+            {
+                if (string.IsNullOrEmpty(fields["Name"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+                }
+                if (string.IsNullOrEmpty(fields["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.mainTables, _conn).Edit("ConsumerOrders", fields, Id);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public static void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbServiceNew(AppConfig.Base.mainTables, _conn).Edit("ConsumerOrders", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public static void Delete(int Id)
+        {
+            new DbServiceNew(AppConfig.Base.mainTables, _conn).Delete("ConsumerOrders", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public static void Sort(int Id, int Sort)
+        {
+            new DbServiceNew(AppConfig.Base.mainTables, _conn).Sort("ConsumerOrders", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public static void Import(string ExcelData)
+        {
+            // WebCMSEntities db = new WebCMSEntities();
+            // JsonData list = JsonMapper.ToObject(ExcelData);
+            // for (int i = 1; i < list.Count;i++ )
+            // {
+            //     JsonData dr = list[i];
+
+            //     db.ConsumerOrders.Add(new ConsumerOrders()
+            //     {
+            //         CreateDate = DateTime.Now,
+            //         UpdateDate = DateTime.Now,
+
+            //     });
+            //     db.SaveChanges();
+            // }
+            // db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public static void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+
+        // }
+    }
+}

+ 319 - 0
Services/Main/ConsumerProfitService.cs

@@ -0,0 +1,319 @@
+/*
+ * 消费者分红
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.MainModels;
+using Library;
+using LitJson;
+
+namespace MySystem.Services.Main
+{
+    public class ConsumerProfitService
+    {
+        static string _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+
+        /// <summary>
+        /// 查询列表(适合多表关联查询)
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public static List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列,不设置则返回全部字段
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).IndexData("ConsumerProfit", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public static List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列,不设置则返回全部字段
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).IndexData("ConsumerProfit", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询列表(单表)
+        /// </summary>
+        /// <param name="fieldList">返回的字段</param>
+        /// <param name="condition">查询条件</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <param name="orderBy">排序</param>
+        /// <returns></returns>
+        public static List<Dictionary<string, object>> List(string fieldList, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = fieldList.Split(',').ToList(); //要显示的列
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).IndexData("ConsumerProfit", new List<RelationData>(), orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static ConsumerProfit Query(int Id)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query("*", "ConsumerProfit", Id);
+            if (obj.Keys.Count > 0)
+            {
+                return Newtonsoft.Json.JsonConvert.DeserializeObject<ConsumerProfit>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
+            }
+            return new ConsumerProfit();
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        public static ConsumerProfit Query(string condition)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query("*", "ConsumerProfit", condition);
+            if (obj.Keys.Count > 0)
+            {
+                return Newtonsoft.Json.JsonConvert.DeserializeObject<ConsumerProfit>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
+            }
+            return new ConsumerProfit();
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="fields">返回的字段</param>
+        /// <returns></returns>
+        public static Dictionary<string, object> Query(string condition, string fields)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query(fields, "ConsumerProfit", condition);
+            return obj;
+        }
+
+        public static decimal Sum(string condition, string field)
+        {
+            decimal amount = 0;
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query("Sum(" + field + ") " + field + "", "ConsumerProfit", condition);
+            if (obj.Keys.Count > 0)
+            {
+                amount = decimal.Parse(function.CheckNum(obj[field].ToString()));
+            }
+            return amount;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static int Count(string condition = "", string field = "Id")
+        {
+            int result = 0;
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query("count(" + field + ") " + field + "", "ConsumerProfit", condition);
+            if (obj.Keys.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(obj[field].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static bool Exist(string condition)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query("1", "ConsumerProfit", condition);
+            if (obj.Keys.Count > 0)
+            {
+                return true;
+            }
+            return false;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public static AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if (check)
+            {
+                if (string.IsNullOrEmpty(fields["Name"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+                }
+                if (string.IsNullOrEmpty(fields["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.mainTables, _conn).Add("ConsumerProfit", fields, 0);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public static AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if (check)
+            {
+                if (string.IsNullOrEmpty(fields["Name"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+                }
+                if (string.IsNullOrEmpty(fields["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.mainTables, _conn).Edit("ConsumerProfit", fields, Id);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public static void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbServiceNew(AppConfig.Base.mainTables, _conn).Edit("ConsumerProfit", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public static void Delete(int Id)
+        {
+            new DbServiceNew(AppConfig.Base.mainTables, _conn).Delete("ConsumerProfit", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public static void Sort(int Id, int Sort)
+        {
+            new DbServiceNew(AppConfig.Base.mainTables, _conn).Sort("ConsumerProfit", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public static void Import(string ExcelData)
+        {
+            // WebCMSEntities db = new WebCMSEntities();
+            // JsonData list = JsonMapper.ToObject(ExcelData);
+            // for (int i = 1; i < list.Count;i++ )
+            // {
+            //     JsonData dr = list[i];
+
+            //     db.ConsumerProfit.Add(new ConsumerProfit()
+            //     {
+            //         CreateDate = DateTime.Now,
+            //         UpdateDate = DateTime.Now,
+
+            //     });
+            //     db.SaveChanges();
+            // }
+            // db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public static void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+
+        // }
+    }
+}

+ 319 - 0
Services/Main/ConsumersService.cs

@@ -0,0 +1,319 @@
+/*
+ * 消费者
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.MainModels;
+using Library;
+using LitJson;
+
+namespace MySystem.Services.Main
+{
+    public class ConsumersService
+    {
+        static string _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+
+        /// <summary>
+        /// 查询列表(适合多表关联查询)
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public static List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列,不设置则返回全部字段
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).IndexData("Consumers", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public static List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列,不设置则返回全部字段
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).IndexData("Consumers", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询列表(单表)
+        /// </summary>
+        /// <param name="fieldList">返回的字段</param>
+        /// <param name="condition">查询条件</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <param name="orderBy">排序</param>
+        /// <returns></returns>
+        public static List<Dictionary<string, object>> List(string fieldList, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = fieldList.Split(',').ToList(); //要显示的列
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).IndexData("Consumers", new List<RelationData>(), orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static Consumers Query(int Id)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query("*", "Consumers", Id);
+            if (obj.Keys.Count > 0)
+            {
+                return Newtonsoft.Json.JsonConvert.DeserializeObject<Consumers>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
+            }
+            return new Consumers();
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        public static Consumers Query(string condition)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query("*", "Consumers", condition);
+            if (obj.Keys.Count > 0)
+            {
+                return Newtonsoft.Json.JsonConvert.DeserializeObject<Consumers>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
+            }
+            return new Consumers();
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="fields">返回的字段</param>
+        /// <returns></returns>
+        public static Dictionary<string, object> Query(string condition, string fields)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query(fields, "Consumers", condition);
+            return obj;
+        }
+
+        public static decimal Sum(string condition, string field)
+        {
+            decimal amount = 0;
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query("Sum(" + field + ") " + field + "", "Consumers", condition);
+            if (obj.Keys.Count > 0)
+            {
+                amount = decimal.Parse(function.CheckNum(obj[field].ToString()));
+            }
+            return amount;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static int Count(string condition = "", string field = "Id")
+        {
+            int result = 0;
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query("count(" + field + ") " + field + "", "Consumers", condition);
+            if (obj.Keys.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(obj[field].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static bool Exist(string condition)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query("1", "Consumers", condition);
+            if (obj.Keys.Count > 0)
+            {
+                return true;
+            }
+            return false;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public static AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if (check)
+            {
+                if (string.IsNullOrEmpty(fields["Name"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+                }
+                if (string.IsNullOrEmpty(fields["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.mainTables, _conn).Add("Consumers", fields, 0);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public static AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if (check)
+            {
+                if (string.IsNullOrEmpty(fields["Name"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+                }
+                if (string.IsNullOrEmpty(fields["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.mainTables, _conn).Edit("Consumers", fields, Id);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public static void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbServiceNew(AppConfig.Base.mainTables, _conn).Edit("Consumers", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public static void Delete(int Id)
+        {
+            new DbServiceNew(AppConfig.Base.mainTables, _conn).Delete("Consumers", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public static void Sort(int Id, int Sort)
+        {
+            new DbServiceNew(AppConfig.Base.mainTables, _conn).Sort("Consumers", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public static void Import(string ExcelData)
+        {
+            // WebCMSEntities db = new WebCMSEntities();
+            // JsonData list = JsonMapper.ToObject(ExcelData);
+            // for (int i = 1; i < list.Count;i++ )
+            // {
+            //     JsonData dr = list[i];
+
+            //     db.Consumers.Add(new Consumers()
+            //     {
+            //         CreateDate = DateTime.Now,
+            //         UpdateDate = DateTime.Now,
+
+            //     });
+            //     db.SaveChanges();
+            // }
+            // db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public static void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+
+        // }
+    }
+}

+ 519 - 0
Services/Main/MerchantAddInfoService.cs

@@ -0,0 +1,519 @@
+/*
+ * 商户进件资料
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.MainModels;
+using Library;
+using LitJson;
+
+namespace MySystem.Services.Main
+{
+    public class MerchantAddInfoService
+    {
+        static string _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+
+        /// <summary>
+        /// 查询列表(适合多表关联查询)
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public static List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列,不设置则返回全部字段
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).IndexData("MerchantAddInfo", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public static List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列,不设置则返回全部字段
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).IndexData("MerchantAddInfo", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询列表(单表)
+        /// </summary>
+        /// <param name="fieldList">返回的字段</param>
+        /// <param name="condition">查询条件</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <param name="orderBy">排序</param>
+        /// <returns></returns>
+        public static List<Dictionary<string, object>> List(string fieldList, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = fieldList.Split(',').ToList(); //要显示的列
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).IndexData("MerchantAddInfo", new List<RelationData>(), orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static MerchantAddInfo Query(int Id)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query("*", "MerchantAddInfo", Id);
+            if (obj.Keys.Count > 0)
+            {
+                return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantAddInfo>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
+            }
+            return new MerchantAddInfo();
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        public static MerchantAddInfo Query(string condition)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query("*", "MerchantAddInfo", condition);
+            if (obj.Keys.Count > 0)
+            {
+                return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantAddInfo>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
+            }
+            return new MerchantAddInfo();
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="fields">返回的字段</param>
+        /// <returns></returns>
+        public static Dictionary<string, object> Query(string condition, string fields)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _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.mainTables, _conn).Query("Sum(" + field + ") " + field + "", "MerchantAddInfo", condition);
+            if (obj.Keys.Count > 0)
+            {
+                amount = decimal.Parse(function.CheckNum(obj[field].ToString()));
+            }
+            return amount;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static int Count(string condition = "", string field = "Id")
+        {
+            int result = 0;
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query("count(" + field + ") " + field + "", "MerchantAddInfo", condition);
+            if (obj.Keys.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(obj[field].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static bool Exist(string condition)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query("1", "MerchantAddInfo", condition);
+            if (obj.Keys.Count > 0)
+            {
+                return true;
+            }
+            return false;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public static AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            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 = "请填写银行账号" };
+                }
+
+            }
+            int Id = new DbServiceNew(AppConfig.Base.mainTables, _conn).Add("MerchantAddInfo", fields, 0);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public static AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            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 = "请填写银行账号" };
+                }
+
+            }
+            new DbServiceNew(AppConfig.Base.mainTables, _conn).Edit("MerchantAddInfo", fields, Id);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public static void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbServiceNew(AppConfig.Base.mainTables, _conn).Edit("MerchantAddInfo", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public static void Delete(int Id)
+        {
+            new DbServiceNew(AppConfig.Base.mainTables, _conn).Delete("MerchantAddInfo", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public static void Sort(int Id, int Sort)
+        {
+            new DbServiceNew(AppConfig.Base.mainTables, _conn).Sort("MerchantAddInfo", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public static void Import(string ExcelData)
+        {
+            // WebCMSEntities db = new WebCMSEntities();
+            // JsonData list = JsonMapper.ToObject(ExcelData);
+            // for (int i = 1; i < list.Count;i++ )
+            // {
+            //     JsonData dr = list[i];
+
+            //     db.MerchantAddInfo.Add(new MerchantAddInfo()
+            //     {
+            //         CreateDate = DateTime.Now,
+            //         UpdateDate = DateTime.Now,
+
+            //     });
+            //     db.SaveChanges();
+            // }
+            // db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public static void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+
+        // }
+    }
+}

+ 319 - 0
Services/Main/MerchantInfoService.cs

@@ -0,0 +1,319 @@
+/*
+ * 商户
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.MainModels;
+using Library;
+using LitJson;
+
+namespace MySystem.Services.Main
+{
+    public class MerchantInfoService
+    {
+        static string _conn = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+
+        /// <summary>
+        /// 查询列表(适合多表关联查询)
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public static List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列,不设置则返回全部字段
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).IndexData("MerchantInfo", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public static List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列,不设置则返回全部字段
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).IndexData("MerchantInfo", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询列表(单表)
+        /// </summary>
+        /// <param name="fieldList">返回的字段</param>
+        /// <param name="condition">查询条件</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <param name="orderBy">排序</param>
+        /// <returns></returns>
+        public static List<Dictionary<string, object>> List(string fieldList, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = fieldList.Split(',').ToList(); //要显示的列
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).IndexData("MerchantInfo", new List<RelationData>(), orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static MerchantInfo Query(int Id)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query("*", "MerchantInfo", Id);
+            if (obj.Keys.Count > 0)
+            {
+                return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantInfo>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
+            }
+            return new MerchantInfo();
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        public static MerchantInfo Query(string condition)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query("*", "MerchantInfo", condition);
+            if (obj.Keys.Count > 0)
+            {
+                return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantInfo>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
+            }
+            return new MerchantInfo();
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="fields">返回的字段</param>
+        /// <returns></returns>
+        public static Dictionary<string, object> Query(string condition, string fields)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _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.mainTables, _conn).Query("Sum(" + field + ") " + field + "", "MerchantInfo", condition);
+            if (obj.Keys.Count > 0)
+            {
+                amount = decimal.Parse(function.CheckNum(obj[field].ToString()));
+            }
+            return amount;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static int Count(string condition = "", string field = "Id")
+        {
+            int result = 0;
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query("count(" + field + ") " + field + "", "MerchantInfo", condition);
+            if (obj.Keys.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(obj[field].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static bool Exist(string condition)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.mainTables, _conn).Query("1", "MerchantInfo", condition);
+            if (obj.Keys.Count > 0)
+            {
+                return true;
+            }
+            return false;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public static AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if (check)
+            {
+                if (string.IsNullOrEmpty(fields["Name"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+                }
+                if (string.IsNullOrEmpty(fields["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.mainTables, _conn).Add("MerchantInfo", fields, 0);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public static AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if (check)
+            {
+                if (string.IsNullOrEmpty(fields["Name"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+                }
+                if (string.IsNullOrEmpty(fields["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.mainTables, _conn).Edit("MerchantInfo", fields, Id);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public static void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbServiceNew(AppConfig.Base.mainTables, _conn).Edit("MerchantInfo", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public static void Delete(int Id)
+        {
+            new DbServiceNew(AppConfig.Base.mainTables, _conn).Delete("MerchantInfo", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public static void Sort(int Id, int Sort)
+        {
+            new DbServiceNew(AppConfig.Base.mainTables, _conn).Sort("MerchantInfo", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public static void Import(string ExcelData)
+        {
+            // WebCMSEntities db = new WebCMSEntities();
+            // JsonData list = JsonMapper.ToObject(ExcelData);
+            // for (int i = 1; i < list.Count;i++ )
+            // {
+            //     JsonData dr = list[i];
+
+            //     db.MerchantInfo.Add(new MerchantInfo()
+            //     {
+            //         CreateDate = DateTime.Now,
+            //         UpdateDate = DateTime.Now,
+
+            //     });
+            //     db.SaveChanges();
+            // }
+            // db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public static void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+
+        // }
+    }
+}

+ 319 - 0
Services/Main2/ConsumerOrdersService.cs

@@ -0,0 +1,319 @@
+/*
+ * 订单
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.MainModels2;
+using Library;
+using LitJson;
+
+namespace MySystem.Services.Main2
+{
+    public class ConsumerOrdersService
+    {
+        static string _conn = ConfigurationManager.AppSettings["SqlConnStr2"].ToString();
+
+        /// <summary>
+        /// 查询列表(适合多表关联查询)
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public static List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列,不设置则返回全部字段
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).IndexData("ConsumerOrders", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public static List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列,不设置则返回全部字段
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).IndexData("ConsumerOrders", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询列表(单表)
+        /// </summary>
+        /// <param name="fieldList">返回的字段</param>
+        /// <param name="condition">查询条件</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <param name="orderBy">排序</param>
+        /// <returns></returns>
+        public static List<Dictionary<string, object>> List(string fieldList, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = fieldList.Split(',').ToList(); //要显示的列
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).IndexData("ConsumerOrders", new List<RelationData>(), orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static ConsumerOrders Query(int Id)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("*", "ConsumerOrders", Id);
+            if (obj.Keys.Count > 0)
+            {
+                return Newtonsoft.Json.JsonConvert.DeserializeObject<ConsumerOrders>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
+            }
+            return new ConsumerOrders();
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        public static ConsumerOrders Query(string condition)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("*", "ConsumerOrders", condition);
+            if (obj.Keys.Count > 0)
+            {
+                return Newtonsoft.Json.JsonConvert.DeserializeObject<ConsumerOrders>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
+            }
+            return new ConsumerOrders();
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="fields">返回的字段</param>
+        /// <returns></returns>
+        public static Dictionary<string, object> Query(string condition, string fields)
+        {
+            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)
+            {
+                amount = decimal.Parse(function.CheckNum(obj[field].ToString()));
+            }
+            return amount;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static int Count(string condition = "", string field = "Id")
+        {
+            int result = 0;
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("count(" + field + ") " + field + "", "ConsumerOrders", condition);
+            if (obj.Keys.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(obj[field].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        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)
+            {
+                return true;
+            }
+            return false;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public static AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if (check)
+            {
+                if (string.IsNullOrEmpty(fields["Name"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+                }
+                if (string.IsNullOrEmpty(fields["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("ConsumerOrders", fields, 0);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public static AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if (check)
+            {
+                if (string.IsNullOrEmpty(fields["Name"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+                }
+                if (string.IsNullOrEmpty(fields["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("ConsumerOrders", fields, Id);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public static void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbServiceNew(AppConfig.Base.main2Tables, _conn).Edit("ConsumerOrders", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public static void Delete(int Id)
+        {
+            new DbServiceNew(AppConfig.Base.main2Tables, _conn).Delete("ConsumerOrders", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public static void Sort(int Id, int Sort)
+        {
+            new DbServiceNew(AppConfig.Base.main2Tables, _conn).Sort("ConsumerOrders", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public static void Import(string ExcelData)
+        {
+            // WebCMSEntities db = new WebCMSEntities();
+            // JsonData list = JsonMapper.ToObject(ExcelData);
+            // for (int i = 1; i < list.Count;i++ )
+            // {
+            //     JsonData dr = list[i];
+
+            //     db.ConsumerOrders.Add(new ConsumerOrders()
+            //     {
+            //         CreateDate = DateTime.Now,
+            //         UpdateDate = DateTime.Now,
+
+            //     });
+            //     db.SaveChanges();
+            // }
+            // db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public static void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+
+        // }
+    }
+}

+ 319 - 0
Services/Main2/ConsumerProfitService.cs

@@ -0,0 +1,319 @@
+/*
+ * 消费者分红
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.MainModels2;
+using Library;
+using LitJson;
+
+namespace MySystem.Services.Main2
+{
+    public class ConsumerProfitService
+    {
+        static string _conn = ConfigurationManager.AppSettings["SqlConnStr2"].ToString();
+
+        /// <summary>
+        /// 查询列表(适合多表关联查询)
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public static List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列,不设置则返回全部字段
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).IndexData("ConsumerProfit", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public static List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列,不设置则返回全部字段
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).IndexData("ConsumerProfit", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询列表(单表)
+        /// </summary>
+        /// <param name="fieldList">返回的字段</param>
+        /// <param name="condition">查询条件</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <param name="orderBy">排序</param>
+        /// <returns></returns>
+        public static List<Dictionary<string, object>> List(string fieldList, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = fieldList.Split(',').ToList(); //要显示的列
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).IndexData("ConsumerProfit", new List<RelationData>(), orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static ConsumerProfit Query(int Id)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("*", "ConsumerProfit", Id);
+            if (obj.Keys.Count > 0)
+            {
+                return Newtonsoft.Json.JsonConvert.DeserializeObject<ConsumerProfit>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
+            }
+            return new ConsumerProfit();
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        public static ConsumerProfit Query(string condition)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("*", "ConsumerProfit", condition);
+            if (obj.Keys.Count > 0)
+            {
+                return Newtonsoft.Json.JsonConvert.DeserializeObject<ConsumerProfit>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
+            }
+            return new ConsumerProfit();
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="fields">返回的字段</param>
+        /// <returns></returns>
+        public static Dictionary<string, object> Query(string condition, string fields)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query(fields, "ConsumerProfit", 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 + "", "ConsumerProfit", condition);
+            if (obj.Keys.Count > 0)
+            {
+                amount = decimal.Parse(function.CheckNum(obj[field].ToString()));
+            }
+            return amount;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static int Count(string condition = "", string field = "Id")
+        {
+            int result = 0;
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("count(" + field + ") " + field + "", "ConsumerProfit", condition);
+            if (obj.Keys.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(obj[field].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static bool Exist(string condition)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("1", "ConsumerProfit", condition);
+            if (obj.Keys.Count > 0)
+            {
+                return true;
+            }
+            return false;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public static AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if (check)
+            {
+                if (string.IsNullOrEmpty(fields["Name"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+                }
+                if (string.IsNullOrEmpty(fields["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("ConsumerProfit", fields, 0);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public static AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if (check)
+            {
+                if (string.IsNullOrEmpty(fields["Name"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+                }
+                if (string.IsNullOrEmpty(fields["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("ConsumerProfit", fields, Id);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public static void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbServiceNew(AppConfig.Base.main2Tables, _conn).Edit("ConsumerProfit", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public static void Delete(int Id)
+        {
+            new DbServiceNew(AppConfig.Base.main2Tables, _conn).Delete("ConsumerProfit", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public static void Sort(int Id, int Sort)
+        {
+            new DbServiceNew(AppConfig.Base.main2Tables, _conn).Sort("ConsumerProfit", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public static void Import(string ExcelData)
+        {
+            // WebCMSEntities db = new WebCMSEntities();
+            // JsonData list = JsonMapper.ToObject(ExcelData);
+            // for (int i = 1; i < list.Count;i++ )
+            // {
+            //     JsonData dr = list[i];
+
+            //     db.ConsumerProfit.Add(new ConsumerProfit()
+            //     {
+            //         CreateDate = DateTime.Now,
+            //         UpdateDate = DateTime.Now,
+
+            //     });
+            //     db.SaveChanges();
+            // }
+            // db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public static void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+
+        // }
+    }
+}

+ 319 - 0
Services/Main2/ConsumersService.cs

@@ -0,0 +1,319 @@
+/*
+ * 消费者
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.MainModels2;
+using Library;
+using LitJson;
+
+namespace MySystem.Services.Main2
+{
+    public class ConsumersService
+    {
+        static string _conn = ConfigurationManager.AppSettings["SqlConnStr2"].ToString();
+
+        /// <summary>
+        /// 查询列表(适合多表关联查询)
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public static List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列,不设置则返回全部字段
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).IndexData("Consumers", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public static List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列,不设置则返回全部字段
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).IndexData("Consumers", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询列表(单表)
+        /// </summary>
+        /// <param name="fieldList">返回的字段</param>
+        /// <param name="condition">查询条件</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <param name="orderBy">排序</param>
+        /// <returns></returns>
+        public static List<Dictionary<string, object>> List(string fieldList, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = fieldList.Split(',').ToList(); //要显示的列
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).IndexData("Consumers", new List<RelationData>(), orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static Consumers Query(int Id)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("*", "Consumers", Id);
+            if (obj.Keys.Count > 0)
+            {
+                return Newtonsoft.Json.JsonConvert.DeserializeObject<Consumers>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
+            }
+            return new Consumers();
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        public static Consumers Query(string condition)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("*", "Consumers", condition);
+            if (obj.Keys.Count > 0)
+            {
+                return Newtonsoft.Json.JsonConvert.DeserializeObject<Consumers>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
+            }
+            return new Consumers();
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="fields">返回的字段</param>
+        /// <returns></returns>
+        public static Dictionary<string, object> Query(string condition, string fields)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query(fields, "Consumers", 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 + "", "Consumers", condition);
+            if (obj.Keys.Count > 0)
+            {
+                amount = decimal.Parse(function.CheckNum(obj[field].ToString()));
+            }
+            return amount;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static int Count(string condition = "", string field = "Id")
+        {
+            int result = 0;
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("count(" + field + ") " + field + "", "Consumers", condition);
+            if (obj.Keys.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(obj[field].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static bool Exist(string condition)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("1", "Consumers", condition);
+            if (obj.Keys.Count > 0)
+            {
+                return true;
+            }
+            return false;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public static AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if (check)
+            {
+                if (string.IsNullOrEmpty(fields["Name"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+                }
+                if (string.IsNullOrEmpty(fields["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("Consumers", fields, 0);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public static AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if (check)
+            {
+                if (string.IsNullOrEmpty(fields["Name"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+                }
+                if (string.IsNullOrEmpty(fields["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("Consumers", fields, Id);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public static void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbServiceNew(AppConfig.Base.main2Tables, _conn).Edit("Consumers", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public static void Delete(int Id)
+        {
+            new DbServiceNew(AppConfig.Base.main2Tables, _conn).Delete("Consumers", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public static void Sort(int Id, int Sort)
+        {
+            new DbServiceNew(AppConfig.Base.main2Tables, _conn).Sort("Consumers", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public static void Import(string ExcelData)
+        {
+            // WebCMSEntities db = new WebCMSEntities();
+            // JsonData list = JsonMapper.ToObject(ExcelData);
+            // for (int i = 1; i < list.Count;i++ )
+            // {
+            //     JsonData dr = list[i];
+
+            //     db.Consumers.Add(new Consumers()
+            //     {
+            //         CreateDate = DateTime.Now,
+            //         UpdateDate = DateTime.Now,
+
+            //     });
+            //     db.SaveChanges();
+            // }
+            // db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public static void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+
+        // }
+    }
+}

+ 519 - 0
Services/Main2/MerchantAddInfoService.cs

@@ -0,0 +1,519 @@
+/*
+ * 商户进件资料
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.MainModels2;
+using Library;
+using LitJson;
+
+namespace MySystem.Services.Main2
+{
+    public class MerchantAddInfoService
+    {
+        static string _conn = ConfigurationManager.AppSettings["SqlConnStr2"].ToString();
+
+        /// <summary>
+        /// 查询列表(适合多表关联查询)
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public static List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列,不设置则返回全部字段
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).IndexData("MerchantAddInfo", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public static List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列,不设置则返回全部字段
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).IndexData("MerchantAddInfo", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询列表(单表)
+        /// </summary>
+        /// <param name="fieldList">返回的字段</param>
+        /// <param name="condition">查询条件</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <param name="orderBy">排序</param>
+        /// <returns></returns>
+        public static List<Dictionary<string, object>> List(string fieldList, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = fieldList.Split(',').ToList(); //要显示的列
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).IndexData("MerchantAddInfo", new List<RelationData>(), orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static MerchantAddInfo Query(int Id)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("*", "MerchantAddInfo", Id);
+            if (obj.Keys.Count > 0)
+            {
+                return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantAddInfo>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
+            }
+            return new MerchantAddInfo();
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        public static MerchantAddInfo Query(string condition)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("*", "MerchantAddInfo", condition);
+            if (obj.Keys.Count > 0)
+            {
+                return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantAddInfo>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
+            }
+            return new MerchantAddInfo();
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="fields">返回的字段</param>
+        /// <returns></returns>
+        public static Dictionary<string, object> Query(string condition, string fields)
+        {
+            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)
+            {
+                amount = decimal.Parse(function.CheckNum(obj[field].ToString()));
+            }
+            return amount;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static int Count(string condition = "", string field = "Id")
+        {
+            int result = 0;
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("count(" + field + ") " + field + "", "MerchantAddInfo", condition);
+            if (obj.Keys.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(obj[field].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        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)
+            {
+                return true;
+            }
+            return false;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public static AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            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 = "请填写银行账号" };
+                }
+
+            }
+            int Id = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Add("MerchantAddInfo", fields, 0);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public static AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            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 = "请填写银行账号" };
+                }
+
+            }
+            new DbServiceNew(AppConfig.Base.main2Tables, _conn).Edit("MerchantAddInfo", fields, Id);
+            return new AppResultJson() { Status = "1", Data = Id };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public static void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbServiceNew(AppConfig.Base.main2Tables, _conn).Edit("MerchantAddInfo", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public static void Delete(int Id)
+        {
+            new DbServiceNew(AppConfig.Base.main2Tables, _conn).Delete("MerchantAddInfo", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public static void Sort(int Id, int Sort)
+        {
+            new DbServiceNew(AppConfig.Base.main2Tables, _conn).Sort("MerchantAddInfo", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public static void Import(string ExcelData)
+        {
+            // WebCMSEntities db = new WebCMSEntities();
+            // JsonData list = JsonMapper.ToObject(ExcelData);
+            // for (int i = 1; i < list.Count;i++ )
+            // {
+            //     JsonData dr = list[i];
+
+            //     db.MerchantAddInfo.Add(new MerchantAddInfo()
+            //     {
+            //         CreateDate = DateTime.Now,
+            //         UpdateDate = DateTime.Now,
+
+            //     });
+            //     db.SaveChanges();
+            // }
+            // db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public static void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+
+        // }
+    }
+}

+ 319 - 0
Services/Main2/MerchantInfoService.cs

@@ -0,0 +1,319 @@
+/*
+ * 商户
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.MainModels2;
+using Library;
+using LitJson;
+
+namespace MySystem.Services.Main2
+{
+    public class MerchantInfoService
+    {
+        static string _conn = ConfigurationManager.AppSettings["SqlConnStr2"].ToString();
+
+        /// <summary>
+        /// 查询列表(适合多表关联查询)
+        /// </summary>
+        /// <param name="relationData">关联表</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="count">总数(输出)</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <returns></returns>
+        public static List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, out int count, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列,不设置则返回全部字段
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).IndexData("MerchantInfo", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            count = int.Parse(obj["count"].ToString());
+            return diclist;
+        }
+        public static List<Dictionary<string, object>> List(List<RelationData> relationData, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = new List<string>(); //要显示的列,不设置则返回全部字段
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).IndexData("MerchantInfo", relationData, orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询列表(单表)
+        /// </summary>
+        /// <param name="fieldList">返回的字段</param>
+        /// <param name="condition">查询条件</param>
+        /// <param name="page">页码</param>
+        /// <param name="limit">每页条数</param>
+        /// <param name="orderBy">排序</param>
+        /// <returns></returns>
+        public static List<Dictionary<string, object>> List(string fieldList, string condition, int page = 1, int limit = 30, string orderBy = "Sort desc,Id desc")
+        {
+            List<string> fields = fieldList.Split(',').ToList(); //要显示的列
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).IndexData("MerchantInfo", new List<RelationData>(), orderBy, page, limit, condition, fields);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            return diclist;
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static MerchantInfo Query(int Id)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("*", "MerchantInfo", Id);
+            if (obj.Keys.Count > 0)
+            {
+                return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantInfo>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
+            }
+            return new MerchantInfo();
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        public static MerchantInfo Query(string condition)
+        {
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("*", "MerchantInfo", condition);
+            if (obj.Keys.Count > 0)
+            {
+                return Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantInfo>(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
+            }
+            return new MerchantInfo();
+        }
+
+        /// <summary>
+        /// 查询一条记录
+        /// </summary>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <param name="fields">返回的字段</param>
+        /// <returns></returns>
+        public static Dictionary<string, object> Query(string condition, string fields)
+        {
+            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)
+            {
+                amount = decimal.Parse(function.CheckNum(obj[field].ToString()));
+            }
+            return amount;
+        }
+
+        /// <summary>
+        /// 查询记录数
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        public static int Count(string condition = "", string field = "Id")
+        {
+            int result = 0;
+            Dictionary<string, object> obj = new DbServiceNew(AppConfig.Base.main2Tables, _conn).Query("count(" + field + ") " + field + "", "MerchantInfo", condition);
+            if (obj.Keys.Count > 0)
+            {
+                result = int.Parse(function.CheckInt(obj[field].ToString()));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 查询是否存在
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <returns></returns>
+        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)
+            {
+                return true;
+            }
+            return false;
+        }
+
+        /// <summary>
+        /// 添加数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <returns></returns>
+        public static AppResultJson Add(Dictionary<string, object> fields, bool check = true)
+        {
+            if (check)
+            {
+                if (string.IsNullOrEmpty(fields["Name"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+                }
+                if (string.IsNullOrEmpty(fields["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 };
+        }
+
+        /// <summary>
+        /// 修改数据
+        /// </summary>
+        /// <param name="Fields">要设置的字段</param>
+        /// <param name="Id">主键Id</param>
+        public static AppResultJson Edit(Dictionary<string, object> fields, int Id, bool check = true)
+        {
+            if (check)
+            {
+                if (string.IsNullOrEmpty(fields["Name"].ToString()))
+                {
+                    return new AppResultJson() { Status = "-1", Info = "请填写名称" };
+                }
+                if (string.IsNullOrEmpty(fields["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 };
+        }
+
+        /// <summary>
+        /// 逻辑删除
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public static void Remove(int Id)
+        {
+            Dictionary<string, object> fields = new Dictionary<string, object>();
+            fields.Add("Status", -1);
+            new DbServiceNew(AppConfig.Base.main2Tables, _conn).Edit("MerchantInfo", fields, Id);
+        }
+
+        /// <summary>
+        /// 删除数据
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        public static void Delete(int Id)
+        {
+            new DbServiceNew(AppConfig.Base.main2Tables, _conn).Delete("MerchantInfo", Id);
+        }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id">主键Id</param>
+        /// <param name="Sort">排序序号</param>
+        public static void Sort(int Id, int Sort)
+        {
+            new DbServiceNew(AppConfig.Base.main2Tables, _conn).Sort("MerchantInfo", Sort, Id);
+        }
+
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData">json数据</param>
+        public static void Import(string ExcelData)
+        {
+            // WebCMSEntities db = new WebCMSEntities();
+            // JsonData list = JsonMapper.ToObject(ExcelData);
+            // for (int i = 1; i < list.Count;i++ )
+            // {
+            //     JsonData dr = list[i];
+
+            //     db.MerchantInfo.Add(new MerchantInfo()
+            //     {
+            //         CreateDate = DateTime.Now,
+            //         UpdateDate = DateTime.Now,
+
+            //     });
+            //     db.SaveChanges();
+            // }
+            // db.Dispose();
+        }
+
+        /// <summary>
+        /// 导出excel表格
+        /// </summary>
+        /// <param name="fields">查询条件(单个字段)</param>
+        /// <param name="condition">查询条件(sql语句)</param>
+        /// <returns></returns>
+        // public static void ExportExcel(List<RelationData> relationData, string condition)
+        // {
+
+        // }
+    }
+}

Some files were not shown because too many files changed in this diff