DuGuYang 1 год назад
Родитель
Сommit
8da616ae25
100 измененных файлов с 0 добавлено и 8221 удалено
  1. 0 430
      AppStart/Alipay/AlipayFunction.cs
  2. 0 268
      AppStart/Alipay/Request/AlipayOpenAgentCommonSignRequest.cs
  3. 0 126
      AppStart/Alipay/Request/AlipayOpenAgentCommonsignConfirmRequest.cs
  4. 0 24
      AppStart/Alipay/Request/AlipayOpenMiniVersionAuditedCancelModel.cs
  5. 0 30
      AppStart/Alipay/Request/AlipayOpenMiniVersionOnlineModel.cs
  6. 0 12
      AppStart/Alipay/Response/AlipayOpenAgentCommonSignResponse.cs
  7. 0 17
      AppStart/Alipay/Response/AlipayOpenAgentCommonsignConfirmResponse.cs
  8. 0 79
      AppStart/Order/PayHelper.cs
  9. 0 81
      AppStart/OtherApi/BankCardCheck.cs
  10. 0 85
      AppStart/OtherApi/BankCardCheckForThree.cs
  11. 0 86
      AppStart/OtherApi/IdCardCheckForThree.cs
  12. 0 85
      AppStart/OtherApi/SendSMS.cs
  13. 0 45
      AppStart/Redis/Mysql/AdvertismentDbconn.cs
  14. 0 159
      AppStart/Redis/Mysql/ApplyMachineDbconn.cs
  15. 0 445
      AppStart/Redis/Mysql/BusinessTradeSummaryDbconn.cs
  16. 0 24
      AppStart/Redis/Mysql/ConsumerOpenIdsDbconn.cs
  17. 0 24
      AppStart/Redis/Mysql/ConsumersDbconn.cs
  18. 0 47
      AppStart/Redis/Mysql/KqProductsDbconn.cs
  19. 0 484
      AppStart/Redis/Mysql/LargeDataScreenDbconn.cs
  20. 0 56
      AppStart/Redis/Mysql/MachineApplyDbconn.cs
  21. 0 58
      AppStart/Redis/Mysql/MachineForQrCodeDbconn.cs
  22. 0 25
      AppStart/Redis/Mysql/MerchantAddInfoDbconn.cs
  23. 0 115
      AppStart/Redis/Mysql/MerchantAmountSummary.cs
  24. 0 90
      AppStart/Redis/Mysql/MerchantInfoDbconn.cs
  25. 0 24
      AppStart/Redis/Mysql/MerchantParamSetDbconn.cs
  26. 0 89
      AppStart/Redis/Mysql/MerchantQrCodeDbconn.cs
  27. 0 163
      AppStart/Redis/Mysql/MerchantTradeStat.cs
  28. 0 70
      AppStart/Redis/Mysql/OpenRewardDetailDbconn.cs
  29. 0 25
      AppStart/Redis/Mysql/OrderForNoDbconn.cs
  30. 0 62
      AppStart/Redis/Mysql/OrderProductDbconn.cs
  31. 0 25
      AppStart/Redis/Mysql/OrdersDbconn.cs
  32. 0 90
      AppStart/Redis/Mysql/PosMachinesDbconn.cs
  33. 0 37
      AppStart/Redis/Mysql/PosMachinesTwoDbconn.cs
  34. 0 106
      AppStart/Redis/Mysql/PosMerchantInfoDbconn.cs
  35. 0 78
      AppStart/Redis/Mysql/PosMerchantTradeSummaryDbconn.cs
  36. 0 70
      AppStart/Redis/Mysql/ProductNormDbconn.cs
  37. 0 70
      AppStart/Redis/Mysql/ProductNormItemDbconn.cs
  38. 0 72
      AppStart/Redis/Mysql/ProductsDbconn.cs
  39. 0 176
      AppStart/Redis/Mysql/QrCodeTradeStat.cs
  40. 0 76
      AppStart/Redis/Mysql/StoreHouseDbconn.cs
  41. 0 77
      AppStart/Redis/Mysql/UserAccountDbconn.cs
  42. 0 59
      AppStart/Redis/Mysql/UserAccountRecordDbconn.cs
  43. 0 70
      AppStart/Redis/Mysql/UserAddressDbconn.cs
  44. 0 74
      AppStart/Redis/Mysql/UserAmountSummary.cs
  45. 0 65
      AppStart/Redis/Mysql/UserCashRecordDbconn.cs
  46. 0 240
      AppStart/Redis/Mysql/UserDataDbconn.cs
  47. 0 38
      AppStart/Redis/Mysql/UserForMakerCodeDbconn.cs
  48. 0 38
      AppStart/Redis/Mysql/UserForMobileDbconn.cs
  49. 0 46
      AppStart/Redis/Mysql/UserLevelSetDbconn.cs
  50. 0 27
      AppStart/Redis/Mysql/UserMachineDataDbconn.cs
  51. 0 82
      AppStart/Redis/Mysql/UserStoreChangeDbconn.cs
  52. 0 164
      AppStart/Redis/Mysql/UserTradeDaySummaryDbconn.cs
  53. 0 291
      AppStart/Redis/Mysql/UserTradeDaySummaryVsDbconn.cs
  54. 0 163
      AppStart/Redis/Mysql/UserTradeStat.cs
  55. 0 180
      AppStart/Redis/Mysql/UserTradeStatDbconn.cs
  56. 0 97
      AppStart/Redis/Mysql/UsersDbconn.cs
  57. 0 112
      AppStart/Redis/Mysql/UsersDbconnOld.cs
  58. 0 114
      AppStart/RelationClass.cs
  59. 0 2
      Areas/Api/Controllers/BaseController.cs
  60. 0 1
      Areas/Api/Controllers/SystemSetController.cs
  61. 0 1011
      Areas/Api/Controllers/v1/MainServer/MerchantInfoController.cs
  62. 0 1
      Filter/GlobalActionFilter.cs
  63. 0 49
      KxsMainModels/ActiveReward.cs
  64. 0 26
      KxsMainModels/ActivityEnrolRecord.cs
  65. 0 37
      KxsMainModels/ActivityInfo.cs
  66. 0 32
      KxsMainModels/ActivityPrizeDetail.cs
  67. 0 24
      KxsMainModels/ActivityRedPackageJoins.cs
  68. 0 24
      KxsMainModels/ActivityRedPackageStock.cs
  69. 0 25
      KxsMainModels/ActivityRedPackageTop10.cs
  70. 0 26
      KxsMainModels/Advertisment.cs
  71. 0 25
      KxsMainModels/AgentLevelSet.cs
  72. 0 32
      KxsMainModels/AppBottomNavs.cs
  73. 0 28
      KxsMainModels/AppVersion.cs
  74. 0 24
      KxsMainModels/AppVideo.cs
  75. 0 26
      KxsMainModels/AppVideoList.cs
  76. 0 28
      KxsMainModels/BackEndOpRecord.cs
  77. 0 26
      KxsMainModels/BankInfo.cs
  78. 0 47
      KxsMainModels/BrokenMachineChange.cs
  79. 0 34
      KxsMainModels/BrokenMachineChangeDetail.cs
  80. 0 28
      KxsMainModels/BusinessActSummary.cs
  81. 0 26
      KxsMainModels/BusinessPartner.cs
  82. 0 25
      KxsMainModels/BusinessPartnerMerchant.cs
  83. 0 25
      KxsMainModels/BusinessPartnerPos.cs
  84. 0 67
      KxsMainModels/BusinessTradeSummary.cs
  85. 0 37
      KxsMainModels/Col.cs
  86. 0 11
      KxsMainModels/ConsumerOpenIds.cs
  87. 0 11
      KxsMainModels/ConsumerOrderForNo.cs
  88. 0 31
      KxsMainModels/ConsumerOrders.cs
  89. 0 25
      KxsMainModels/ConsumerProfit.cs
  90. 0 36
      KxsMainModels/Consumers.cs
  91. 0 33
      KxsMainModels/CouponAssignRecords.cs
  92. 0 48
      KxsMainModels/Coupons.cs
  93. 0 26
      KxsMainModels/CouponsForUser.cs
  94. 0 24
      KxsMainModels/CustomTagSet.cs
  95. 0 24
      KxsMainModels/ErpCompanys.cs
  96. 0 21
      KxsMainModels/ExportExcels.cs
  97. 0 24
      KxsMainModels/FileUpdateInfo.cs
  98. 0 43
      KxsMainModels/FluxProfitDetail.cs
  99. 0 30
      KxsMainModels/FluxProfitSummary.cs
  100. 0 33
      KxsMainModels/HelpProfitAccountRecord.cs

Разница между файлами не показана из-за своего большого размера
+ 0 - 430
AppStart/Alipay/AlipayFunction.cs


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

@@ -1,268 +0,0 @@
-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
-    }
-}

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

@@ -1,126 +0,0 @@
-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
-    }
-}

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

@@ -1,24 +0,0 @@
-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; }
-    }
-}

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

@@ -1,30 +0,0 @@
-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; }
-    }
-}

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

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

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

@@ -1,17 +0,0 @@
-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 - 79
AppStart/Order/PayHelper.cs

@@ -1,79 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Threading;
-using System.IO;
-using MySystem.MainModels;
-using Library;
-using LitJson;
-
-namespace MySystem
-{
-    public class PayHelper
-    {
-        public readonly static PayHelper Instance = new PayHelper();
-        private PayHelper()
-        { }
-
-        private void threadStart()
-        {
-            string data = "";
-            try
-            { 
-                data = RedisDbconn.Instance.RPop<string>("PayCallBack");
-                if (!string.IsNullOrEmpty(data))
-                {
-                    ScanQueue(data);
-                }
-            }
-            catch (Exception ex)
-            {
-                function.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ":" + ex.ToString(), "支付回调队列异常");
-            }
-        }
-
-        //要执行的方法
-        private void ScanQueue(string data)
-        {
-            JsonData dateinfo = JsonMapper.ToObject(data);
-            string OrderNo = dateinfo["out_trade_no"].ToString();
-            string TradeNo = dateinfo["transaction_id"].ToString();
-            decimal TotalFee = decimal.Parse(function.CheckNum(dateinfo["total_fee"].ToString()));
-            int PayMode = int.Parse(function.CheckInt(dateinfo["pay_mode"].ToString()));
-            OrderForNo orderForNo = OrderForNoDbconn.Instance.Get(OrderNo) ?? new OrderForNo();
-            string OrderIds = orderForNo.OrderIds;
-            if (!string.IsNullOrEmpty(OrderIds))
-            {
-                string[] orderIdList = OrderIds.Split(',');
-                foreach (string orderIdStr in orderIdList)
-                {
-                    int orderid = int.Parse(orderIdStr);
-                    Orders order = OrdersDbconn.Instance.Get(orderid);
-                    if (order != null)
-                    {
-                        if (order.Status == 0)
-                        {
-                            order.Status = 1;
-                            order.PayMode = PayMode;
-                            order.TradeNo = TradeNo;
-                            order.PayDate = DateTime.Now;
-
-                            List<int> proids = OrderProductDbconn.Instance.GetList(orderid);
-                            foreach (int proid in proids)
-                            {
-                                OrderProduct orderPro = OrderProductDbconn.Instance.Get(proid) ?? new OrderProduct();
-                                Products product = ProductsDbconn.Instance.Get(orderPro.ProductId);
-                                if (product != null)
-                                {
-                                    product.MonthSale += orderPro.ProductCount;
-                                    RedisDbconn.Instance.Set("Products:" + product.Id, product);
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-}

+ 0 - 81
AppStart/OtherApi/BankCardCheck.cs

@@ -1,81 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Net;
-using System.Net.Security;
-using System.Security.Cryptography.X509Certificates;
-using System.Text;
-using Library;
-// using MongoDB.Bson;
-// using MongoDB.Driver;
-// using MongoDB.Driver.Linq;
-
-namespace MySystem
-{
-    public class BankCardCheck
-    {
-        public readonly static BankCardCheck Instance = new BankCardCheck();
-        private BankCardCheck()
-        {
-        }
-
-
-        private const String host = "https://bankcard4c.shumaidata.com";
-        private const String path = "/bankcard4c";
-        private const String method = "GET";
-        private const String appcode = "8e5704921ca3422f80f0deb935a7ddc6";
-
-        public string Do(string bankcard, string idcard, string mobile, string name)
-        {
-            String querys = "bankcard=" + bankcard + "&idcard=" + idcard + "&mobile=" + mobile + "&name=" + name;
-            String bodys = "";
-            String url = host + path;
-            HttpWebRequest httpRequest = null;
-            HttpWebResponse httpResponse = null;
-
-            if (0 < querys.Length)
-            {
-                url = url + "?" + querys;
-            }
-
-            if (host.Contains("https://"))
-            {
-                ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
-                httpRequest = (HttpWebRequest)WebRequest.CreateDefault(new Uri(url));
-            }
-            else
-            {
-                httpRequest = (HttpWebRequest)WebRequest.Create(url);
-            }
-            httpRequest.Method = method;
-            httpRequest.Headers.Add("Authorization", "APPCODE " + appcode);
-            if (0 < bodys.Length)
-            {
-                byte[] data = Encoding.UTF8.GetBytes(bodys);
-                using (Stream stream = httpRequest.GetRequestStream())
-                {
-                    stream.Write(data, 0, data.Length);
-                }
-            }
-            try
-            {
-                httpResponse = (HttpWebResponse)httpRequest.GetResponse();
-            }
-            catch (WebException ex)
-            {
-                httpResponse = (HttpWebResponse)ex.Response;
-            }
-
-            Stream st = httpResponse.GetResponseStream();
-            StreamReader reader = new StreamReader(st, Encoding.GetEncoding("utf-8"));
-            string result = reader.ReadToEnd();
-            return result;
-        }
-
-        public bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
-        {
-            return true;
-        }
-    }
-}

+ 0 - 85
AppStart/OtherApi/BankCardCheckForThree.cs

@@ -1,85 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Net;
-using System.Net.Security;
-using System.Security.Cryptography.X509Certificates;
-using System.Text;
-using Library;
-// using MongoDB.Bson;
-// using MongoDB.Driver;
-// using MongoDB.Driver.Linq;
-
-namespace MySystem
-{
-    public class BankCardCheckForThree
-    {
-        public readonly static BankCardCheckForThree Instance = new BankCardCheckForThree();
-        private BankCardCheckForThree()
-        {
-        }
-
-
-        private const String host = "https://bankcard3c.shumaidata.com";
-        private const String path = "/bankcard3c";
-        private const String method = "GET";
-        private const String appcode = "8e5704921ca3422f80f0deb935a7ddc6";
-
-        public string Do(string bankcard, string idcard, string name)
-        {
-            String querys = "bankcard=" + bankcard + "&idcard=" + idcard + "&name=" + name;
-            function.WriteLog(DateTime.Now.ToString(), "验证三要素日志");
-            function.WriteLog(querys, "验证三要素日志");
-            String bodys = "";
-            String url = host + path;
-            HttpWebRequest httpRequest = null;
-            HttpWebResponse httpResponse = null;
-
-            if (0 < querys.Length)
-            {
-                url = url + "?" + querys;
-            }
-
-            if (host.Contains("https://"))
-            {
-                ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
-                httpRequest = (HttpWebRequest)WebRequest.CreateDefault(new Uri(url));
-            }
-            else
-            {
-                httpRequest = (HttpWebRequest)WebRequest.Create(url);
-            }
-            httpRequest.Method = method;
-            httpRequest.Headers.Add("Authorization", "APPCODE " + appcode);
-            if (0 < bodys.Length)
-            {
-                byte[] data = Encoding.UTF8.GetBytes(bodys);
-                using (Stream stream = httpRequest.GetRequestStream())
-                {
-                    stream.Write(data, 0, data.Length);
-                }
-            }
-            try
-            {
-                httpResponse = (HttpWebResponse)httpRequest.GetResponse();
-            }
-            catch (WebException ex)
-            {
-                httpResponse = (HttpWebResponse)ex.Response;
-            }
-
-            Stream st = httpResponse.GetResponseStream();
-            StreamReader reader = new StreamReader(st, Encoding.GetEncoding("utf-8"));
-            string result = reader.ReadToEnd();
-            function.WriteLog(result, "验证三要素日志");
-            function.WriteLog("\n\n", "验证三要素日志");
-            return result;
-        }
-
-        public bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
-        {
-            return true;
-        }
-    }
-}

+ 0 - 86
AppStart/OtherApi/IdCardCheckForThree.cs

@@ -1,86 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Net;
-using System.Net.Security;
-using System.Security.Cryptography.X509Certificates;
-using System.Text;
-using Library;
-// using MongoDB.Bson;
-// using MongoDB.Driver;
-// using MongoDB.Driver.Linq;
-
-namespace MySystem
-{
-    public class IdCardCheckForThree
-    {
-        public readonly static IdCardCheckForThree Instance = new IdCardCheckForThree();
-        private IdCardCheckForThree()
-        {
-        }
-
-        private const String host = "https://dfphone3.market.alicloudapi.com";
-        private const String path = "/verify_id_name_phone";
-        private const String method = "POST";
-        private const String appcode = "8e5704921ca3422f80f0deb935a7ddc6";
-
-        public string Do(string mobile, string idcard, string name)
-        {
-            String querys = "";
-            function.WriteLog(DateTime.Now.ToString(), "IdCard验证三要素日志");
-            function.WriteLog(querys, "IdCard验证三要素日志");
-            String bodys = "id_number=" + idcard + "&name=" + name + "&phone_number=" + mobile + "";
-            String url = host + path;
-            HttpWebRequest httpRequest = null;
-            HttpWebResponse httpResponse = null;
-
-            if (0 < querys.Length)
-            {
-                url = url + "?" + querys;
-            }
-
-            if (host.Contains("https://"))
-            {
-                ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
-                httpRequest = (HttpWebRequest)WebRequest.CreateDefault(new Uri(url));
-            }
-            else
-            {
-                httpRequest = (HttpWebRequest)WebRequest.Create(url);
-            }
-            httpRequest.Method = method;
-            httpRequest.Headers.Add("Authorization", "APPCODE " + appcode);
-            //根据API的要求,定义相对应的Content-Type
-            httpRequest.ContentType = "application/x-www-form-urlencoded; charset=UTF-8";
-            if (0 < bodys.Length)
-            {
-                byte[] data = Encoding.UTF8.GetBytes(bodys);
-                using (Stream stream = httpRequest.GetRequestStream())
-                {
-                    stream.Write(data, 0, data.Length);
-                }
-            }
-            try
-            {
-                httpResponse = (HttpWebResponse)httpRequest.GetResponse();
-            }
-            catch (WebException ex)
-            {
-                httpResponse = (HttpWebResponse)ex.Response;
-            }
-
-            Stream st = httpResponse.GetResponseStream();
-            StreamReader reader = new StreamReader(st, Encoding.GetEncoding("utf-8"));
-            string result = reader.ReadToEnd();
-            function.WriteLog(result, "IdCard验证三要素日志");
-            function.WriteLog("\n\n", "IdCard验证三要素日志");
-            return result;
-        }
-
-        public static bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
-        {
-            return true;
-        }
-    }
-}

+ 0 - 85
AppStart/OtherApi/SendSMS.cs

@@ -1,85 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Net;
-using System.Net.Security;
-using System.Security.Cryptography.X509Certificates;
-using System.Text;
-using Library;
-// using MongoDB.Bson;
-// using MongoDB.Driver;
-// using MongoDB.Driver.Linq;
-
-namespace MySystem
-{
-    public class SendSMS
-    {
-        public readonly static SendSMS Instance = new SendSMS();
-        private SendSMS()
-        {
-        }
-
-
-        #region 发送短信验证码
-
-        private string host = "https://gyytz.market.alicloudapi.com";
-        private string path = "/sms/smsSend";
-        private string method = "POST";
-        private string appcode = "8e5704921ca3422f80f0deb935a7ddc6";
-
-        public string Do(string mobile, string code)
-        {
-            String querys = "mobile=" + mobile + "&param=**code**%3A" + code + "%2C**minute**%3A5&smsSignId=8b278cf2bb2a4b3c818cc7a436307a12&templateId=908e94ccf08b4476ba6c876d13f084ad";
-            String bodys = "";
-            String url = host + path;
-            HttpWebRequest httpRequest = null;
-            HttpWebResponse httpResponse = null;
-
-            if (0 < querys.Length)
-            {
-                url = url + "?" + querys;
-            }
-
-            if (host.Contains("https://"))
-            {
-                ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
-                httpRequest = (HttpWebRequest)WebRequest.CreateDefault(new Uri(url));
-            }
-            else
-            {
-                httpRequest = (HttpWebRequest)WebRequest.Create(url);
-            }
-            httpRequest.Method = method;
-            httpRequest.Headers.Add("Authorization", "APPCODE " + appcode);
-            if (0 < bodys.Length)
-            {
-                byte[] data = Encoding.UTF8.GetBytes(bodys);
-                using (Stream stream = httpRequest.GetRequestStream())
-                {
-                    stream.Write(data, 0, data.Length);
-                }
-            }
-            try
-            {
-                httpResponse = (HttpWebResponse)httpRequest.GetResponse();
-            }
-            catch (WebException ex)
-            {
-                httpResponse = (HttpWebResponse)ex.Response;
-            }
-
-            Stream st = httpResponse.GetResponseStream();
-            StreamReader reader = new StreamReader(st, Encoding.GetEncoding("utf-8"));
-            string result = reader.ReadToEnd();
-            return result;
-        }
-
-        public bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
-        {
-            return true;
-        }
-
-        #endregion
-    }
-}

+ 0 - 45
AppStart/Redis/Mysql/AdvertismentDbconn.cs

@@ -1,45 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.Models;
-
-namespace MySystem
-{
-    public class AdvertismentDbconn
-    {
-        public readonly static AdvertismentDbconn Instance = new AdvertismentDbconn();
-
-        #region 获取列表
-        public List<Advertisment> GetList(string ColId)
-        {
-            string key = "AdvertismentList:" + ColId;
-            List<Advertisment> list = new List<Advertisment>();
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                list = RedisDbconn.Instance.GetList<Advertisment>(key);
-                if (list.Count > 0)
-                {
-                    return list;
-                }
-            }
-            List<Advertisment> newlist = new List<Advertisment>();
-            WebCMSEntities db = new WebCMSEntities();
-            var mysqllist = db.Advertisment.Where(m => m.ColId == ColId).OrderByDescending(m => m.Sort).OrderByDescending(m => m.Id).ToList();
-            if (mysqllist.Count > 0)
-            {
-                foreach (var sub in mysqllist)
-                {
-                    newlist.Add(sub);
-                }
-                RedisDbconn.Instance.Clear(key);
-                foreach (Advertisment sub in newlist)
-                {
-                    RedisDbconn.Instance.AddRightList(key, sub);
-                }
-            }
-            db.Dispose();
-            return newlist;
-        }
-        #endregion
-    }
-}

+ 0 - 159
AppStart/Redis/Mysql/ApplyMachineDbconn.cs

@@ -1,159 +0,0 @@
-// using System;
-// using System.Collections.Generic;
-// using Library;
-// using System.Linq;
-// using MySystem.MainModels;
-
-// namespace MySystem
-// {
-//     public class ApplyMachineDbconn
-//     {
-
-//         public readonly static ApplyMachineDbconn Instance = new ApplyMachineDbconn();
-
-//         #region 获取仓库单个字段
-//         public StoreHouse Get(int Id)
-//         {
-//             WebCMSEntities db = new WebCMSEntities();
-//             StoreHouse storeHouse = db.StoreHouse.FirstOrDefault(m => m.Id == Id);
-//             if (storeHouse != null)
-//             {
-//                 RedisDbconn.Instance.Set(key, storeHouse);
-//                 RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(60, 180));
-//             }
-//             db.Dispose();
-//             return storeHouse;
-//         }
-//         #endregion
-
-
-//         #region 获取仓库列表
-//         public List<int> GetList(int UserId, int pageNum = 1, int pageSize = 10)
-//         {
-//             string key = "StoreHouseList:" + UserId;
-//             List<int> list = new List<int>();
-//             if (RedisDbconn.Instance.Exists(key))
-//             {
-//                 list = RedisDbconn.Instance.GetList<int>(key, pageNum, pageSize);
-//                 if (list.Count > 0)
-//                 {
-//                     return list;
-//                 }
-//             }
-//             WebCMSEntities db = new WebCMSEntities();
-//             List<int> newlist = new List<int>();
-//             var mysqllist = db.StoreHouse.Select(m => new { m.Id, m.UserId, m.BrandId }).Where(m => m.UserId == UserId && m.BrandId != null).ToList();
-//             if (mysqllist.Count > 0)
-//             {
-//                 foreach (var sub in mysqllist)
-//                 {
-//                     newlist.Add(sub.Id);
-//                 }
-//                 RedisDbconn.Instance.Clear(key);
-//                 foreach (var sub in newlist)
-//                 {
-//                     RedisDbconn.Instance.AddRightList(key, sub);
-//                 }
-//                 RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(60, 180));
-//             }
-//             db.Dispose();
-//             return newlist;
-//         }
-//         #endregion
-
-
-//         #region 获取机具申请记录单个字段
-//         public StoreMachineApply GetApply(int Id)
-//         {
-//             string key = "StoreApply:" + Id;
-//             if (RedisDbconn.Instance.Exists(key))
-//             {
-//                 StoreMachineApply obj = RedisDbconn.Instance.Get<StoreMachineApply>(key);
-//                 if (obj != null)
-//                 {
-//                     return obj;
-//                 }
-//             }
-//             WebCMSEntities db = new WebCMSEntities();
-//             StoreMachineApply storeMachineApply = db.StoreMachineApply.FirstOrDefault(m => m.Id == Id);
-//             if (storeMachineApply != null)
-//             {
-//                 RedisDbconn.Instance.Set(key, storeMachineApply);
-//                 RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(60, 180));
-//             }
-//             db.Dispose();
-//             return storeMachineApply;
-//         }
-//         #endregion
-
-
-//         #region 获取机具申请记录列表
-//         public List<int> GetApplyList(int UserId, int StoreId, int pageNum = 1, int pageSize = 10)
-//         {
-//             string key = "StoreApplyList:" + UserId + StoreId;
-//             List<int> list = new List<int>();
-//             if (RedisDbconn.Instance.Exists(key))
-//             {
-//                 list = RedisDbconn.Instance.GetList<int>(key, pageNum, pageSize);
-//                 if (list.Count > 0)
-//                 {
-//                     return list;
-//                 }
-//             }
-//             WebCMSEntities db = new WebCMSEntities();
-//             List<int> newlist = new List<int>();
-//             var mysqllist = db.StoreMachineApply.Select(m => new { m.Id, m.UserId, m.StoreId }).Where(m => m.UserId == UserId && m.StoreId == StoreId).ToList();
-//             if (mysqllist.Count > 0)
-//             {
-//                 foreach (var sub in mysqllist)
-//                 {
-//                     newlist.Add(sub.Id);
-//                 }
-//                 RedisDbconn.Instance.Clear(key);
-//                 foreach (var sub in newlist)
-//                 {
-//                     RedisDbconn.Instance.AddRightList(key, sub);
-//                 }
-//                 RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(60, 180));
-//             }
-//             db.Dispose();
-//             return newlist;
-//         }
-//         #endregion
-
-
-//         #region 获取机具申请记录详情
-//         public List<int> GetApplyDetailList(int UserId, int StoreId, int StoreApplyId)
-//         {
-//             string key = "StoreApplyList:" + UserId + StoreId + StoreApplyId;
-//             List<int> list = new List<int>();
-//             if (RedisDbconn.Instance.Exists(key))
-//             {
-//                 list = RedisDbconn.Instance.GetList<int>(key);
-//                 if (list.Count > 0)
-//                 {
-//                     return list;
-//                 }
-//             }
-//             WebCMSEntities db = new WebCMSEntities();
-//             List<int> newlist = new List<int>();
-//             var mysqllist = db.StoreMachineApply.Select(m => new { m.Id, m.UserId, m.StoreId }).Where(m => m.UserId == UserId && m.StoreId == StoreId && m.Id == StoreApplyId).ToList();
-//             if (mysqllist.Count > 0)
-//             {
-//                 foreach (var sub in mysqllist)
-//                 {
-//                     newlist.Add(sub.Id);
-//                 }
-//                 RedisDbconn.Instance.Clear(key);
-//                 foreach (var sub in newlist)
-//                 {
-//                     RedisDbconn.Instance.AddRightList(key, sub);
-//                 }
-//                 RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(60, 180));
-//             }
-//             db.Dispose();
-//             return newlist;
-//         }
-//         #endregion
-//     }
-// }

+ 0 - 445
AppStart/Redis/Mysql/BusinessTradeSummaryDbconn.cs

@@ -1,445 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Library;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class BusinessTradeSummaryDbconn
-    {
-        public readonly static BusinessTradeSummaryDbconn Instance = new BusinessTradeSummaryDbconn();
-        public BusinessTradeSummaryDbconn()
-        { }
-
-        // TODO:读取很慢,感觉redis没生效
-
-        #region 获取单个字段
-        //个人业绩
-        public decimal GetTrade(int UserId, int IsLeader)
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            //主账号
-            if (IsLeader == 1)
-            {
-                bool check = db.BusinessTradeSummary.Any(m => m.UserId == UserId);
-                if (check)
-                {
-                    amt = db.BusinessTradeSummary.Where(m => m.UserId == UserId).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt);
-
-                }
-            }
-            //子账号
-            if (IsLeader == 0)
-            {
-                bool check = db.BusinessTradeSummary.Any(m => m.PartnerId == UserId);
-                if (check)
-                {
-                    amt = db.BusinessTradeSummary.Where(m => m.UserId == UserId).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt);
-
-                }
-            }
-
-            db.Dispose();
-            return amt;
-        }
-
-
-        public decimal GetDateTrade(int UserId, int IsLeader, string TradeDate)
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            //主账号
-            if (IsLeader == 1)
-            {
-                bool check = db.BusinessTradeSummary.Any(m => m.UserId == UserId && m.TradeDate == TradeDate);
-                if (check)
-                {
-                    amt = db.BusinessTradeSummary.Where(m => m.UserId == UserId && m.TradeDate == TradeDate).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt);
-
-                }
-            }
-            //子账号
-            if (IsLeader == 0)
-            {
-                bool check = db.BusinessTradeSummary.Any(m => m.PartnerId == UserId && m.TradeDate == TradeDate);
-                if (check)
-                {
-                    amt = db.BusinessTradeSummary.Where(m => m.PartnerId == UserId && m.TradeDate == TradeDate).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt);
-
-                }
-            }
-
-            db.Dispose();
-            return amt;
-        }
-
-
-        public decimal GetMonthTrade(int UserId, int IsLeader, string TradeMonth)
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            //主账号
-            if (IsLeader == 1)
-            {
-                bool check = db.BusinessTradeSummary.Any(m => m.UserId == UserId && m.TradeMonth == TradeMonth);
-                if (check)
-                {
-                    amt = db.BusinessTradeSummary.Where(m => m.UserId == UserId && m.TradeMonth == TradeMonth).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt);
-
-                }
-            }
-            //子账号
-            if (IsLeader == 0)
-            {
-                bool check = db.BusinessTradeSummary.Any(m => m.PartnerId == UserId && m.TradeMonth == TradeMonth);
-                if (check)
-                {
-                    amt = db.BusinessTradeSummary.Where(m => m.PartnerId == UserId && m.TradeMonth == TradeMonth).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt);
-
-                }
-            }
-
-            db.Dispose();
-            return amt;
-        }
-
-
-        public decimal GetDateTradeForBrand(int UserId, int IsLeader, string TradeDate, int BrandId)
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            //主账号
-            if (IsLeader == 1)
-            {
-                bool check = db.BusinessTradeSummary.Any(m => m.UserId == UserId && m.BrandId == BrandId && m.TradeDate == TradeDate);
-                if (check)
-                {
-                    amt = db.BusinessTradeSummary.Where(m => m.UserId == UserId && m.BrandId == BrandId && m.TradeDate == TradeDate).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt);
-
-                }
-            }
-            //子账号
-            if (IsLeader == 0)
-            {
-                bool check = db.BusinessTradeSummary.Any(m => m.PartnerId == UserId && m.BrandId == BrandId && m.TradeDate == TradeDate);
-                if (check)
-                {
-                    amt = db.BusinessTradeSummary.Where(m => m.PartnerId == UserId && m.BrandId == BrandId && m.TradeDate == TradeDate).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt);
-
-                }
-            }
-
-            db.Dispose();
-            return amt;
-        }
-
-
-        public decimal GetMonthTradeForBrand(int UserId, int IsLeader, string TradeMonth, int BrandId)
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            //主账号
-            if (IsLeader == 1)
-            {
-                bool check = db.BusinessTradeSummary.Any(m => m.UserId == UserId && m.BrandId == BrandId && m.TradeMonth == TradeMonth);
-                if (check)
-                {
-                    amt = db.BusinessTradeSummary.Where(m => m.UserId == UserId && m.BrandId == BrandId && m.TradeMonth == TradeMonth).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt);
-
-                }
-            }
-            //子账号
-            if (IsLeader == 0)
-            {
-                bool check = db.BusinessTradeSummary.Any(m => m.PartnerId == UserId && m.BrandId == BrandId && m.TradeMonth == TradeMonth);
-                if (check)
-                {
-                    amt = db.BusinessTradeSummary.Where(m => m.PartnerId == UserId && m.BrandId == BrandId && m.TradeMonth == TradeMonth).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt);
-
-                }
-            }
-
-            db.Dispose();
-            return amt;
-        }
-
-
-        //贷记卡/借记卡
-        public decimal GetDateTradeForCloud(int UserId, int IsLeader, string TradeDate, int QrPayFlag, int BankCardType)
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            //主账号
-            if (IsLeader == 1)
-            {
-                bool check = db.BusinessTradeSummary.Any(m => m.UserId == UserId && m.QueryCount == QrPayFlag && m.TradeDate == TradeDate);
-                if (check)
-                {
-                    if (BankCardType == 0)
-                    {
-                        amt = db.BusinessTradeSummary.Where(m => m.UserId == UserId && m.QueryCount == QrPayFlag && m.TradeDate == TradeDate).Sum(m => m.HelpDirectDebitTradeAmt + m.NotHelpDirectDebitTradeAmt);
-                    }
-                    else
-                    {
-                        amt = db.BusinessTradeSummary.Where(m => m.UserId == UserId && m.QueryCount == QrPayFlag && m.TradeDate == TradeDate).Sum(m => m.HelpDirectTradeAmt + m.NotHelpDirectTradeAmt);
-                    }
-                }
-            }
-            //子账号
-            if (IsLeader == 0)
-            {
-                bool check = db.BusinessTradeSummary.Any(m => m.PartnerId == UserId && m.QueryCount == QrPayFlag && m.TradeDate == TradeDate);
-                if (check)
-                {
-                    if (BankCardType == 0)
-                    {
-                        amt = db.BusinessTradeSummary.Where(m => m.PartnerId == UserId && m.QueryCount == QrPayFlag && m.TradeDate == TradeDate).Sum(m => m.HelpDirectDebitTradeAmt + m.NotHelpDirectDebitTradeAmt);
-                    }
-                    else
-                    {
-                        amt = db.BusinessTradeSummary.Where(m => m.PartnerId == UserId && m.QueryCount == QrPayFlag && m.TradeDate == TradeDate).Sum(m => m.HelpDirectTradeAmt + m.NotHelpDirectTradeAmt);
-                    }
-                }
-            }
-
-            db.Dispose();
-            return amt;
-        }
-
-
-        //云闪付
-        public decimal GetDateTradeForCloud(int UserId, int IsLeader, string TradeDate, int QrPayFlag)
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            //主账号
-            if (IsLeader == 1)
-            {
-                bool check = db.BusinessTradeSummary.Any(m => m.UserId == UserId && m.QueryCount == QrPayFlag && m.TradeDate == TradeDate);
-                if (check)
-                {
-                    amt = db.BusinessTradeSummary.Where(m => m.UserId == UserId && m.QueryCount == QrPayFlag && m.TradeDate == TradeDate).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt);
-
-                }
-            }
-            //子账号
-            if (IsLeader == 0)
-            {
-                bool check = db.BusinessTradeSummary.Any(m => m.PartnerId == UserId && m.QueryCount == QrPayFlag && m.TradeDate == TradeDate);
-                if (check)
-                {
-                    amt = db.BusinessTradeSummary.Where(m => m.PartnerId == UserId && m.QueryCount == QrPayFlag && m.TradeDate == TradeDate).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt);
-
-                }
-            }
-
-            db.Dispose();
-            return amt;
-        }
-
-
-        //云闪付
-        public decimal GetMonthTradeForCloud(int UserId, int IsLeader, string TradeMonth, int QrPayFlag)
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            //主账号
-            if (IsLeader == 1)
-            {
-                bool check = db.BusinessTradeSummary.Any(m => m.UserId == UserId && m.QueryCount == QrPayFlag && m.TradeMonth == TradeMonth);
-                if (check)
-                {
-                    amt = db.BusinessTradeSummary.Where(m => m.UserId == UserId && m.QueryCount == QrPayFlag && m.TradeMonth == TradeMonth).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt);
-
-                }
-            }
-            //子账号
-            if (IsLeader == 0)
-            {
-                bool check = db.BusinessTradeSummary.Any(m => m.PartnerId == UserId && m.QueryCount == QrPayFlag && m.TradeMonth == TradeMonth);
-                if (check)
-                {
-                    amt = db.BusinessTradeSummary.Where(m => m.PartnerId == UserId && m.QueryCount == QrPayFlag && m.TradeMonth == TradeMonth).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt);
-
-                }
-            }
-
-            db.Dispose();
-            return amt;
-        }
-
-
-        //贷记卡/借记卡
-        public decimal GetMonthTradeForCloud(int UserId, int IsLeader, string TradeMonth, int QrPayFlag, int BankCardType)
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            //主账号
-            if (IsLeader == 1)
-            {
-                bool check = db.BusinessTradeSummary.Any(m => m.UserId == UserId && m.QueryCount == QrPayFlag && m.TradeMonth == TradeMonth);
-                if (check)
-                {
-                    amt = db.BusinessTradeSummary.Where(m => m.UserId == UserId && m.QueryCount == QrPayFlag && m.TradeMonth == TradeMonth).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt);
-
-                }
-            }
-            //子账号
-            if (IsLeader == 0)
-            {
-                bool check = db.BusinessTradeSummary.Any(m => m.PartnerId == UserId && m.QueryCount == QrPayFlag && m.TradeMonth == TradeMonth);
-                if (check)
-                {
-                    amt = db.BusinessTradeSummary.Where(m => m.PartnerId == UserId && m.QueryCount == QrPayFlag && m.TradeMonth == TradeMonth).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt);
-
-                }
-            }
-
-            db.Dispose();
-            return amt;
-        }
-
-
-        public int GetActCount(int UserId, int IsLeader, string TradeMonthOrDate = "")
-        {
-            int MakerCount = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            //主账号
-            if (IsLeader == 1)
-            {
-                if (string.IsNullOrEmpty(TradeMonthOrDate))
-                {
-                    bool check = db.BusinessActSummary.Any(m => m.UserId == UserId);
-                    if (check)
-                    {
-                        MakerCount = db.BusinessActSummary.Where(m => m.UserId == UserId).Sum(m => m.ActCount);
-                    }
-                }
-                else
-                {
-                    if (TradeMonthOrDate.Length == 8)
-                    {
-                        bool check = db.BusinessActSummary.Any(m => m.UserId == UserId && m.TradeDate == TradeMonthOrDate);
-                        if (check)
-                        {
-                            MakerCount = db.BusinessActSummary.Where(m => m.UserId == UserId && m.TradeDate == TradeMonthOrDate).Sum(m => m.ActCount);
-                        }
-                    }
-                    else
-                    {
-                        bool check = db.BusinessActSummary.Any(m => m.UserId == UserId && m.TradeMonth == TradeMonthOrDate);
-                        if (check)
-                        {
-                            MakerCount = db.BusinessActSummary.Where(m => m.UserId == UserId && m.TradeMonth == TradeMonthOrDate).Sum(m => m.ActCount);
-                        }
-                    }
-                }
-            }
-            //子账号
-            if (IsLeader == 0)
-            {
-                if (string.IsNullOrEmpty(TradeMonthOrDate))
-                {
-                    bool check = db.BusinessActSummary.Any(m => m.PartnerId == UserId);
-                    if (check)
-                    {
-                        MakerCount = db.BusinessActSummary.Where(m => m.PartnerId == UserId).Sum(m => m.ActCount);
-                    }
-                }
-                else
-                {
-                    if (TradeMonthOrDate.Length == 8)
-                    {
-                        bool check = db.BusinessActSummary.Any(m => m.PartnerId == UserId && m.TradeDate == TradeMonthOrDate);
-                        if (check)
-                        {
-                            MakerCount = db.BusinessActSummary.Where(m => m.PartnerId == UserId && m.TradeDate == TradeMonthOrDate).Sum(m => m.ActCount);
-                        }
-                    }
-                    else
-                    {
-                        bool check = db.BusinessActSummary.Any(m => m.PartnerId == UserId && m.TradeMonth == TradeMonthOrDate);
-                        if (check)
-                        {
-                            MakerCount = db.BusinessActSummary.Where(m => m.PartnerId == UserId && m.TradeMonth == TradeMonthOrDate).Sum(m => m.ActCount);
-                        }
-                    }
-                }
-            }
-
-            db.Dispose();
-            return MakerCount;
-        }
-
-
-        public int GetBrandActCount(int UserId, int IsLeader, int BrandId, string TradeMonthOrDate = "")
-        {
-            int MakerCount = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            //主账号
-            if (IsLeader == 1)
-            {
-                if (TradeMonthOrDate.Length == 8)
-                {
-                    bool check = db.BusinessActSummary.Any(m => m.UserId == UserId && m.BrandId == BrandId && m.TradeDate == TradeMonthOrDate);
-                    if (check)
-                    {
-                        MakerCount = db.BusinessActSummary.Where(m => m.UserId == UserId && m.BrandId == BrandId && m.TradeDate == TradeMonthOrDate).Sum(m => m.ActCount);
-                    }
-                }
-                else
-                {
-                    bool check = db.BusinessActSummary.Any(m => m.UserId == UserId && m.BrandId == BrandId && m.TradeMonth == TradeMonthOrDate);
-                    if (check)
-                    {
-                        MakerCount = db.BusinessActSummary.Where(m => m.UserId == UserId && m.BrandId == BrandId && m.TradeMonth == TradeMonthOrDate).Sum(m => m.ActCount);
-                    }
-                }
-            }
-            //子账号
-            if (IsLeader == 0)
-            {
-                if (TradeMonthOrDate.Length == 8)
-                {
-                    bool check = db.BusinessActSummary.Any(m => m.PartnerId == UserId && m.BrandId == BrandId && m.TradeDate == TradeMonthOrDate);
-                    if (check)
-                    {
-                        MakerCount = db.BusinessActSummary.Where(m => m.PartnerId == UserId && m.BrandId == BrandId && m.TradeDate == TradeMonthOrDate).Sum(m => m.ActCount);
-                    }
-                }
-                else
-                {
-                    bool check = db.BusinessActSummary.Any(m => m.PartnerId == UserId && m.BrandId == BrandId && m.TradeMonth == TradeMonthOrDate);
-                    if (check)
-                    {
-                        MakerCount = db.BusinessActSummary.Where(m => m.PartnerId == UserId && m.BrandId == BrandId && m.TradeMonth == TradeMonthOrDate).Sum(m => m.ActCount);
-                    }
-                }
-            }
-
-            db.Dispose();
-            return MakerCount;
-        }
-
-
-        //激活机具数
-        public int GetCount(int UserId, int BrandId)
-        {
-            int ActCount = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.UserTradeMonthSummary.Any(m => m.UserId == UserId && m.BrandId == BrandId && m.SeoTitle == "self");
-            if (check)
-            {
-                ActCount = db.UserTradeMonthSummary.Where(m => m.UserId == UserId && m.BrandId == BrandId && m.SeoTitle == "self").Sum(m => m.ActiveBuddyMerStatus);
-            }
-            db.Dispose();
-            return ActCount;
-        }
-
-
-        #endregion
-
-    }
-}

+ 0 - 24
AppStart/Redis/Mysql/ConsumerOpenIdsDbconn.cs

@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class ConsumerOpenIdsDbconn
-    {
-        public readonly static ConsumerOpenIdsDbconn Instance = new ConsumerOpenIdsDbconn();
-
-        #region 获取单个字段
-        public ConsumerOpenIds Get(string OpenId)
-        {
-            WebCMSEntities db = new WebCMSEntities();
-            ConsumerOpenIds order = db.ConsumerOpenIds.FirstOrDefault(m => m.OpenId == OpenId);
-            if (order != null)
-            {
-            }
-            return order;
-        }
-        #endregion
-    }
-}

+ 0 - 24
AppStart/Redis/Mysql/ConsumersDbconn.cs

@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class ConsumersDbconn
-    {
-        public readonly static ConsumersDbconn Instance = new ConsumersDbconn();
-
-        #region 获取单个字段
-        public Consumers Get(int Id)
-        {
-            WebCMSEntities db = new WebCMSEntities();
-            Consumers order = db.Consumers.FirstOrDefault(m => m.Id == Id);
-            if (order != null)
-            {
-            }
-            return order;
-        }
-        #endregion
-    }
-}

+ 0 - 47
AppStart/Redis/Mysql/KqProductsDbconn.cs

@@ -1,47 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class KqProductsDbconn
-    {
-        public readonly static KqProductsDbconn Instance = new KqProductsDbconn();
-
-        #region 获取列表
-        public List<KqProducts> GetList()
-        {
-            string key = "KqProducts";
-            List<KqProducts> list = new List<KqProducts>();
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                list = RedisDbconn.Instance.GetList<KqProducts>(key, 1, 100);
-                if (list.Count > 0)
-                {
-                    return list;
-                }
-            }
-            List<KqProducts> newlist = new List<KqProducts>();
-            RedisDbconn.Instance.GetLock(key + ":lock");
-            WebCMSEntities db = new WebCMSEntities();
-            var mysqllist = db.KqProducts.Where(m => m.Status == 1).OrderBy(m => m.Id).ToList();
-            if (mysqllist.Count > 0)
-            {
-                foreach (var sub in mysqllist)
-                {
-                    newlist.Add(sub);
-                }
-                RedisDbconn.Instance.Clear(key);
-                foreach (KqProducts sub in newlist)
-                {
-                    RedisDbconn.Instance.AddRightList(key, sub);
-                }
-            }
-            db.Dispose();
-            RedisDbconn.Instance.ReleaseLock(key + ":lock");
-            return newlist;
-        }
-        #endregion
-    }
-}

+ 0 - 484
AppStart/Redis/Mysql/LargeDataScreenDbconn.cs

@@ -1,484 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Library;
-using System.Linq;
-using System.Data;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class LargeDataScreenDbconn
-    {
-        public readonly static LargeDataScreenDbconn Instance = new LargeDataScreenDbconn();
-
-
-        #region 本月新增创客数
-        public int GetTeamMakerCountThisMonth(int UserId)
-        {
-            DateTime start = DateTime.Parse(DateTime.Now.ToString("yyyy-MM") + "-01 00:00:00");
-            DateTime end = start.AddMonths(1);
-            WebCMSEntities db = new WebCMSEntities();
-            string IdString = "," + UserId + ",";
-            int MakerCount = db.Users.Count(m => m.ParentNav.Contains(IdString) && m.AuthDate >= start && m.AuthDate < end);
-            db.Dispose();
-            return MakerCount;
-        }
-        #endregion
-
-        #region 上月新增创客数
-        public int GetTeamMakerCountLastMonth(int UserId)
-        {
-            DateTime end = DateTime.Parse(DateTime.Now.ToString("yyyy-MM") + "-01 00:00:00");
-            DateTime start = end.AddMonths(-1);
-            WebCMSEntities db = new WebCMSEntities();
-            string IdString = "," + UserId + ",";
-            int MakerCount = db.Users.Count(m => m.ParentNav.Contains(IdString) && m.AuthDate >= start && m.AuthDate < end);
-            db.Dispose();
-            return MakerCount;
-        }
-        #endregion
-
-        #region 团队新增创客
-        public int GetNewUserCount(int UserId, string Day = "")
-        {
-            string key = "AddUser:" + UserId;
-            if (!string.IsNullOrEmpty(Day))
-            {
-                key += ":" + Day;
-            }
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                int obj = RedisDbconn.Instance.Get<int>(key);
-                if (obj > 0)
-                {
-                    return obj;
-                }
-            }
-            int ckcount = 0;
-            string UserIdString = "," + UserId + ",";
-            WebCMSEntities db = new WebCMSEntities();
-            if (!string.IsNullOrEmpty(Day))
-            {
-                if (Day.Length == 8)
-                {
-                    DateTime start = DateTime.Parse(Day.Substring(0, 4) + "-" + Day.Substring(4, 2) + "-" + Day.Substring(6, 2) + " 00:00:00");
-                    DateTime end = start.AddDays(1);
-                    ckcount = db.Users.Count(m => m.ParentNav.Contains(UserIdString) && m.CreateDate >= start && m.CreateDate < end);
-                }
-                else
-                {
-                    DateTime start = DateTime.Parse(Day.Substring(0, 4) + "-" + Day.Substring(4, 2) + "-01 00:00:00");
-                    DateTime end = start.AddDays(1);
-                    ckcount = db.Users.Count(m => m.ParentNav.Contains(UserIdString) && m.CreateDate >= start && m.CreateDate < end);
-                }
-            }
-            else
-            {
-                ckcount = db.Users.Count(m => m.ParentNav.Contains(UserIdString));
-            }
-            RedisDbconn.Instance.Set(key, ckcount);
-            RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(60, 180));
-            db.Dispose();
-            return ckcount;
-        }
-        #endregion
-
-
-        #region 团队新增商户
-        public int GetNewPosMerCount(int UserId, string Day = "")
-        {
-            string key = "AddPosMer:" + UserId;
-            if (!string.IsNullOrEmpty(Day))
-            {
-                key += ":" + Day;
-            }
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                int obj = RedisDbconn.Instance.Get<int>(key);
-                if (obj > 0)
-                {
-                    return obj;
-                }
-            }
-            int shcount = 0;
-            string UserIdString = "," + UserId + ",";
-            WebCMSEntities db = new WebCMSEntities();
-            if (!string.IsNullOrEmpty(Day))
-            {
-                if (Day.Length == 8)
-                {
-                    DateTime start = DateTime.Parse(Day.Substring(0, 4) + "-" + Day.Substring(4, 2) + "-" + Day.Substring(6, 2) + " 00:00:00");
-                    DateTime end = start.AddDays(1);
-                    shcount = db.PosMerchantInfo.Count(m => m.CreateDate >= start && m.CreateDate < end);
-                }
-                else
-                {
-                    DateTime start = DateTime.Parse(Day.Substring(0, 4) + "-" + Day.Substring(4, 2) + "-01 00:00:00");
-                    DateTime end = start.AddDays(1);
-                    shcount = db.PosMerchantInfo.Count(m => m.CreateDate >= start && m.CreateDate < end);
-                }
-            }
-            else
-            {
-                shcount = db.PosMerchantInfo.Count();
-            }
-            RedisDbconn.Instance.Set(key, shcount);
-            RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(60, 180));
-            db.Dispose();
-            return shcount;
-        }
-        #endregion
-
-        #region 全国今日新增创客和商户
-        public List<MakerShopAdds> GetMakerShopAddsList()
-        {
-            List<MakerShopAdds> Obj = RedisDbconn.Instance.GetList<MakerShopAdds>("MakerShopAddsList");
-            if (Obj.Count > 0)
-            {
-                return Obj;
-            }
-            OtherMySqlConn.connstr = Library.ConfigurationManager.AppSettings["SqlConnStr"].ToString();
-            DataTable dt = OtherMySqlConn.dtable("select (select sum(RecUserAuthNum) from PullnewSummary where SeoTitle='team' and UserId=1) ckcount,(select count(0) count from PosMerchantInfo) shcount from PullnewSummary,PosMerchantInfo limit 1");
-            foreach (DataRow item in dt.Rows)
-            {
-                Obj.Add(new MakerShopAdds()
-                {
-                    shcount = Convert.ToInt32(item["shcount"]),
-                    ckcount = Convert.ToInt32(item["ckcount"])
-                });
-            }
-            foreach (var sub in Obj)
-            {
-                RedisDbconn.Instance.AddRightList("MakerShopAddsList", sub);
-            }
-            RedisDbconn.Instance.SetExpire("MakerShopAddsList", Library.function.get_Random(60, 180));
-            dt.Dispose();
-            return Obj;
-        }
-        #endregion
-
-        #region 全国创客开机列表
-        public List<MakerOpenMachines> GetMakerOpenMachinesList(string key, int pageNum = 1, int pageSize = 30)
-        {
-            List<MakerOpenMachines> Obj = RedisDbconn.Instance.GetList<MakerOpenMachines>("MakerOpenMachinesList: "+pageNum, 1, pageSize);
-            if (Obj.Count > 0)
-            {
-                return Obj;
-            }
-
-            List<MakerOpenMachines> list = new List<MakerOpenMachines>();
-            int Skip = pageSize * (pageNum - 1);
-            OtherMySqlConn.connstr = Library.ConfigurationManager.AppSettings["SqlConnStr"].ToString();
-            DataTable dt = OtherMySqlConn.dtable("select b.ActivationTime ActivationTime,k.NAME productName,a.RealName realname,c.count count from Users a left join PosMachinesTwo b on a.Id=b.userId LEFT JOIN KqProducts k ON k.Id=b.BrandId left join (select a.Id,count(a.Id) as count from Users a left join PosMachinesTwo b on a.Id=b.UserId LEFT JOIN KqProducts k ON k.Id=b.BrandId where BindingState=1 group by a.Id)c on a.Id=c.Id where BindingState=1 AND MONTH(ActivationTime)=MONTH(now()) and YEAR(ActivationTime)=YEAR(now())order by b.ActivationTime desc limit " + Skip + "," + pageSize + "");
-            foreach (DataRow item in dt.Rows)
-            {
-                list.Add(new MakerOpenMachines()
-                {
-                    ActivationTime = Convert.ToDateTime(item["ActivationTime"]).ToString("yyyy-MM-dd HH:mm:ss"),
-                    productName = item["productName"].ToString(),
-                    realname = SetSensitiveName(item["RealName"].ToString()),
-                    count = Convert.ToInt32(item["count"])
-                });
-            }
-            list = list.OrderByDescending(m => m.ActivationTime).ToList();
-            foreach (var sub in list)
-            {
-                RedisDbconn.Instance.AddRightList("MakerOpenMachinesList: "+pageNum, sub);
-            }
-            RedisDbconn.Instance.SetExpire("MakerOpenMachinesList: "+pageNum, Library.function.get_Random(60, 180));
-            dt.Dispose();
-            return list;
-        }
-        #endregion
-
-        #region 全国展业数据
-        public List<Exhibitions> GetExhibitionList()
-        {
-            List<Exhibitions> Obj = RedisDbconn.Instance.GetList<Exhibitions>("ExhibitionList");
-            if (Obj.Count > 0)
-            {
-                return Obj;
-            }
-            OtherMySqlConn.connstr = Library.ConfigurationManager.AppSettings["SqlConnStr"].ToString();
-            DataTable dt = OtherMySqlConn.dtable("select(select count(0) count from StoreHouse where YEAR(CreateDate)=YEAR(now())) count,(select Sum(TotalAmount) WithdrawAmount from UserAccount) WithdrawAmount,(select sum(NonDirectTradeAmt) WithdrawAmount from UserTradeDaySummary where UserId=1 and SeoTitle='team' and left(TradeMonth,4) = YEAR(NOW())) yearsum,(select sum(NonDirectDebitCapNum) from UserTradeDaySummary where UserId=1 and SeoTitle='team' and left(TradeMonth,4) = YEAR(NOW())) yearcount,(select sum(NonDirectTradeAmt) from UserTradeDaySummary where UserId=1 and SeoTitle='team' and quarter(TradeDate)=quarter(now())) quartersum, (select sum(NonDirectDebitCapNum) from UserTradeDaySummary where UserId=1 and SeoTitle='team' and quarter(TradeDate)=quarter(now())) quartercount,(select sum(NonDirectTradeAmt) WithdrawAmount from UserTradeDaySummary where UserId=1 and SeoTitle='team' and RIGHT(TradeMonth,2) = MONTH(NOW())) monthsum,(select sum(NonDirectDebitCapNum) WithdrawAmount from UserTradeDaySummary where UserId=1 and SeoTitle='team' and RIGHT(TradeMonth,2) = MONTH(NOW())) monthcount,(select sum(NonDirectTradeAmt) from UserTradeDaySummary where UserId=1 and SeoTitle='team' and TO_DAYS(TradeDate)=TO_DAYS(NOW() - INTERVAL 1 DAY)) nowsum, (select sum(NonDirectDebitCapNum) from UserTradeDaySummary where UserId=1 and SeoTitle='team' and TO_DAYS(TradeDate)=TO_DAYS(NOW() - INTERVAL 1 DAY)) nowcount from UserTradeDaySummary limit 1");
-            foreach (DataRow item in dt.Rows)
-            {
-                Obj.Add(new Exhibitions()
-                {
-                    WithdrawAmount = decimal.Parse(function.CheckNum(item["WithdrawAmount"].ToString())),
-                    count = Convert.ToInt32(function.CheckNum(item["count"].ToString())),
-                    yearsum = decimal.Parse(function.CheckNum(item["yearsum"].ToString())),
-                    yearcount = Convert.ToInt32(function.CheckNum(item["yearcount"].ToString())),
-                    quartersum = decimal.Parse(function.CheckNum(item["quartersum"].ToString())),
-                    quartercount = Convert.ToInt32(function.CheckNum(item["quartercount"].ToString())),
-                    monthsum = decimal.Parse(function.CheckNum(item["monthsum"].ToString())),
-                    monthcount = Convert.ToInt32(function.CheckNum(item["monthcount"].ToString())),
-                    nowsum = decimal.Parse(function.CheckNum(item["nowsum"].ToString())),
-                    nowcount = Convert.ToInt32(function.CheckNum(item["nowcount"].ToString()))
-                });
-            }
-            foreach (var sub in Obj)
-            {
-                RedisDbconn.Instance.AddRightList("ExhibitionList", sub);
-            }
-            RedisDbconn.Instance.SetExpire("ExhibitionList", Library.function.get_Random(60, 180));
-            dt.Dispose();
-            return Obj;
-        }
-        #endregion
-
-
-        #region 团队累计开机榜排名前十
-        public List<OpenMachines> GetOpenMachinesList(int UserId)
-        {
-            // string key = "OpenMachinesList:" + UserId;
-            // List<int> list = new List<int>();
-            // if (RedisDbconn.Instance.Exists(key))
-            // {
-            //     list = RedisDbconn.Instance.GetList<int>(key, pageNum, pageSize);
-            //     if (list.Count > 0)
-            //     {
-            //         return list;
-            //     }
-            // }
-            // DateTime start = DateTime.Now.AddDays(1 - DateTime.Now.Day).Date;
-            // DateTime end = DateTime.Now.AddDays(1 - DateTime.Now.Day).Date.AddMonths(1).AddSeconds(-1);
-            // WebCMSEntities db = new WebCMSEntities();
-            // List<int> newlist = new List<int>();
-            // var mysqllist = db.PosMachinesTwo.Select(m => new { m.Id, m.UserId, m.BindingState, m.BindingTime, m.Status }).Where(m => m.Status > -1 && m.UserId == UserId && m.BindingState==1 && m.BindingTime >= start && m.BindingTime <= end).ToList();
-            // if (mysqllist.Count > 0)
-            // {
-            //     foreach (var sub in mysqllist)
-            //     {
-            //         newlist.Add(sub.Id);
-            //     }
-            //     RedisDbconn.Instance.Clear(key);
-            //     foreach (var sub in newlist)
-            //     {
-            //         RedisDbconn.Instance.AddRightList(key, sub);
-            //     }
-            //     RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(60, 180));
-            // }
-            // db.Dispose();
-
-            List<OpenMachines> Obj = RedisDbconn.Instance.GetList<OpenMachines>("OpenMachinesList:" + UserId);
-            if (Obj.Count > 0)
-            {
-                return Obj;
-            }
-            OtherMySqlConn.connstr = Library.ConfigurationManager.AppSettings["SqlConnStr"].ToString();
-            DataTable dt = OtherMySqlConn.dtable("select a.UserId UserId,b.RealName RealName,a.sum Sum from(select UserId, sum(NonDirectDebitCapNum) sum from UserTradeDaySummary where SeoTitle='team' and UserId in (select Id from Users where ParentNav like '%," + UserId + ",%')GROUP BY UserId ORDER BY sum desc limit 10)a left join Users b on a.UserId = b.Id");//累计数据统计
-            foreach (DataRow item in dt.Rows)
-            {
-                Obj.Add(new OpenMachines()
-                {
-                    userId = Convert.ToInt32(item["UserId"]),
-                    realName = SetSensitiveName(item["RealName"].ToString()),
-                    openCount = decimal.Parse(item["Sum"].ToString())
-                });
-            }
-            Obj = Obj.OrderByDescending(m => m.openCount).ToList();
-            foreach (var sub in Obj)
-            {
-                RedisDbconn.Instance.AddRightList("OpenMachinesList:" + UserId, sub);
-            }
-            RedisDbconn.Instance.SetExpire("OpenMachinesList:" + UserId, Library.function.get_Random(60, 180));
-            dt.Dispose();
-            return Obj;
-        }
-        #endregion
-
-        #region 团队累计流水榜排名前十
-        public List<FlowingWater> GetFlowingWaterList(int UserId)
-        {
-            List<FlowingWater> Obj = RedisDbconn.Instance.GetList<FlowingWater>("FlowingWaterList:" + UserId);
-            if (Obj.Count > 0)
-            {
-                return Obj;
-            }
-            OtherMySqlConn.connstr = Library.ConfigurationManager.AppSettings["SqlConnStr"].ToString();
-            DataTable dt = OtherMySqlConn.dtable("select a.UserId UserId,b.RealName RealName,a.sum Sum from(select UserId, sum(NonDirectDebitTradeAmt + NonDirectTradeAmt) sum from UserTradeDaySummary where SeoTitle='team' and UserId in (select Id from Users where ParentNav like '%," + UserId + ",%')GROUP BY UserId ORDER BY sum desc limit 10)a left join Users b on a.UserId = b.Id");//累计数据统计
-            foreach (DataRow item in dt.Rows)
-            {
-                Obj.Add(new FlowingWater()
-                {
-                    UserId = Convert.ToInt32(item["UserId"]),
-                    RealName = SetSensitiveName(item["RealName"].ToString()),
-                    Sum = decimal.Parse(item["Sum"].ToString())
-                });
-            }
-            Obj = Obj.OrderByDescending(m => m.Sum).ToList();
-            foreach (var sub in Obj)
-            {
-                RedisDbconn.Instance.AddRightList("FlowingWaterList:" + UserId, sub);
-            }
-            RedisDbconn.Instance.SetExpire("FlowingWaterList:" + UserId, Library.function.get_Random(60, 180));
-            dt.Dispose();
-            return Obj;
-        }
-        #endregion
-
-        #region 累计收益榜排名前十
-        public List<InCome> GetIncomeList()
-        {
-            List<InCome> Obj = RedisDbconn.Instance.GetList<InCome>("IncomeList");
-            if (Obj.Count > 0)
-            {
-                return Obj;
-            }
-            OtherMySqlConn.connstr = Library.ConfigurationManager.AppSettings["SqlConnStr"].ToString();
-            // DataTable dt = OtherMySqlConn.dtable("select c.RealName RealName,b.Sum Sum from(select a.UserId, sum(a.ChangeAmount) Sum from(select * from UserAccountRecord where ChangeType = 1 or ChangeType = 12 or ChangeType = 50 or ChangeType = 60 or ChangeType = 111 or ChangeType = 112)a where a.UserId != 0 GROUP BY a.UserId ORDER BY Sum desc limit 10)b left join Users c on b.UserId = c.Id");//累计数据统计
-            DataTable dt = OtherMySqlConn.dtable("select b.RealName RealName,a.TotalAmount Sum from UserAccount a left join Users b on a.UserId=b.Id ORDER BY a.TotalAmount desc limit 10");
-            foreach (DataRow item in dt.Rows)
-            {
-                Obj.Add(new InCome()
-                {
-                    RealName = SetSensitiveName(item["RealName"].ToString()),
-                    Sum = decimal.Parse(item["Sum"].ToString())
-                });
-            }
-            Obj = Obj.OrderByDescending(m => m.Sum).ToList();
-            foreach (var sub in Obj)
-            {
-                RedisDbconn.Instance.AddRightList("IncomeList", sub);
-            }
-            RedisDbconn.Instance.SetExpire("IncomeList", Library.function.get_Random(60, 180));
-            dt.Dispose();
-            return Obj;
-        }
-        #endregion
-
-        // #region 交易额统计-本年每月
-        // public List<TradeYearMonth> GetTradeYearMonthList(int UserId)
-        // {
-        //     List<TradeYearMonth> Obj = RedisDbconn.Instance.GetList<TradeYearMonth>("TradeYearMonthList:" + UserId);
-        //     if (Obj.Count > 0)
-        //     {
-        //         return Obj;
-        //     }
-        //     OtherMySqlConn.connstr = Library.ConfigurationManager.AppSettings["SqlConnStr"].ToString();
-        //     DataTable dt = OtherMySqlConn.dtable("select year(a.CreateDate) year,month(a.CreateDate) month,count(*) count,sum(a.TradeAmount) sumamount from TradeRecord a where YEAR(a.CreateDate) = YEAR(NOW())group by year(a.CreateDate), month(a.CreateDate)order by month(a.CreateDate)");
-        //     foreach (DataRow item in dt.Rows)
-        //     {
-        //         Obj.Add(new TradeYearMonth()
-        //         {
-        //             year = item["year"].ToString(),
-        //             month = item["month"].ToString(),
-        //             count = int.Parse(item["count"].ToString()),
-        //             sumamount = decimal.Parse(item["sumamount"].ToString())
-        //         });
-        //     }
-        //     foreach (var sub in Obj)
-        //     {
-        //         RedisDbconn.Instance.AddRightList("TradeYearMonthList:" + UserId, sub);
-        //     }
-        //     RedisDbconn.Instance.SetExpire("TradeYearMonthList:" + UserId, Library.function.get_Random(60, 180));
-        //     dt.Dispose();
-        //     return Obj;
-        // }
-        // #endregion
-
-        #region 机型统计-机型占比统计
-        public List<ModelType> GetModelTypeList(int UserId)
-        {
-            List<ModelType> Obj = RedisDbconn.Instance.GetList<ModelType>("ModelTypeList:" + UserId);
-            if (Obj.Count > 0)
-            {
-                return Obj;
-            }
-            OtherMySqlConn.connstr = Library.ConfigurationManager.AppSettings["SqlConnStr"].ToString();
-            DataTable dt = OtherMySqlConn.dtable("select b.Name name,a.count count from(select BrandId,count(0) count from PosMachinesTwo where UserId in(select Id from Users where ParentNav like '%," + UserId + ",%' or Id=" + UserId + ")GROUP BY BrandId)a left join KqProducts b on a.BrandId=b.Id");
-            foreach (DataRow item in dt.Rows)
-            {
-                Obj.Add(new ModelType()
-                {
-                    name = item["name"].ToString(),
-                    count = Convert.ToInt32(item["count"])
-                });
-            }
-            foreach (var sub in Obj)
-            {
-                RedisDbconn.Instance.AddRightList("ModelTypeList:" + UserId, sub);
-            }
-            RedisDbconn.Instance.SetExpire("ModelTypeList:" + UserId, Library.function.get_Random(60, 180));
-            dt.Dispose();
-            return Obj;
-        }
-        #endregion
-
-        #region 机型统计-交易额统计
-        public List<ModelTypeTrade> GetModelTypeTradeList(int UserId)
-        {
-            List<ModelTypeTrade> Obj = RedisDbconn.Instance.GetList<ModelTypeTrade>("ModelTypeTradeList:" + UserId);
-            if (Obj.Count > 0)
-            {
-                return Obj;
-            }
-            OtherMySqlConn.connstr = Library.ConfigurationManager.AppSettings["SqlConnStr"].ToString();
-            DataTable dt = OtherMySqlConn.dtable("select b.Name name,a.sum sum from(select BrandId,sum(TradeAmount) sum from TradeRecord where UserId in (select Id from Users where ParentNav like '%," + UserId + ",%' or Id=" + UserId + ")GROUP BY BrandId)a left join KqProducts b on a.BrandId=b.Id");
-            foreach (DataRow item in dt.Rows)
-            {
-                Obj.Add(new ModelTypeTrade()
-                {
-                    name = item["name"].ToString(),
-                    sum = decimal.Parse(item["sum"].ToString())
-                });
-            }
-            foreach (var sub in Obj)
-            {
-                RedisDbconn.Instance.AddRightList("ModelTypeTradeList:" + UserId, sub);
-            }
-            RedisDbconn.Instance.SetExpire("ModelTypeTradeList:" + UserId, Library.function.get_Random(60, 180));
-            dt.Dispose();
-            return Obj;
-        }
-        #endregion
-
-        #region 交易额统计近一年
-        public decimal GetMonthTrade(int UserId, string TradeMonth, string kind = "self")
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.UserTradeDaySummary.Any(m => m.UserId == UserId && m.TradeMonth == TradeMonth && m.SeoTitle == kind);
-            if (check)
-            {
-                if (kind == "self")
-                {
-                    amt = db.UserTradeDaySummary.Where(m => m.UserId == UserId && m.TradeMonth == TradeMonth && m.SeoTitle == kind).Sum(m => m.DirectTradeAmt + m.DirectDebitTradeAmt);
-                }
-                else if (kind == "team")
-                {
-                    amt = db.UserTradeDaySummary.Where(m => m.UserId == UserId && m.TradeMonth == TradeMonth && m.SeoTitle == kind).Sum(m => m.NonDirectTradeAmt + m.NonDirectDebitTradeAmt);
-                }
-            }
-            db.Dispose();
-            return amt;
-        }
-        #endregion
-
-
-        #region 姓名脱敏
-        /// <summary>
-        /// 姓名敏感处理
-        /// </summary>
-        /// <param name="fullName">姓名</param>
-        /// <returns>脱敏后的姓名</returns>
-        public static string SetSensitiveName(string fullName)
-        {
-            if (string.IsNullOrEmpty(fullName)) return string.Empty;
-            string familyName = fullName.Substring(0, 1);
-            string end = fullName.Substring(fullName.Length - 1, 1);
-            string name = string.Empty;
-            //长度为2
-            if (fullName.Length <= 2) name = familyName + "*";
-            //长度⼤于2
-            else if (fullName.Length >= 3)
-            {
-                name = familyName.PadRight(fullName.Length - 1, '*') + end;
-            }
-            return name;
-        }
-        #endregion
-
-    }
-}

+ 0 - 56
AppStart/Redis/Mysql/MachineApplyDbconn.cs

@@ -1,56 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class MachineApplyDbconn
-    {
-        public readonly static MachineApplyDbconn Instance = new MachineApplyDbconn();
-        
-        #region 获取单个字段
-        public MachineApply Get(int Id)
-        {
-            WebCMSEntities db = new WebCMSEntities();
-            MachineApply apply = db.MachineApply.FirstOrDefault(m => m.Id == Id);
-            if (apply != null)
-            {
-            }
-            return apply;
-        }
-        #endregion
-
-
-        #region 获取列表
-        public List<int> GetList(int UserId, int pageNum = 1, int pageSize = 10)
-        {
-            // string key = "MachineApplyList:" + UserId;
-            // List<int> list = new List<int>();
-            // if (RedisDbconn.Instance.Exists(key))
-            // {
-            //     list = RedisDbconn.Instance.GetList<int>(key, pageNum, pageSize);
-            //     if (list.Count > 0)
-            //     {
-            //         return list;
-            //     }
-            // }
-            List<int> newlist = new List<int>();
-            WebCMSEntities db = new WebCMSEntities();
-            var mysqllist = db.MachineApply.Select(m => new { m.Id, m.UserId }).Where(m => m.UserId == UserId).OrderByDescending(m => m.Id).ToList();
-            if (mysqllist.Count > 0)
-            {
-                // RedisDbconn.Instance.Clear(key);
-                foreach (var sub in mysqllist)
-                {
-                    newlist.Add(sub.Id);
-                    // RedisDbconn.Instance.AddRightList(key, sub.Id);
-                }
-                // RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            db.Dispose();
-            return newlist;
-        }
-        #endregion
-    }
-}

+ 0 - 58
AppStart/Redis/Mysql/MachineForQrCodeDbconn.cs

@@ -1,58 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class MachineForQrCodeDbconn
-    {
-        public readonly static MachineForQrCodeDbconn Instance = new MachineForQrCodeDbconn();
-
-        #region 获取单个字段
-        public MachineForQrCode Get(string DataId)
-        {
-            WebCMSEntities db = new WebCMSEntities();
-            MachineForQrCode order = db.MachineForQrCode.FirstOrDefault(m => m.DataId == DataId);
-            if (order != null)
-            {
-            }
-            return order;
-        }
-        #endregion
-
-        #region 获取列表
-        public List<MachineForQrCode> GetList(int MerchantId, int pageNum = 1, int pageSize = 10)
-        {
-            string key = "MachineForQrCodeList:" + MerchantId;
-            List<MachineForQrCode> list = new List<MachineForQrCode>();
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                list = RedisDbconn.Instance.GetList<MachineForQrCode>(key, pageNum, pageSize);
-                if (list.Count > 0)
-                {
-                    return list;
-                }
-            }
-            WebCMSEntities db = new WebCMSEntities();
-            var mysqllist = db.MachineForQrCode.Where(m => m.MerchantId == MerchantId).ToList();
-            if (mysqllist.Count > 0)
-            {
-                List<MachineForQrCode> newlist = new List<MachineForQrCode>();
-                foreach (MachineForQrCode sub in mysqllist)
-                {
-                    newlist.Add(sub);
-                }
-                RedisDbconn.Instance.Clear(key);
-                foreach (MachineForQrCode sub in newlist)
-                {
-                    RedisDbconn.Instance.AddRightList(key, sub);
-                }
-                RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            db.Dispose();
-            return list;
-        }
-        #endregion
-    }
-}

+ 0 - 25
AppStart/Redis/Mysql/MerchantAddInfoDbconn.cs

@@ -1,25 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class MerchantAddInfoDbconn
-    {
-        public readonly static MerchantAddInfoDbconn Instance = new MerchantAddInfoDbconn();
-
-        #region 获取单个字段
-        public MerchantAddInfo Get(int Id)
-        {
-            WebCMSEntities db = new WebCMSEntities();
-            MerchantAddInfo order = db.MerchantAddInfo.FirstOrDefault(m => m.Id == Id);
-            if (order != null)
-            {
-            }
-            db.Dispose();
-            return order;
-        }
-        #endregion
-    }
-}

+ 0 - 115
AppStart/Redis/Mysql/MerchantAmountSummary.cs

@@ -1,115 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Library;
-using System.Linq;
-using System.Data;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class MerchantAmountSummary
-    {
-        public readonly static MerchantAmountSummary Instance = new MerchantAmountSummary();
-        public MerchantAmountSummary()
-        { }
-
-        public decimal GetTrade(int MerchantId)
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.MerchantAmountSummay.Any(m => m.MerchantId == MerchantId);
-            if (check)
-            {
-                amt = db.MerchantAmountSummay.Where(m => m.MerchantId == MerchantId).Sum(m => m.TradeAmount);
-            }
-            db.Dispose();
-            return amt;
-        }
-        public decimal GetTradeByMonth(int MerchantId, string TradeMonth)
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.MerchantAmountSummay.Any(m => m.MerchantId == MerchantId && m.TradeMonth == TradeMonth);
-            if (check)
-            {
-                amt = db.MerchantAmountSummay.Where(m => m.MerchantId == MerchantId && m.TradeMonth == TradeMonth).Sum(m => m.TradeAmount);
-            }
-            db.Dispose();
-            return amt;
-        }
-
-        public decimal GetTradeByDate(int MerchantId, string TradeDate)
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.MerchantAmountSummay.Any(m => m.MerchantId == MerchantId && m.TradeDate == TradeDate);
-            if (check)
-            {
-                amt = db.MerchantAmountSummay.Where(m => m.MerchantId == MerchantId && m.TradeDate == TradeDate).Sum(m => m.TradeAmount);
-            }
-            db.Dispose();
-            return amt;
-        }
-
-        public decimal GetTradeByMode(int MerchantId, int PayMode, string TradeDate)
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.MerchantAmountSummay.Any(m => m.MerchantId == MerchantId && m.PayMode == PayMode && m.TradeDate == TradeDate);
-            if (check)
-            {
-                amt = db.MerchantAmountSummay.Where(m => m.MerchantId == MerchantId && m.PayMode == PayMode && m.TradeDate == TradeDate).Sum(m => m.TradeAmount);
-            }
-            db.Dispose();
-            return amt;
-        }
-
-        public decimal GetActualTradeByDate(int MerchantId, string TradeDate)
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.MerchantAmountSummay.Any(m => m.MerchantId == MerchantId && m.TradeDate == TradeDate);
-            if (check)
-            {
-                amt = db.MerchantAmountSummay.Where(m => m.MerchantId == MerchantId && m.TradeDate == TradeDate).Sum(m => m.TotalActual);
-            }
-            db.Dispose();
-            return amt;
-        }
-
-        public decimal GetActualTradeByMode(int MerchantId, int PayMode, string TradeDate)
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.MerchantAmountSummay.Any(m => m.MerchantId == MerchantId && m.PayMode == PayMode && m.TradeDate == TradeDate);
-            if (check)
-            {
-                amt = db.MerchantAmountSummay.Where(m => m.MerchantId == MerchantId && m.PayMode == PayMode && m.TradeDate == TradeDate).Sum(m => m.TotalActual);
-            }
-            db.Dispose();
-            return amt;
-        }
-
-        public DataTable GetTradeListByDate(int MerchantId, string TradeMonth, int PageNum, int PageSize)
-        {
-            int skipNum = 0;
-            if (PageNum > 1)
-            {
-                skipNum = PageSize * (PageNum - 1);
-            }
-            DataTable dt = CustomerSqlConn.dtable("select TradeDate,sum(if(PayMode=1, TotalActual, 0)),sum(if(PayMode=2, TotalActual, 0)),sum(TotalActual),sum(TradeCount),sum(TradeAmount) from MerchantAmountSummay where MerchantId=" + MerchantId + " and TradeMonth='" + TradeMonth + "' group by TradeDate order by TradeDate desc limit " + skipNum + "," + PageSize, AppConfig.Base.SqlConnStr);
-            return dt;
-        }
-
-        public DataTable GetTradeListByMonth(int MerchantId, int PageNum, int PageSize)
-        {
-            int skipNum = 0;
-            if (PageNum > 1)
-            {
-                skipNum = PageSize * (PageNum - 1);
-            }
-            DataTable dt = CustomerSqlConn.dtable("select TradeMonth,sum(if(PayMode=1, TotalActual, 0)),sum(if(PayMode=2, TotalActual, 0)),sum(TotalActual),sum(TradeCount),sum(TradeAmount) from MerchantAmountSummay where MerchantId=" + MerchantId + " group by TradeMonth order by TradeMonth desc limit " + skipNum + "," + PageSize, AppConfig.Base.SqlConnStr);
-            return dt;
-        }
-    }
-}

+ 0 - 90
AppStart/Redis/Mysql/MerchantInfoDbconn.cs

@@ -1,90 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class MerchantInfoDbconn
-    {
-        public readonly static MerchantInfoDbconn Instance = new MerchantInfoDbconn();
-
-        #region 获取单个字段
-        public MerchantInfo Get(int Id)
-        {
-            WebCMSEntities db = new WebCMSEntities();
-            MerchantInfo order = db.MerchantInfo.FirstOrDefault(m => m.Id == Id);
-            if (order != null)
-            {
-            }
-            db.Dispose();
-            return order;
-        }
-        #endregion
-
-        #region 获取列表
-        public List<int> GetList(int UserId, int pageNum = 1, int pageSize = 10)
-        {
-            string key = "MerchantInfoList:" + UserId;
-            List<int> list = new List<int>();
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                list = RedisDbconn.Instance.GetList<int>(key, pageNum, pageSize);
-                if (list.Count > 0)
-                {
-                    return list;
-                }
-            }
-            WebCMSEntities db = new WebCMSEntities();
-            var mysqllist = db.MerchantInfo.Select(m => new { m.Id, m.UserId, m.QueryCount }).Where(m => m.UserId == UserId && m.QueryCount == 1).OrderByDescending(m => m.Id).ToList();
-            if (mysqllist.Count > 0)
-            {
-                List<int> newlist = new List<int>();
-                foreach (var sub in mysqllist)
-                {
-                    newlist.Add(sub.Id);
-                }
-                RedisDbconn.Instance.Clear(key);
-                foreach (int sub in newlist)
-                {
-                    RedisDbconn.Instance.AddRightList(key, sub);
-                }
-                RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            db.Dispose();
-            return list;
-        }
-        public List<MerchantInfo> GetTmpList(int UserId, int pageNum = 1, int pageSize = 10)
-        {
-            string key = "TmpMerchantInfo:" + UserId;
-            List<MerchantInfo> list = new List<MerchantInfo>();
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                list = RedisDbconn.Instance.GetList<MerchantInfo>(key, pageNum, pageSize);
-                if (list.Count > 0)
-                {
-                    return list;
-                }
-            }
-            WebCMSEntities db = new WebCMSEntities();
-            var mysqllist = db.MerchantInfo.Where(m => m.UserId == UserId && m.QueryCount == 1).OrderByDescending(m => m.Id).ToList();
-            if (mysqllist.Count > 0)
-            {
-                List<MerchantInfo> newlist = new List<MerchantInfo>();
-                foreach (var sub in mysqllist)
-                {
-                    newlist.Add(sub);
-                }
-                RedisDbconn.Instance.Clear(key);
-                foreach (MerchantInfo sub in newlist)
-                {
-                    RedisDbconn.Instance.AddRightList(key, sub);
-                }
-                RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            db.Dispose();
-            return list;
-        }
-        #endregion
-    }
-}

+ 0 - 24
AppStart/Redis/Mysql/MerchantParamSetDbconn.cs

@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class MerchantParamSetDbconn
-    {
-        public readonly static MerchantParamSetDbconn Instance = new MerchantParamSetDbconn();
-
-        #region 获取单个字段
-        public MerchantParamSet Get(int Id)
-        {
-            WebCMSEntities db = new WebCMSEntities();
-            MerchantParamSet order = db.MerchantParamSet.FirstOrDefault(m => m.Id == Id);
-            if (order != null)
-            {
-            }
-            return order;
-        }
-        #endregion
-    }
-}

+ 0 - 89
AppStart/Redis/Mysql/MerchantQrCodeDbconn.cs

@@ -1,89 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class MerchantQrCodeDbconn
-    {
-        public readonly static MerchantQrCodeDbconn Instance = new MerchantQrCodeDbconn();
-
-        #region 获取单个字段
-        public MerchantQrCode Get(int Id)
-        {
-            string key = "MerchantQrCode:" + Id;
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                MerchantQrCode obj = RedisDbconn.Instance.Get<MerchantQrCode>(key);
-                if (obj != null)
-                {
-                    return obj;
-                }
-            }
-            WebCMSEntities db = new WebCMSEntities();
-            MerchantQrCode order = db.MerchantQrCode.FirstOrDefault(m => m.Id == Id);
-            if (order != null)
-            {
-                RedisDbconn.Instance.Set(key, order);
-                RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            return order;
-        }
-        public MerchantQrCode Get(string SnNo)
-        {
-            string key = "MerchantQrCode:" + SnNo;
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                MerchantQrCode obj = RedisDbconn.Instance.Get<MerchantQrCode>(key);
-                if (obj != null)
-                {
-                    return obj;
-                }
-            }
-            WebCMSEntities db = new WebCMSEntities();
-            MerchantQrCode order = db.MerchantQrCode.FirstOrDefault(m => m.SnNo == SnNo);
-            if (order != null)
-            {
-                RedisDbconn.Instance.Set(key, order);
-                RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            return order;
-        }
-        #endregion
-
-        #region 获取列表
-        public List<MerchantQrCode> GetList(int MerchantId, int pageNum = 1, int pageSize = 10)
-        {
-            string key = "MerchantQrCodeList:" + MerchantId;
-            List<MerchantQrCode> list = new List<MerchantQrCode>();
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                list = RedisDbconn.Instance.GetList<MerchantQrCode>(key, pageNum, pageSize);
-                if (list.Count > 0)
-                {
-                    return list;
-                }
-            }
-            WebCMSEntities db = new WebCMSEntities();
-            var mysqllist = db.MerchantQrCode.Where(m => m.MerchantId == MerchantId).ToList();
-            if (mysqllist.Count > 0)
-            {
-                List<MerchantQrCode> newlist = new List<MerchantQrCode>();
-                foreach (MerchantQrCode sub in mysqllist)
-                {
-                    newlist.Add(sub);
-                }
-                RedisDbconn.Instance.Clear(key);
-                foreach (MerchantQrCode sub in newlist)
-                {
-                    RedisDbconn.Instance.AddRightList(key, sub);
-                }
-                RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            db.Dispose();
-            return list;
-        }
-        #endregion
-    }
-}

+ 0 - 163
AppStart/Redis/Mysql/MerchantTradeStat.cs

@@ -1,163 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Library;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class MerchantTradeStat
-    {
-        public readonly static MerchantTradeStat Instance = new MerchantTradeStat();
-        public MerchantTradeStat()
-        { }
-
-
-        public decimal Amount(int MerchantId, string DateOrMonth)
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            if(DateOrMonth.Length == 8)
-            {
-                bool check = db.MerchantAmountSummay.Any(m => m.MerchantId == MerchantId && m.TradeDate == DateOrMonth);
-                if (check)
-                {
-                    amt = db.MerchantAmountSummay.Where(m => m.MerchantId == MerchantId && m.TradeDate == DateOrMonth).Sum(m => m.TradeAmount);
-                }
-            }
-            else
-            {
-                bool check = db.MerchantAmountSummay.Any(m => m.MerchantId == MerchantId && m.TradeMonth == DateOrMonth);
-                if (check)
-                {
-                    amt = db.MerchantAmountSummay.Where(m => m.MerchantId == MerchantId && m.TradeMonth == DateOrMonth).Sum(m => m.TradeAmount);
-                }
-            }
-            db.Dispose();
-            return amt;
-        }
-
-        public int Count(int MerchantId, string DateOrMonth)
-        {
-            int amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            if(DateOrMonth.Length == 8)
-            {
-                bool check = db.MerchantAmountSummay.Any(m => m.MerchantId == MerchantId && m.TradeDate == DateOrMonth);
-                if (check)
-                {
-                    amt = db.MerchantAmountSummay.Where(m => m.MerchantId == MerchantId && m.TradeDate == DateOrMonth).Sum(m => m.TradeCount);
-                }
-            }
-            else
-            {
-                bool check = db.MerchantAmountSummay.Any(m => m.MerchantId == MerchantId && m.TradeMonth == DateOrMonth);
-                if (check)
-                {
-                    amt = db.MerchantAmountSummay.Where(m => m.MerchantId == MerchantId && m.TradeMonth == DateOrMonth).Sum(m => m.TradeCount);
-                }
-            }
-            db.Dispose();
-            return amt;
-        }
-
-
-        public decimal Amount(int MerchantId, string DateOrMonth, int PayMode)
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            if(DateOrMonth.Length == 8)
-            {
-                bool check = db.MerchantAmountSummay.Any(m => m.MerchantId == MerchantId && m.PayMode == PayMode && m.TradeDate == DateOrMonth);
-                if (check)
-                {
-                    amt = db.MerchantAmountSummay.Where(m => m.MerchantId == MerchantId && m.PayMode == PayMode && m.TradeDate == DateOrMonth).Sum(m => m.TradeAmount);
-                }
-            }
-            else
-            {
-                bool check = db.MerchantAmountSummay.Any(m => m.MerchantId == MerchantId && m.PayMode == PayMode && m.TradeMonth == DateOrMonth);
-                if (check)
-                {
-                    amt = db.MerchantAmountSummay.Where(m => m.MerchantId == MerchantId && m.PayMode == PayMode && m.TradeMonth == DateOrMonth).Sum(m => m.TradeAmount);
-                }
-            }
-            db.Dispose();
-            return amt;
-        }
-
-        public int Count(int MerchantId, string DateOrMonth, int PayMode)
-        {
-            int amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            if(DateOrMonth.Length == 8)
-            {
-                bool check = db.MerchantAmountSummay.Any(m => m.MerchantId == MerchantId && m.PayMode == PayMode && m.TradeDate == DateOrMonth);
-                if (check)
-                {
-                    amt = db.MerchantAmountSummay.Where(m => m.MerchantId == MerchantId && m.PayMode == PayMode && m.TradeDate == DateOrMonth).Sum(m => m.TradeCount);
-                }
-            }
-            else
-            {
-                bool check = db.MerchantAmountSummay.Any(m => m.MerchantId == MerchantId && m.PayMode == PayMode && m.TradeMonth == DateOrMonth);
-                if (check)
-                {
-                    amt = db.MerchantAmountSummay.Where(m => m.MerchantId == MerchantId && m.PayMode == PayMode && m.TradeMonth == DateOrMonth).Sum(m => m.TradeCount);
-                }
-            }
-            db.Dispose();
-            return amt;
-        }
-
-
-        public decimal Amount(int MerchantId, string DateOrMonth, int PayMode, int IsAct)
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            if(DateOrMonth.Length == 8)
-            {
-                bool check = db.MerchantAmountSummay.Any(m => m.MerchantId == MerchantId && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeDate == DateOrMonth);
-                if (check)
-                {
-                    amt = db.MerchantAmountSummay.Where(m => m.MerchantId == MerchantId && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeDate == DateOrMonth).Sum(m => m.TradeAmount);
-                }
-            }
-            else
-            {
-                bool check = db.MerchantAmountSummay.Any(m => m.MerchantId == MerchantId && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeMonth == DateOrMonth);
-                if (check)
-                {
-                    amt = db.MerchantAmountSummay.Where(m => m.MerchantId == MerchantId && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeMonth == DateOrMonth).Sum(m => m.TradeAmount);
-                }
-            }
-            db.Dispose();
-            return amt;
-        }
-
-        public int Count(int MerchantId, string DateOrMonth, int PayMode, int IsAct)
-        {
-            int amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            if(DateOrMonth.Length == 8)
-            {
-                bool check = db.MerchantAmountSummay.Any(m => m.MerchantId == MerchantId && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeDate == DateOrMonth);
-                if (check)
-                {
-                    amt = db.MerchantAmountSummay.Where(m => m.MerchantId == MerchantId && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeDate == DateOrMonth).Sum(m => m.TradeCount);
-                }
-            }
-            else
-            {
-                bool check = db.MerchantAmountSummay.Any(m => m.MerchantId == MerchantId && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeMonth == DateOrMonth);
-                if (check)
-                {
-                    amt = db.MerchantAmountSummay.Where(m => m.MerchantId == MerchantId && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeMonth == DateOrMonth).Sum(m => m.TradeCount);
-                }
-            }
-            db.Dispose();
-            return amt;
-        }
-
-    }
-}

+ 0 - 70
AppStart/Redis/Mysql/OpenRewardDetailDbconn.cs

@@ -1,70 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class OpenRewardDetailDbconn
-    {
-        public readonly static OpenRewardDetailDbconn Instance = new OpenRewardDetailDbconn();
-
-        #region 获取单个字段
-        public OpenRewardDetail Get(int Id)
-        {
-            string key = "OpenRewardDetail:" + Id;
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                OpenRewardDetail obj = RedisDbconn.Instance.Get<OpenRewardDetail>(key);
-                if (obj != null)
-                {
-                    return obj;
-                }
-            }
-            WebCMSEntities db = new WebCMSEntities();
-            OpenRewardDetail orderPro = db.OpenRewardDetail.FirstOrDefault(m => m.Id == Id);
-            if (orderPro != null)
-            {
-                RedisDbconn.Instance.Set(key, orderPro);
-                RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            return orderPro;
-        }
-        #endregion
-
-
-        #region 获取列表
-        public List<int> GetList(int UserId, int pageNum = 1, int pageSize = 10)
-        {
-            string key = "OpenRewardDetail:" + UserId;
-            List<int> list = new List<int>();
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                list = RedisDbconn.Instance.GetList<int>(key, pageNum, pageSize);
-                if (list.Count > 0)
-                {
-                    return list;
-                }
-            }
-            WebCMSEntities db = new WebCMSEntities();
-            var mysqllist = db.OpenRewardDetail.Select(m => new { m.Id, m.UserId }).Where(m => m.UserId == UserId).OrderByDescending(m => m.Id).ToList();
-            if (mysqllist.Count > 0)
-            {
-                List<int> newlist = new List<int>();
-                foreach (var sub in mysqllist)
-                {
-                    newlist.Add(sub.Id);
-                }
-                RedisDbconn.Instance.Clear(key);
-                foreach (int sub in newlist)
-                {
-                    RedisDbconn.Instance.AddRightList(key, sub);
-                }
-                RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            db.Dispose();
-            return list;
-        }
-        #endregion
-    }
-}

+ 0 - 25
AppStart/Redis/Mysql/OrderForNoDbconn.cs

@@ -1,25 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class OrderForNoDbconn
-    {
-        public readonly static OrderForNoDbconn Instance = new OrderForNoDbconn();
-
-        #region 获取单个字段
-        public OrderForNo Get(string OrderNo)
-        {
-            WebCMSEntities db = new WebCMSEntities();
-            OrderForNo order = db.OrderForNo.FirstOrDefault(m => m.OrderNo == OrderNo);
-            if (order != null)
-            {
-            }
-            db.Dispose();
-            return order;
-        }
-        #endregion
-    }
-}

+ 0 - 62
AppStart/Redis/Mysql/OrderProductDbconn.cs

@@ -1,62 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class OrderProductDbconn
-    {
-        public readonly static OrderProductDbconn Instance = new OrderProductDbconn();
-
-        #region 获取单个字段
-        public OrderProduct Get(int Id)
-        {
-            WebCMSEntities db = new WebCMSEntities();
-            OrderProduct orderPro = db.OrderProduct.FirstOrDefault(m => m.Id == Id);
-            if (orderPro != null)
-            {
-            }
-            db.Dispose();
-            return orderPro;
-        }
-        #endregion
-
-
-        #region 获取列表
-        public List<int> GetList(int OrderId, int pageNum = 1, int pageSize = 10)
-        {
-            string key = "OrderProductList:" + OrderId;
-            List<int> list = new List<int>();
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                list = RedisDbconn.Instance.GetList<int>(key, pageNum, pageSize);
-                if (list.Count > 0)
-                {
-                    return list;
-                }
-            }
-            List<int> newlist = new List<int>();
-            RedisDbconn.Instance.GetLock(key + ":lock");
-            WebCMSEntities db = new WebCMSEntities();
-            var mysqllist = db.OrderProduct.Select(m => new { m.Id, m.OrderId }).Where(m => m.OrderId == OrderId).OrderByDescending(m => m.Id).ToList();
-            if (mysqllist.Count > 0)
-            {
-                foreach (var sub in mysqllist)
-                {
-                    newlist.Add(sub.Id);
-                }
-                RedisDbconn.Instance.Clear(key);
-                foreach (int sub in newlist)
-                {
-                    RedisDbconn.Instance.AddRightList(key, sub);
-                }
-                RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            db.Dispose();
-            RedisDbconn.Instance.ReleaseLock(key + ":lock");
-            return newlist;
-        }
-        #endregion
-    }
-}

+ 0 - 25
AppStart/Redis/Mysql/OrdersDbconn.cs

@@ -1,25 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class OrdersDbconn
-    {
-        public readonly static OrdersDbconn Instance = new OrdersDbconn();
-
-        #region 获取单个字段
-        public Orders Get(int Id)
-        {
-            WebCMSEntities db = new WebCMSEntities();
-            Orders order = db.Orders.FirstOrDefault(m => m.Id == Id);
-            if (order != null)
-            {
-            }
-            db.Dispose();
-            return order;
-        }
-        #endregion
-    }
-}

+ 0 - 90
AppStart/Redis/Mysql/PosMachinesDbconn.cs

@@ -1,90 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class PosMachinesDbconn
-    {
-        public readonly static PosMachinesDbconn Instance = new PosMachinesDbconn();
-
-        #region 获取单个字段
-        public PosMachines Get(int Id)
-        {
-            // string key = "PosMachines:" + Id;
-            // if (RedisDbconn.Instance.Exists(key))
-            // {
-            //     PosMachines obj = RedisDbconn.Instance.Get<PosMachines>(key);
-            //     if (obj != null)
-            //     {
-            //         return obj;
-            //     }
-            // }
-            WebCMSEntities db = new WebCMSEntities();
-            PosMachines order = db.PosMachines.FirstOrDefault(m => m.Id == Id);
-            if (order != null)
-            {
-                // RedisDbconn.Instance.Set(key, order);
-                // RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            db.Dispose();
-            return order;
-        }
-        public PosMachines Get(string PosSn)
-        {
-            string key = "PosMachines:" + PosSn;
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                PosMachines obj = RedisDbconn.Instance.Get<PosMachines>(key);
-                if (obj != null)
-                {
-                    return obj;
-                }
-            }
-            WebCMSEntities db = new WebCMSEntities();
-            PosMachines order = db.PosMachines.FirstOrDefault(m => m.PosSn == PosSn);
-            if (order != null)
-            {
-                RedisDbconn.Instance.Set(key, order);
-                RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            return order;
-        }
-        #endregion
-
-        #region 获取列表
-        public List<int> GetList(int MerchantId, int pageNum = 1, int pageSize = 10)
-        {
-            // string key = "PosMachineList:" + MerchantId;
-            // List<int> list = new List<int>();
-            // if (RedisDbconn.Instance.Exists(key))
-            // {
-            //     list = RedisDbconn.Instance.GetList<int>(key, pageNum, pageSize);
-            //     if (list.Count > 0)
-            //     {
-            //         return list;
-            //     }
-            // }
-            List<int> newlist = new List<int>();
-            WebCMSEntities db = new WebCMSEntities();
-            var mysqllist = db.PosMachines.Select(m => new { m.Id, m.BindMerchantId, m.DeviceKind }).Where(m => m.BindMerchantId == MerchantId && m.DeviceKind == "1").OrderByDescending(m => m.Id).ToList();
-            if (mysqllist.Count > 0)
-            {
-                foreach (var sub in mysqllist)
-                {
-                    newlist.Add(sub.Id);
-                }
-                // RedisDbconn.Instance.Clear(key);
-                // foreach (int sub in newlist)
-                // {
-                //     RedisDbconn.Instance.AddRightList(key, sub);
-                // }
-                // RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(30, 60));
-            }
-            db.Dispose();
-            return newlist;
-        }
-        #endregion
-    }
-}

+ 0 - 37
AppStart/Redis/Mysql/PosMachinesTwoDbconn.cs

@@ -1,37 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class PosMachinesTwoDbconn
-    {
-        public readonly static PosMachinesTwoDbconn Instance = new PosMachinesTwoDbconn();
-
-        #region 获取单个字段
-        public PosMachinesTwo Get(int Id)
-        {
-            WebCMSEntities db = new WebCMSEntities();
-            PosMachinesTwo order = db.PosMachinesTwo.FirstOrDefault(m => m.Id == Id);
-            if (order != null)
-            {
-                // RedisDbconn.Instance.Set(key, order);
-                // RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            db.Dispose();
-            return order;
-        }
-        public PosMachinesTwo Get(string PosSn)
-        {
-            WebCMSEntities db = new WebCMSEntities();
-            PosMachinesTwo order = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == PosSn);
-            if (order != null)
-            {
-            }
-            return order;
-        }
-        
-        #endregion
-    }
-}

+ 0 - 106
AppStart/Redis/Mysql/PosMerchantInfoDbconn.cs

@@ -1,106 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class PosMerchantInfoDbconn
-    {
-        public readonly static PosMerchantInfoDbconn Instance = new PosMerchantInfoDbconn();
-
-        #region 获取单个字段
-        public PosMerchantInfo Get(int Id)
-        {
-            WebCMSEntities db = new WebCMSEntities();
-            PosMerchantInfo order = db.PosMerchantInfo.FirstOrDefault(m => m.Id == Id);
-            if (order != null)
-            {
-            }
-            db.Dispose();
-            return order;
-        }
-        #endregion
-
-        #region 获取列表
-        public List<PosMerchantInfo> GetList(int UserId, int pageNum = 1, int pageSize = 10)
-        {
-            string key = "PosMerchantInfoList:" + UserId;
-            List<PosMerchantInfo> list = new List<PosMerchantInfo>();
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                list = RedisDbconn.Instance.GetList<PosMerchantInfo>(key, pageNum, pageSize);
-                if (list.Count > 0)
-                {
-                    return list;
-                }
-            }
-            RedisDbconn.Instance.GetLock(key + ":lock");
-            WebCMSEntities db = new WebCMSEntities();
-            List<PosMerchantInfo> newlist = new List<PosMerchantInfo>();
-            var mysqllist = db.PosMachinesTwo.Select(m => new { m.BuyUserId, m.UserId, m.BindingState, m.Id, m.BindMerchantId, m.Status }).Where(m => m.Status > -1 && m.BuyUserId == UserId && m.BindingState == 1).OrderByDescending(m => m.Id).ToList();
-            if (mysqllist.Count > 0)
-            {
-                foreach (var sub in mysqllist)
-                {
-                    PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == sub.BindMerchantId) ?? new PosMerchantInfo();
-                    newlist.Add(merchant);
-                }
-                RedisDbconn.Instance.Clear(key);
-                foreach (PosMerchantInfo sub in newlist)
-                {
-                    RedisDbconn.Instance.AddRightList(key, sub);
-                }
-                RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(300, 600));
-            }
-            db.Dispose();
-            RedisDbconn.Instance.ReleaseLock(key + ":lock");
-            return newlist;
-        }
-        #endregion
-
-
-        #region 获取列表子账号
-        public List<PosMerchantInfo> GetChildList(int PartnerId, int UserId, int pageNum = 1, int pageSize = 10)
-        {
-            string key = "PosMerchantInfoList:" + PartnerId;
-            List<PosMerchantInfo> list = new List<PosMerchantInfo>();
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                list = RedisDbconn.Instance.GetList<PosMerchantInfo>(key, pageNum, pageSize);
-                if (list.Count > 0)
-                {
-                    return list;
-                }
-            }
-            RedisDbconn.Instance.GetLock(key + ":lock");
-            WebCMSEntities db = new WebCMSEntities();
-            List<int> posId = new List<int>();
-            var Id = db.BusinessPartnerPos.Where(m => m.Id == PartnerId).ToList();
-            foreach (var item in Id)
-            {
-                posId.Add(item.PosId);
-            }
-            List<PosMerchantInfo> newlist = new List<PosMerchantInfo>();
-            var mysqllist = db.PosMachinesTwo.Select(m => new { m.BuyUserId, m.UserId, m.BindingState, m.Id, m.BindMerchantId, m.Status }).Where(m => m.Status > -1 && m.BuyUserId == UserId && m.BindingState == 1 && posId.Contains(m.Id)).OrderByDescending(m => m.Id).ToList();
-            if (mysqllist.Count > 0)
-            {
-                foreach (var sub in mysqllist)
-                {
-                    PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == sub.BindMerchantId) ?? new PosMerchantInfo();
-                    newlist.Add(merchant);
-                }
-                RedisDbconn.Instance.Clear(key);
-                foreach (PosMerchantInfo sub in newlist)
-                {
-                    RedisDbconn.Instance.AddRightList(key, sub);
-                }
-                RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(300, 600));
-            }
-            db.Dispose();
-            RedisDbconn.Instance.ReleaseLock(key + ":lock");
-            return newlist;
-        }
-        #endregion
-    }
-}

+ 0 - 78
AppStart/Redis/Mysql/PosMerchantTradeSummaryDbconn.cs

@@ -1,78 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Library;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class PosMerchantTradeSummaryDbconn
-    {
-        public readonly static PosMerchantTradeSummaryDbconn Instance = new PosMerchantTradeSummaryDbconn();
-        public PosMerchantTradeSummaryDbconn()
-        { }
-
-        // TODO:读取很慢,感觉redis没生效
-
-        #region 获取单个字段
-        
-        public decimal GetTrade(int MerchantId)
-        {
-            string key = "PosMerchantAmount:" + MerchantId; //总交易
-            string obj = RedisDbconn.Instance.Get<string>(key);
-            if (!string.IsNullOrEmpty(obj))
-            {
-                return decimal.Parse(function.CheckNum(obj));
-            }
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.PosMerchantTradeSummay.Any(m => m.MerchantId == MerchantId);
-            if (check)
-            {
-                amt = db.PosMerchantTradeSummay.Where(m => m.MerchantId == MerchantId).Sum(m => m.TradeAmount);
-            }
-            RedisDbconn.Instance.Set(key, amt.ToString());
-            RedisDbconn.Instance.SetExpire(key, function.get_Random(3600, 7200));
-            db.Dispose();
-            return amt;
-        }
-        public decimal GetDateTimeTrade(int MerchantId, string TradeDate)
-        {
-            if (DateTime.Now.Day == 1 && TradeDate.Length == 6)
-            {
-                TradeDate = DateTime.Now.AddMonths(-1).ToString("yyyyMM");
-            }
-            string key = "PosMerchantAmount:" + MerchantId + ":" + TradeDate; //总交易
-            string obj = RedisDbconn.Instance.Get<string>(key);
-            if (!string.IsNullOrEmpty(obj))
-            {
-                return decimal.Parse(function.CheckNum(obj));
-            }
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            if (TradeDate.Length == 8)
-            {
-                bool check = db.PosMerchantTradeSummay.Any(m => m.MerchantId == MerchantId && m.TradeDate == TradeDate);
-                if (check)
-                {
-                    amt = db.PosMerchantTradeSummay.Where(m => m.MerchantId == MerchantId && m.TradeDate == TradeDate).Sum(m => m.TradeAmount);
-                }
-                RedisDbconn.Instance.Set(key, amt.ToString());
-            }
-            else
-            { 
-                bool check = db.PosMerchantTradeSummay.Any(m => m.MerchantId == MerchantId && m.TradeMonth == TradeDate);
-                if (check)
-                {
-                    amt = db.PosMerchantTradeSummay.Where(m => m.MerchantId == MerchantId && m.TradeMonth == TradeDate).Sum(m => m.TradeAmount);
-                }
-                RedisDbconn.Instance.Set(key, amt.ToString());
-            }
-            RedisDbconn.Instance.SetExpire(key, function.get_Random(3600, 7200));
-            db.Dispose();
-            return amt;
-        }
-        #endregion
-
-    }
-}

+ 0 - 70
AppStart/Redis/Mysql/ProductNormDbconn.cs

@@ -1,70 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class ProductNormDbconn
-    {
-        public readonly static ProductNormDbconn Instance = new ProductNormDbconn();
-
-        #region 获取单个字段
-        public ProductNorm Get(int Id)
-        {
-            string key = "ProductNorm:" + Id;
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                ProductNorm obj = RedisDbconn.Instance.Get<ProductNorm>(key);
-                if (obj != null)
-                {
-                    return obj;
-                }
-            }
-            WebCMSEntities db = new WebCMSEntities();
-            ProductNorm orderPro = db.ProductNorm.FirstOrDefault(m => m.Id == Id);
-            if (orderPro != null)
-            {
-                RedisDbconn.Instance.Set(key, orderPro);
-                RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            return orderPro;
-        }
-        #endregion
-
-
-        #region 获取列表
-        public List<int> GetList(int ProductId = 1, int pageNum = 1, int pageSize = 10)
-        {
-            string key = "ProductNorms:" + ProductId;
-            List<int> list = new List<int>();
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                list = RedisDbconn.Instance.GetList<int>(key, pageNum, pageSize);
-                if (list.Count > 0)
-                {
-                    return list;
-                }
-            }
-            List<int> newlist = new List<int>();
-            WebCMSEntities db = new WebCMSEntities();
-            var mysqllist = db.ProductNorm.Select(m => new { m.Id, m.ProductId }).Where(m=>m.ProductId == ProductId).OrderByDescending(m => m.Id).ToList();
-            if (mysqllist.Count > 0)
-            {
-                foreach (var sub in mysqllist)
-                {
-                    newlist.Add(sub.Id);
-                }
-                RedisDbconn.Instance.Clear(key);
-                foreach (int sub in newlist)
-                {
-                    RedisDbconn.Instance.AddRightList(key, sub);
-                }
-                RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            db.Dispose();
-            return newlist;
-        }
-        #endregion
-    }
-}

+ 0 - 70
AppStart/Redis/Mysql/ProductNormItemDbconn.cs

@@ -1,70 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class ProductNormItemDbconn
-    {
-        public readonly static ProductNormItemDbconn Instance = new ProductNormItemDbconn();
-
-        #region 获取单个字段
-        public ProductNormItem Get(int Id)
-        {
-            string key = "ProductNormItem:" + Id;
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                ProductNormItem obj = RedisDbconn.Instance.Get<ProductNormItem>(key);
-                if (obj != null)
-                {
-                    return obj;
-                }
-            }
-            WebCMSEntities db = new WebCMSEntities();
-            ProductNormItem orderPro = db.ProductNormItem.FirstOrDefault(m => m.Id == Id);
-            if (orderPro != null)
-            {
-                RedisDbconn.Instance.Set(key, orderPro);
-                RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            return orderPro;
-        }
-        #endregion
-
-
-        #region 获取列表
-        public List<ProductNormItem> GetList(int ProductId = 1, int pageNum = 1, int pageSize = 10)
-        {
-            string key = "ProductNormItem:" + ProductId;
-            List<ProductNormItem> list = new List<ProductNormItem>();
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                list = RedisDbconn.Instance.GetList<ProductNormItem>(key, pageNum, pageSize);
-                if (list.Count > 0)
-                {
-                    return list;
-                }
-            }
-            List<ProductNormItem> newlist = new List<ProductNormItem>();
-            WebCMSEntities db = new WebCMSEntities();
-            var mysqllist = db.ProductNormItem.Where(m=>m.ProductId == ProductId).OrderByDescending(m => m.Id).ToList();
-            if (mysqllist.Count > 0)
-            {
-                foreach (var sub in mysqllist)
-                {
-                    newlist.Add(sub);
-                }
-                RedisDbconn.Instance.Clear(key);
-                foreach (ProductNormItem sub in newlist)
-                {
-                    RedisDbconn.Instance.AddRightList(key, sub);
-                }
-                RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            db.Dispose();
-            return newlist;
-        }
-        #endregion
-    }
-}

+ 0 - 72
AppStart/Redis/Mysql/ProductsDbconn.cs

@@ -1,72 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class ProductsDbconn
-    {
-        public readonly static ProductsDbconn Instance = new ProductsDbconn();
-
-        #region 获取单个字段
-        public Products Get(int Id)
-        {
-            // string key = "Products:" + Id;
-            // if (RedisDbconn.Instance.Exists(key))
-            // {
-            //     Products obj = RedisDbconn.Instance.Get<Products>(key);
-            //     if (obj != null)
-            //     {
-            //         return obj;
-            //     }
-            // }
-            WebCMSEntities db = new WebCMSEntities();
-            Products orderPro = db.Products.FirstOrDefault(m => m.Id == Id);
-            if (orderPro != null)
-            {
-                // RedisDbconn.Instance.Set(key, orderPro);
-                // RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            return orderPro;
-        }
-        #endregion
-
-
-        #region 获取列表
-        public List<int> GetList(int pageNum = 1, int pageSize = 10)
-        {
-            string key = "ProductsList";
-            List<int> list = new List<int>();
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                list = RedisDbconn.Instance.GetList<int>(key, pageNum, pageSize);
-                if (list.Count > 0)
-                {
-                    return list;
-                }
-            }
-            List<int> newlist = new List<int>();
-            RedisDbconn.Instance.GetLock(key + ":lock");
-            WebCMSEntities db = new WebCMSEntities();
-            var mysqllist = db.Products.Select(m => new { m.Id, m.Status, m.Sort }).Where(m => m.Status == 1).OrderByDescending(m => m.Sort).ThenByDescending(m => m.Id).ToList();
-            if (mysqllist.Count > 0)
-            {
-                foreach (var sub in mysqllist)
-                {
-                    newlist.Add(sub.Id);
-                }
-                RedisDbconn.Instance.Clear(key);
-                foreach (int sub in newlist)
-                {
-                    RedisDbconn.Instance.AddRightList(key, sub);
-                }
-                RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            db.Dispose();
-            RedisDbconn.Instance.ReleaseLock(key + ":lock");
-            return newlist;
-        }
-        #endregion
-    }
-}

+ 0 - 176
AppStart/Redis/Mysql/QrCodeTradeStat.cs

@@ -1,176 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Library;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class QrCodeTradeStat
-    {
-        public readonly static QrCodeTradeStat Instance = new QrCodeTradeStat();
-        public QrCodeTradeStat()
-        { }
-
-
-        public decimal Amount(string SnNo)
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.QrCodeAmountSummay.Any(m => m.SnNo == SnNo);
-            if (check)
-            {
-                amt = db.QrCodeAmountSummay.Where(m => m.SnNo == SnNo).Sum(m => m.TradeAmount);
-            }
-            db.Dispose();
-            return amt;
-        }
-
-        public decimal Amount(string SnNo, string DateOrMonth)
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            if(DateOrMonth.Length == 8)
-            {
-                bool check = db.QrCodeAmountSummay.Any(m => m.SnNo == SnNo && m.TradeDate == DateOrMonth);
-                if (check)
-                {
-                    amt = db.QrCodeAmountSummay.Where(m => m.SnNo == SnNo && m.TradeDate == DateOrMonth).Sum(m => m.TradeAmount);
-                }
-            }
-            else
-            {
-                bool check = db.QrCodeAmountSummay.Any(m => m.SnNo == SnNo && m.TradeMonth == DateOrMonth);
-                if (check)
-                {
-                    amt = db.QrCodeAmountSummay.Where(m => m.SnNo == SnNo && m.TradeMonth == DateOrMonth).Sum(m => m.TradeAmount);
-                }
-            }
-            db.Dispose();
-            return amt;
-        }
-
-        public int Count(string SnNo, string DateOrMonth)
-        {
-            int amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            if(DateOrMonth.Length == 8)
-            {
-                bool check = db.QrCodeAmountSummay.Any(m => m.SnNo == SnNo && m.TradeDate == DateOrMonth);
-                if (check)
-                {
-                    amt = db.QrCodeAmountSummay.Where(m => m.SnNo == SnNo && m.TradeDate == DateOrMonth).Sum(m => m.TradeCount);
-                }
-            }
-            else
-            {
-                bool check = db.QrCodeAmountSummay.Any(m => m.SnNo == SnNo && m.TradeMonth == DateOrMonth);
-                if (check)
-                {
-                    amt = db.QrCodeAmountSummay.Where(m => m.SnNo == SnNo && m.TradeMonth == DateOrMonth).Sum(m => m.TradeCount);
-                }
-            }
-            db.Dispose();
-            return amt;
-        }
-
-
-        public decimal Amount(string SnNo, string DateOrMonth, int PayMode)
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            if(DateOrMonth.Length == 8)
-            {
-                bool check = db.QrCodeAmountSummay.Any(m => m.SnNo == SnNo && m.PayMode == PayMode && m.TradeDate == DateOrMonth);
-                if (check)
-                {
-                    amt = db.QrCodeAmountSummay.Where(m => m.SnNo == SnNo && m.PayMode == PayMode && m.TradeDate == DateOrMonth).Sum(m => m.TradeAmount);
-                }
-            }
-            else
-            {
-                bool check = db.QrCodeAmountSummay.Any(m => m.SnNo == SnNo && m.PayMode == PayMode && m.TradeMonth == DateOrMonth);
-                if (check)
-                {
-                    amt = db.QrCodeAmountSummay.Where(m => m.SnNo == SnNo && m.PayMode == PayMode && m.TradeMonth == DateOrMonth).Sum(m => m.TradeAmount);
-                }
-            }
-            db.Dispose();
-            return amt;
-        }
-
-        public int Count(string SnNo, string DateOrMonth, int PayMode)
-        {
-            int amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            if(DateOrMonth.Length == 8)
-            {
-                bool check = db.QrCodeAmountSummay.Any(m => m.SnNo == SnNo && m.PayMode == PayMode && m.TradeDate == DateOrMonth);
-                if (check)
-                {
-                    amt = db.QrCodeAmountSummay.Where(m => m.SnNo == SnNo && m.PayMode == PayMode && m.TradeDate == DateOrMonth).Sum(m => m.TradeCount);
-                }
-            }
-            else
-            {
-                bool check = db.QrCodeAmountSummay.Any(m => m.SnNo == SnNo && m.PayMode == PayMode && m.TradeMonth == DateOrMonth);
-                if (check)
-                {
-                    amt = db.QrCodeAmountSummay.Where(m => m.SnNo == SnNo && m.PayMode == PayMode && m.TradeMonth == DateOrMonth).Sum(m => m.TradeCount);
-                }
-            }
-            db.Dispose();
-            return amt;
-        }
-
-
-        public decimal Amount(string SnNo, string DateOrMonth, int PayMode, int IsAct)
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            if(DateOrMonth.Length == 8)
-            {
-                bool check = db.QrCodeAmountSummay.Any(m => m.SnNo == SnNo && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeDate == DateOrMonth);
-                if (check)
-                {
-                    amt = db.QrCodeAmountSummay.Where(m => m.SnNo == SnNo && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeDate == DateOrMonth).Sum(m => m.TradeAmount);
-                }
-            }
-            else
-            {
-                bool check = db.QrCodeAmountSummay.Any(m => m.SnNo == SnNo && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeMonth == DateOrMonth);
-                if (check)
-                {
-                    amt = db.QrCodeAmountSummay.Where(m => m.SnNo == SnNo && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeMonth == DateOrMonth).Sum(m => m.TradeAmount);
-                }
-            }
-            db.Dispose();
-            return amt;
-        }
-
-        public int Count(string SnNo, string DateOrMonth, int PayMode, int IsAct)
-        {
-            int amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            if(DateOrMonth.Length == 8)
-            {
-                bool check = db.QrCodeAmountSummay.Any(m => m.SnNo == SnNo && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeDate == DateOrMonth);
-                if (check)
-                {
-                    amt = db.QrCodeAmountSummay.Where(m => m.SnNo == SnNo && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeDate == DateOrMonth).Sum(m => m.TradeCount);
-                }
-            }
-            else
-            {
-                bool check = db.QrCodeAmountSummay.Any(m => m.SnNo == SnNo && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeMonth == DateOrMonth);
-                if (check)
-                {
-                    amt = db.QrCodeAmountSummay.Where(m => m.SnNo == SnNo && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeMonth == DateOrMonth).Sum(m => m.TradeCount);
-                }
-            }
-            db.Dispose();
-            return amt;
-        }
-
-    }
-}

+ 0 - 76
AppStart/Redis/Mysql/StoreHouseDbconn.cs

@@ -1,76 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Library;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class StoreHouseDbconn
-    {
-        public readonly static StoreHouseDbconn Instance = new StoreHouseDbconn();
-
-        #region 获取单个字段
-        public StoreHouse Get(int Id)
-        {
-            WebCMSEntities db = new WebCMSEntities();
-            StoreHouse order = db.StoreHouse.FirstOrDefault(m => m.Id == Id);
-            if (order != null)
-            {
-            }
-            db.Dispose();
-            return order;
-        }
-        #endregion
-
-        #region 获取列表
-        public List<int> GetList(int UserId, int pageNum = 1, int pageSize = 10)
-        {
-            string key = "StoreHouseList:" + UserId;
-            if (UserId == 0)
-            { 
-                key = "StoreHouseList";
-            }
-            List<int> list = new List<int>();
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                list = RedisDbconn.Instance.GetList<int>(key, pageNum, pageSize);
-                if (list.Count > 0)
-                {
-                    return list;
-                }
-            }
-            List<int> newlist = new List<int>();
-            RedisDbconn.Instance.GetLock(key + ":lock");
-            WebCMSEntities db = new WebCMSEntities();
-            var mysqllist = db.StoreHouse.Select(m => new { m.Id, m.LaveNum, m.UserId, m.Status }).Where(m => m.Status > -1);
-            if (UserId > 0)
-            {
-                mysqllist = mysqllist.Where(m => m.UserId == UserId);
-            }
-            else
-            { 
-                mysqllist = mysqllist.Where(m => m.LaveNum > 0);
-            }
-            var resultlist = mysqllist.OrderByDescending(m => m.Id).ToList();
-            if (resultlist.Count > 0)
-            {
-                foreach (var sub in resultlist)
-                {
-                    newlist.Add(sub.Id);
-                }
-                RedisDbconn.Instance.Clear(key);
-                foreach (int sub in newlist)
-                {
-                    RedisDbconn.Instance.AddRightList(key, sub);
-                }
-                RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));                
-                return newlist;
-            }
-            db.Dispose();
-            RedisDbconn.Instance.ReleaseLock(key + ":lock");
-            return newlist;
-        }
-        #endregion
-    }
-}

+ 0 - 77
AppStart/Redis/Mysql/UserAccountDbconn.cs

@@ -1,77 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Library;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class UserAccountDbconn
-    {
-        public readonly static UserAccountDbconn Instance = new UserAccountDbconn();
-
-        #region 获取单个字段
-        public UserAccount Get(int Id)
-        {
-            WebCMSEntities db = new WebCMSEntities();
-            UserAccount order = db.UserAccount.FirstOrDefault(m => m.Id == Id);
-            if (order != null)
-            {
-            }
-            db.Dispose();
-            return order;
-        }
-        public decimal GetIncome(int Id, string TradeMonth)
-        {
-            string key = "UserAccount:Income:" + Id + ":" + TradeMonth;
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                decimal obj = RedisDbconn.Instance.Get<decimal>(key);
-                return obj;
-            }
-            WebCMSEntities db = new WebCMSEntities();
-            decimal result = 0;
-            DateTime start = DateTime.Parse(TradeMonth.Substring(0, 4) + "-" + TradeMonth.Substring(4, 2) + "-01 00:00:00");
-            DateTime end = start.AddMonths(1);
-            List<int> ChangeTypes = PublicFunction.IncomeTypes();
-            bool check = db.UserAccountRecord.Any(m => m.UserId == Id && m.CreateDate >= start && m.CreateDate < end && ChangeTypes.Contains(m.ChangeType));
-            if (check)
-            {
-                result = db.UserAccountRecord.Where(m => m.UserId == Id && m.CreateDate >= start && m.CreateDate < end && ChangeTypes.Contains(m.ChangeType)).Sum(m => m.ChangeAmount);
-                RedisDbconn.Instance.Set(key, result);
-                RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(180, 300));
-            }
-            return result;
-        }
-        public decimal GetExpend(int Id, string TradeMonth)
-        {
-            string key = "UserAccount:Expend:" + Id + ":" + TradeMonth;
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                decimal obj = RedisDbconn.Instance.Get<decimal>(key);
-                return obj;
-            }
-            decimal result = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            DateTime start = DateTime.Parse(TradeMonth.Substring(0, 4) + "-" + TradeMonth.Substring(4, 2) + "-01 00:00:00");
-            DateTime end = start.AddMonths(1);
-            List<int> ChangeTypes = PublicFunction.ExpendTypes();
-            bool check = db.UserAccountRecord.Any(m => m.UserId == Id && m.CreateDate >= start && m.CreateDate < end && ChangeTypes.Contains(m.ChangeType));
-            if (check)
-            {
-                result += db.UserAccountRecord.Where(m => m.UserId == Id && m.CreateDate >= start && m.CreateDate < end && ChangeTypes.Contains(m.ChangeType)).Sum(m => m.ChangeAmount);
-            }
-            DateTime checkTime = DateTime.Parse("2022-04-11 19:31:39");
-            check = db.UserCashRecord.Any(m => m.UserId == Id && m.CreateDate < checkTime && m.CreateDate >= start && m.CreateDate < end && m.Status == 1);
-            if (check)
-            {
-                result += db.UserCashRecord.Where(m => m.UserId == Id && m.CreateDate < checkTime && m.CreateDate >= start && m.CreateDate < end && m.Status == 1).Sum(m => m.TradeAmount);
-            }
-            RedisDbconn.Instance.Set(key, result);
-            RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(180, 600));
-            return result;
-        }
-        #endregion
-
-    }
-}

+ 0 - 59
AppStart/Redis/Mysql/UserAccountRecordDbconn.cs

@@ -1,59 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Library;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class UserAccountRecordDbconn
-    {
-        public readonly static UserAccountRecordDbconn Instance = new UserAccountRecordDbconn();
-
-        #region 获取列表
-        public List<UserAccountRecord> GetList(int UserId, string Kind, string TradeMonth, int pageNum = 1, int pageSize = 10)
-        {
-            string key = "UserAccountList:" + UserId + ":" + Kind + ":" + TradeMonth;
-            List<UserAccountRecord> list = new List<UserAccountRecord>();
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                list = RedisDbconn.Instance.GetList<UserAccountRecord>(key, pageNum, pageSize);
-                if (list.Count > 0)
-                {
-                    return list;
-                }
-            }
-            WebCMSEntities db = new WebCMSEntities();
-            DateTime start = DateTime.Parse(TradeMonth.Substring(0, 4) + "-" + TradeMonth.Substring(4, 2) + "-01 00:00:00");
-            DateTime end = start.AddMonths(1);
-            IQueryable<UserAccountRecord> mysqllist = db.UserAccountRecord;
-            if (Kind == "1")
-            {
-                mysqllist = mysqllist.Where(m => m.UserId == UserId && m.CreateDate >= start && m.CreateDate < end && (m.ChangeType == 0 || m.ChangeType == 50 || m.ChangeType == 112));
-            }
-            else
-            {
-                mysqllist = mysqllist.Where(m => m.UserId == UserId && m.CreateDate >= start && m.CreateDate < end && m.ChangeType == 2 && m.Status == 1);
-            }
-            List<UserAccountRecord> newlist = new List<UserAccountRecord>();
-            var resultlist = mysqllist.OrderByDescending(m => m.Id).ToList();
-            if (resultlist.Count > 0)
-            {
-                foreach (var sub in resultlist)
-                {
-                    newlist.Add(sub);
-                }
-                RedisDbconn.Instance.Clear(key);
-                foreach (var sub in newlist)
-                {
-                    RedisDbconn.Instance.AddRightList(key, sub);
-                }
-                RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(60, 120));
-            }
-            db.Dispose();
-            return newlist;
-        }
-        #endregion
-
-    }
-}

+ 0 - 70
AppStart/Redis/Mysql/UserAddressDbconn.cs

@@ -1,70 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Library;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class UserAddressDbconn
-    {
-        public readonly static UserAddressDbconn Instance = new UserAddressDbconn();
-
-        #region 获取单个字段
-        public UserAddress Get(int Id)
-        {
-            // string key = "UserAddress:" + Id;
-            // if (RedisDbconn.Instance.Exists(key))
-            // {
-            //     UserAddress obj = RedisDbconn.Instance.Get<UserAddress>(key);
-            //     if (obj != null)
-            //     {
-            //         return obj;
-            //     }
-            // }
-            WebCMSEntities db = new WebCMSEntities();
-            UserAddress order = db.UserAddress.FirstOrDefault(m => m.Id == Id);
-            // if (order != null)
-            // {
-            //     RedisDbconn.Instance.Set(key, order);
-            //     RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            // }
-            return order;
-        }
-        #endregion
-
-        #region 获取列表
-        public List<int> GetList(int UserId, int pageNum = 1, int pageSize = 10)
-        {
-            // string key = "UserAddressList:" + UserId;
-            // List<int> list = new List<int>();
-            // if (RedisDbconn.Instance.Exists(key))
-            // {
-            //     list = RedisDbconn.Instance.GetList<int>(key, pageNum, pageSize);
-            //     if (list.Count > 0)
-            //     {
-            //         return list;
-            //     }
-            // }
-            WebCMSEntities db = new WebCMSEntities();
-            List<int> newlist = new List<int>();
-            var mysqllist = db.UserAddress.Select(m => new { m.Id, m.UserId }).Where(m => m.UserId == UserId).OrderByDescending(m => m.Id).ToList();
-            if (mysqllist.Count > 0)
-            {
-                foreach (var sub in mysqllist)
-                {
-                    newlist.Add(sub.Id);
-                }
-                // RedisDbconn.Instance.Clear(key);
-                // foreach (int sub in newlist)
-                // {
-                //     RedisDbconn.Instance.AddRightList(key, sub);
-                // }
-                // RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            db.Dispose();
-            return newlist;
-        }
-        #endregion
-    }
-}

+ 0 - 74
AppStart/Redis/Mysql/UserAmountSummary.cs

@@ -1,74 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Library;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class UserAmountSummary
-    {
-        public readonly static UserAmountSummary Instance = new UserAmountSummary();
-        public UserAmountSummary()
-        { }
-
-        public decimal GetTrade(int UserId, string kind = "self")
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.UserAmountSummary.Any(m => m.UserId == UserId && m.SeoTitle == kind);
-            if (check)
-            {
-                if (kind == "self")
-                {
-                    amt = db.UserAmountSummary.Where(m => m.UserId == UserId && m.SeoTitle == kind).Sum(m => m.TotalAmount);
-                }
-                else if (kind == "team")
-                {
-                    amt = db.UserAmountSummary.Where(m => m.UserId == UserId && m.SeoTitle == kind).Sum(m => m.TotalAmount);
-                }
-            }
-            db.Dispose();
-            return amt;
-        }
-        public decimal GetTradeByMonth(int UserId, string TradeMonth, string kind = "self")
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.UserAmountSummary.Any(m => m.UserId == UserId && m.TradeMonth == TradeMonth &&m.SeoTitle == kind);
-            if (check)
-            {
-                if (kind == "self")
-                {
-                    amt = db.UserAmountSummary.Where(m => m.UserId == UserId && m.TradeMonth == TradeMonth &&m.SeoTitle == kind).Sum(m => m.TotalAmount);
-                }
-                else if (kind == "team")
-                {
-                    amt = db.UserAmountSummary.Where(m => m.UserId == UserId && m.TradeMonth == TradeMonth &&m.SeoTitle == kind).Sum(m => m.TotalAmount);
-                }
-            }
-            db.Dispose();
-            return amt;
-        }
-
-        public decimal GetTradeByDate(int UserId, string TradeDate, string kind = "self")
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.UserAmountSummary.Any(m => m.UserId == UserId && m.TradeDate == TradeDate &&m.SeoTitle == kind);
-            if (check)
-            {
-                if (kind == "self")
-                {
-                    amt = db.UserAmountSummary.Where(m => m.UserId == UserId && m.TradeDate == TradeDate &&m.SeoTitle == kind).Sum(m => m.TotalAmount);
-                }
-                else if (kind == "team")
-                {
-                    amt = db.UserAmountSummary.Where(m => m.UserId == UserId && m.TradeDate == TradeDate &&m.SeoTitle == kind).Sum(m => m.TotalAmount);
-                }
-            }
-            db.Dispose();
-            return amt;
-        }
-    }
-}

+ 0 - 65
AppStart/Redis/Mysql/UserCashRecordDbconn.cs

@@ -1,65 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class UserCashRecordDbconn
-    {
-        public readonly static UserCashRecordDbconn Instance = new UserCashRecordDbconn();
-
-        #region 获取单个字段
-        public UserCashRecord Get(int Id)
-        {
-            // string key = "UserCashRecord:" + Id;
-            // if (RedisDbconn.Instance.Exists(key))
-            // {
-            //     UserCashRecord obj = RedisDbconn.Instance.Get<UserCashRecord>(key);
-            //     if (obj != null)
-            //     {
-            //         return obj;
-            //     }
-            // }
-            WebCMSEntities db = new WebCMSEntities();
-            UserCashRecord orderPro = db.UserCashRecord.FirstOrDefault(m => m.Id == Id);
-            if (orderPro != null)
-            {
-                // RedisDbconn.Instance.Set(key, orderPro);
-                // RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            return orderPro;
-        }
-        #endregion
-
-
-        #region 获取列表
-        public List<int> GetList(int UserId, int pageNum = 1, int pageSize = 10)
-        {
-            string key = "UserCashRecordList:" + UserId;
-            List<int> list = new List<int>();
-            // if (RedisDbconn.Instance.Exists(key))
-            // {
-            //     list = RedisDbconn.Instance.GetList<int>(key, pageNum, pageSize);
-            //     if (list.Count > 0)
-            //     {
-            //         return list;
-            //     }
-            // }
-            WebCMSEntities db = new WebCMSEntities();
-            var mysqllist = db.UserCashRecord.Select(m => new { m.Id, m.UserId }).Where(m => m.UserId == UserId).OrderByDescending(m => m.Id).ToList();
-            if (mysqllist.Count > 0)
-            {
-                RedisDbconn.Instance.Clear(key);
-                foreach (var sub in mysqllist)
-                {
-                    list.Add(sub.Id);
-                    RedisDbconn.Instance.AddRightList(key, sub.Id);
-                }
-            }
-            db.Dispose();
-            return list;
-        }
-        #endregion
-    }
-}

+ 0 - 240
AppStart/Redis/Mysql/UserDataDbconn.cs

@@ -1,240 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Library;
-using System.Linq;
-using System.Data;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class UserDataDbconn
-    {
-        public readonly static UserDataDbconn Instance = new UserDataDbconn();
-
-        #region 获取单个字段
-        public UserData Get(int Id)
-        {
-            // string key = "UserData:" + Id;
-            // if (RedisDbconn.Instance.Exists(key))
-            // {
-            //     UserData obj = RedisDbconn.Instance.Get<UserData>(key);
-            //     if (obj != null)
-            //     {
-            //         return obj;
-            //     }
-            // }
-            WebCMSEntities db = new WebCMSEntities();
-            UserData userData = db.UserData.FirstOrDefault(m => m.UserId == Id);
-            if (userData != null)
-            {
-                // RedisDbconn.Instance.Set(key, userData);
-                // RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            return userData;
-        }
-        public int GetSelfMakerCount(int Id)
-        {
-            string key = "MakerCount:" + Id;
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                int obj = RedisDbconn.Instance.Get<int>(key);
-                return obj;
-            }
-            WebCMSEntities db = new WebCMSEntities();
-            UserData userData = db.UserData.FirstOrDefault(m => m.UserId == Id);
-            if (userData != null)
-            {
-                RedisDbconn.Instance.Set(key, userData.FansCount);
-                RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            return 0;
-        }
-        public int GetTeamMakerCount(int Id)
-        {
-            string key = "TeamMakerCount:" + Id;
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                int obj = RedisDbconn.Instance.Get<int>(key);
-                return obj;
-            }
-            WebCMSEntities db = new WebCMSEntities();
-            string IdString = "," + Id + ",";
-            int MakerCount = db.Users.Count(m => m.ParentNav.Contains(IdString) && m.AuthFlag == 1);
-            RedisDbconn.Instance.Set(key, MakerCount);
-            RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            return MakerCount;
-        }
-        public int GetSelfMakerCountForMonth(int Id, string TradeMonth)
-        {
-            string key = "AddMakerCount:" + Id + ":" + TradeMonth;
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                int obj = RedisDbconn.Instance.Get<int>(key);
-                return obj;
-            }
-            DateTime start = DateTime.Parse(TradeMonth.Substring(0, 4) + "-" + TradeMonth.Substring(4, 2) + "-01 00:00:00");
-            DateTime end = start.AddMonths(1);
-            WebCMSEntities db = new WebCMSEntities();
-            int MakerCount = db.Users.Count(m => m.ParentUserId == Id && m.AuthDate >= start && m.AuthDate < end);
-            RedisDbconn.Instance.Set(key, MakerCount);
-            RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            return MakerCount;
-        }
-        public int GetTeamMakerCountForMonth(int Id, string TradeMonth)
-        {
-            string key = "TeamAddMakerCount:" + Id + ":" + TradeMonth;
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                int obj = RedisDbconn.Instance.Get<int>(key);
-                return obj;
-            }
-            DateTime start = DateTime.Parse(TradeMonth.Substring(0, 4) + "-" + TradeMonth.Substring(4, 2) + "-01 00:00:00");
-            DateTime end = start.AddMonths(1);
-            WebCMSEntities db = new WebCMSEntities();
-            string IdString = "," + Id + ",";
-            int MakerCount = db.Users.Count(m => m.ParentNav.Contains(IdString) && m.AuthDate >= start && m.AuthDate < end);
-            RedisDbconn.Instance.Set(key, MakerCount);
-            RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            return MakerCount;
-        }
-
-        public int GetPosActCount(int UserId, string TradeMonthOrDate = "")
-        {
-            int MakerCount = 0;
-            // string key = "TotalPosMerchant:" + Id;
-            // if (RedisDbconn.Instance.Exists(key))
-            // {
-            //     int obj = RedisDbconn.Instance.Get<int>(key);
-            //     return obj;
-            // }
-            // WebCMSEntities db = new WebCMSEntities();
-            // string condi = "";
-            // if (!string.IsNullOrEmpty(TradeMonth))
-            // {
-            //     string start = TradeMonth.Substring(0, 4) + "-" + TradeMonth.Substring(4, 2) + "-01 00:00:00";
-            //     string end = DateTime.Parse(start).AddMonths(1).ToString("yyyy-MM-dd HH:mm:ss");
-            //     condi += " and ActivationTime>='" + start + "' and ActivationTime<'" + end + "'";
-            // }
-            // OtherMySqlConn.connstr = Library.ConfigurationManager.AppSettings["SqlConnStr"].ToString();
-            // DataTable dt = OtherMySqlConn.dtable("select count(Id) from PosMachinesTwo where BuyUserId=" + Id + " and ActivationState=1 and UserId>0" + condi);
-            // if (dt.Rows.Count > 0)
-            // {
-            //     MakerCount = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
-            // }
-            // RedisDbconn.Instance.Set(key, MakerCount);
-            // OtherMySqlConn.connstr = "";
-            WebCMSEntities db = new WebCMSEntities();
-            if(string.IsNullOrEmpty(TradeMonthOrDate))
-            {
-                bool check = db.UserTradeMonthSummary.Any(m => m.UserId == UserId && m.SeoTitle == "self");
-                if (check)
-                {
-                    MakerCount = db.UserTradeMonthSummary.Where(m => m.UserId == UserId && m.SeoTitle == "self").Sum(m => m.ActiveBuddyMerStatus);
-                }
-            }
-            else
-            {
-                if(TradeMonthOrDate.Length == 8)
-                {
-                    bool check = db.UserTradeMonthSummary.Any(m => m.UserId == UserId && m.SeoKeyword == TradeMonthOrDate && m.SeoTitle == "self");
-                    if (check)
-                    {
-                        MakerCount = db.UserTradeMonthSummary.Where(m => m.UserId == UserId && m.SeoKeyword == TradeMonthOrDate && m.SeoTitle == "self").Sum(m => m.ActiveBuddyMerStatus);
-                    }
-                }
-                else
-                {
-                    bool check = db.UserTradeMonthSummary.Any(m => m.UserId == UserId && m.TradeMonth == TradeMonthOrDate && m.SeoTitle == "self");
-                    if (check)
-                    {
-                        MakerCount = db.UserTradeMonthSummary.Where(m => m.UserId == UserId && m.TradeMonth == TradeMonthOrDate && m.SeoTitle == "self").Sum(m => m.ActiveBuddyMerStatus);
-                    }
-                }
-            }
-            return MakerCount;
-        }
-
-        public int GetTeamPosActCount(int UserId, string TradeMonthOrDate = "")
-        {
-            int MakerCount = 0;
-            // string key = "TeamTotalPosMerchant:" + Id;
-            // if (RedisDbconn.Instance.Exists(key))
-            // {
-            //     int obj = RedisDbconn.Instance.Get<int>(key);
-            //     return obj;
-            // }
-            // WebCMSEntities db = new WebCMSEntities();
-            // string condi = "";
-            // if (!string.IsNullOrEmpty(TradeMonth))
-            // {
-            //     string start = TradeMonth.Substring(0, 4) + "-" + TradeMonth.Substring(4, 2) + "-01 00:00:00";
-            //     string end = DateTime.Parse(start).AddMonths(1).ToString("yyyy-MM-dd HH:mm:ss");
-            //     condi += " and ActivationTime>='" + start + "' and ActivationTime<'" + end + "'";
-            // }
-            // OtherMySqlConn.connstr = Library.ConfigurationManager.AppSettings["SqlConnStr"].ToString();
-            // DataTable dt = OtherMySqlConn.dtable("select count(Id) from PosMachinesTwo where BuyUserId in (select Id from Users where ParentNav like '%," + Id + ",%' or Id=" + Id + ") and ActivationState=1 and UserId>0" + condi);
-            // if (dt.Rows.Count > 0)
-            // {
-            //     MakerCount = int.Parse(function.CheckInt(dt.Rows[0][0].ToString()));
-            // }
-            // RedisDbconn.Instance.Set(key, MakerCount);
-            // OtherMySqlConn.connstr = "";
-            WebCMSEntities db = new WebCMSEntities();
-            if(string.IsNullOrEmpty(TradeMonthOrDate))
-            {
-                bool check = db.UserTradeMonthSummary.Any(m => m.UserId == UserId && m.SeoTitle == "team");
-                if (check)
-                {
-                    MakerCount = db.UserTradeMonthSummary.Where(m => m.UserId == UserId && m.SeoTitle == "team").Sum(m => m.ActiveBuddyMerStatus);
-                }
-            }
-            else
-            {
-                if(TradeMonthOrDate.Length == 8)
-                {
-                    bool check = db.UserTradeMonthSummary.Any(m => m.UserId == UserId && m.SeoKeyword == TradeMonthOrDate && m.SeoTitle == "team");
-                    if (check)
-                    {
-                        MakerCount = db.UserTradeMonthSummary.Where(m => m.UserId == UserId && m.SeoKeyword == TradeMonthOrDate && m.SeoTitle == "team").Sum(m => m.ActiveBuddyMerStatus);
-                    }
-                }
-                else
-                {
-                    bool check = db.UserTradeMonthSummary.Any(m => m.UserId == UserId && m.TradeMonth == TradeMonthOrDate && m.SeoTitle == "team");
-                    if (check)
-                    {
-                        MakerCount = db.UserTradeMonthSummary.Where(m => m.UserId == UserId && m.TradeMonth == TradeMonthOrDate && m.SeoTitle == "team").Sum(m => m.ActiveBuddyMerStatus);
-                    }
-                }
-            }
-            db.Dispose();
-            return MakerCount;
-        }
-
-        public int GetTeamBrandPosActCount(int UserId, int BrandId, string TradeMonthOrDate = "")
-        {
-            int MakerCount = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            if(TradeMonthOrDate.Length == 8)
-            {
-                bool check = db.UserTradeMonthSummary.Any(m => m.UserId == UserId && m.BrandId == BrandId && m.SeoKeyword == TradeMonthOrDate && m.SeoTitle == "team");
-                if (check)
-                {
-                    MakerCount = db.UserTradeMonthSummary.Where(m => m.UserId == UserId && m.BrandId == BrandId && m.SeoKeyword == TradeMonthOrDate && m.SeoTitle == "team").Sum(m => m.ActiveBuddyMerStatus);
-                }
-            }
-            else
-            {
-                bool check = db.UserTradeMonthSummary.Any(m => m.UserId == UserId && m.BrandId == BrandId && m.TradeMonth == TradeMonthOrDate && m.SeoTitle == "team");
-                if (check)
-                {
-                    MakerCount = db.UserTradeMonthSummary.Where(m => m.UserId == UserId && m.BrandId == BrandId && m.TradeMonth == TradeMonthOrDate && m.SeoTitle == "team").Sum(m => m.ActiveBuddyMerStatus);
-                }
-            }
-            db.Dispose();
-            return MakerCount;
-        }
-        #endregion
-
-    }
-}

+ 0 - 38
AppStart/Redis/Mysql/UserForMakerCodeDbconn.cs

@@ -1,38 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Library;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class UserForMakerCodeDbconn
-    {
-        public readonly static UserForMakerCodeDbconn Instance = new UserForMakerCodeDbconn();
-
-        #region 获取单个字段
-        public UserForMakerCode Get(string MakerCode)
-        {
-            // string key = "UserForMakerCode:" + MakerCode;
-            // if (RedisDbconn.Instance.Exists(key))
-            // {
-            //     UserForMakerCode obj = RedisDbconn.Instance.Get<UserForMakerCode>(key);
-            //     if (obj != null)
-            //     {
-            //         return obj;
-            //     }
-            // }
-            WebCMSEntities db = new WebCMSEntities();
-            UserForMakerCode order = db.UserForMakerCode.FirstOrDefault(m => m.MakerCode == MakerCode);
-            if (order != null)
-            {
-                // RedisDbconn.Instance.Set(key, order);
-                // RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            db.Dispose();
-            return order;
-        }
-        #endregion
-
-    }
-}

+ 0 - 38
AppStart/Redis/Mysql/UserForMobileDbconn.cs

@@ -1,38 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Library;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class UserForMobileDbconn
-    {
-        public readonly static UserForMobileDbconn Instance = new UserForMobileDbconn();
-
-        #region 获取单个字段
-        public UserForMobile Get(string Mobile)
-        {
-            // string key = "UserForMobile:" + Mobile;
-            // if (RedisDbconn.Instance.Exists(key))
-            // {
-            //     UserForMobile obj = RedisDbconn.Instance.Get<UserForMobile>(key);
-            //     if (obj != null)
-            //     {
-            //         return obj;
-            //     }
-            // }
-            WebCMSEntities db = new WebCMSEntities();
-            UserForMobile userFor = db.UserForMobile.FirstOrDefault(m => m.Mobile == Mobile);
-            if (userFor != null)
-            {
-                // RedisDbconn.Instance.Set(key, userFor);
-                // RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            db.Dispose();
-            return userFor;
-        }
-        #endregion
-
-    }
-}

+ 0 - 46
AppStart/Redis/Mysql/UserLevelSetDbconn.cs

@@ -1,46 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class UserLevelSetDbconn
-    {
-        public readonly static UserLevelSetDbconn Instance = new UserLevelSetDbconn();
-
-        #region 获取列表
-        public List<UserLevelSet> GetList()
-        {
-            string key = "UserLevelSet";
-            List<UserLevelSet> list = new List<UserLevelSet>();
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                list = RedisDbconn.Instance.GetList<UserLevelSet>(key);
-                if (list.Count > 0)
-                {
-                    return list;
-                }
-            }
-            WebCMSEntities db = new WebCMSEntities();
-            var mysqllist = db.UserLevelSet.OrderBy(m => m.Id).ToList();
-            if (mysqllist.Count > 0)
-            {
-                List<UserLevelSet> newlist = new List<UserLevelSet>();
-                foreach (var sub in mysqllist)
-                {
-                    newlist.Add(sub);
-                }
-                RedisDbconn.Instance.Clear(key);
-                foreach (UserLevelSet sub in newlist)
-                {
-                    RedisDbconn.Instance.AddRightList(key, sub);
-                }
-                RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            db.Dispose();
-            return list;
-        }
-        #endregion
-    }
-}

+ 0 - 27
AppStart/Redis/Mysql/UserMachineDataDbconn.cs

@@ -1,27 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Library;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class UserMachineDataDbconn
-    {
-        public readonly static UserMachineDataDbconn Instance = new UserMachineDataDbconn();
-
-        #region 获取单个字段
-        public UserMachineData Get(string IdBrand)
-        {
-            WebCMSEntities db = new WebCMSEntities();
-            UserMachineData userData = db.UserMachineData.FirstOrDefault(m => m.IdBrand == IdBrand);
-            if (userData != null)
-            {
-            }
-            db.Dispose();
-            return userData;
-        }
-        #endregion
-
-    }
-}

+ 0 - 82
AppStart/Redis/Mysql/UserStoreChangeDbconn.cs

@@ -1,82 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class UserStoreChangeDbconn
-    {
-        public readonly static UserStoreChangeDbconn Instance = new UserStoreChangeDbconn();
-
-        #region 获取单个字段
-        public UserStoreChange Get(int Id)
-        {
-            string key = "UserStoreChange:" + Id;
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                UserStoreChange obj = RedisDbconn.Instance.Get<UserStoreChange>(key);
-                if (obj != null)
-                {
-                    return obj;
-                }
-            }
-            WebCMSEntities db = new WebCMSEntities();
-            UserStoreChange orderPro = db.UserStoreChange.FirstOrDefault(m => m.Id == Id);
-            if (orderPro != null)
-            {
-                RedisDbconn.Instance.Set(key, orderPro);
-                RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            }
-            return orderPro;
-        }
-        #endregion
-
-
-        #region 获取列表
-        public List<UserStoreChange> GetList(int UserId, int BrandId, int pageNum = 1, int pageSize = 10)
-        {
-            string key = "UserStoreChangeList:" + UserId + ":" + BrandId;
-            List<UserStoreChange> list = new List<UserStoreChange>();
-            // if (RedisDbconn.Instance.Exists(key))
-            // {
-            //     list = RedisDbconn.Instance.GetList<UserStoreChange>(key, pageNum, pageSize);
-            //     if (list.Count > 0)
-            //     {
-            //         return list;
-            //     }
-            // }
-            WebCMSEntities db = new WebCMSEntities();
-            IQueryable<UserStoreChange> mysqllist = db.UserStoreChange.Where(m => m.UserId == UserId && m.BrandId == BrandId).OrderByDescending(m => m.Id);
-            if (pageNum == 1)
-            {
-                mysqllist = mysqllist.Take(pageSize);
-            }
-            else
-            {
-                int skipNum = pageSize * (pageNum - 1);
-                mysqllist = mysqllist.Skip(skipNum).Take(pageSize);
-            }
-            List<UserStoreChange> result = mysqllist.ToList();
-            db.Dispose();
-            return result;
-            // if (mysqllist.Count > 0)
-            // {
-            //     List<UserStoreChange> newlist = new List<UserStoreChange>();
-            //     foreach (UserStoreChange sub in mysqllist)
-            //     {
-            //         newlist.Add(sub);
-            //     }
-            //     RedisDbconn.Instance.Clear(key);
-            //     foreach (UserStoreChange sub in newlist)
-            //     {
-            //         RedisDbconn.Instance.AddRightList(key, sub);
-            //     }
-            //     RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
-            // }
-            // db.Dispose();
-            // return list;
-        }
-        #endregion
-    }
-}

+ 0 - 164
AppStart/Redis/Mysql/UserTradeDaySummaryDbconn.cs

@@ -1,164 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Library;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class UserTradeDaySummaryDbconn
-    {
-        public readonly static UserTradeDaySummaryDbconn Instance = new UserTradeDaySummaryDbconn();
-        public UserTradeDaySummaryDbconn()
-        { }
-
-        // TODO:读取很慢,感觉redis没生效
-
-        #region 获取单个字段
-        //个人业绩
-        public decimal GetTrade(int UserId, string kind = "self")
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.TradeDaySummary.Any(m => m.UserId == UserId && m.SeoTitle == kind);
-            if (check)
-            {
-                if (kind == "self")
-                {
-                    amt = db.TradeDaySummary.Where(m => m.UserId == UserId && m.SeoTitle == kind).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt + m.ProfitDirectTradeAmt + m.ProfitDirectDebitTradeAmt);
-                }
-                else if (kind == "team")
-                {
-                    amt = db.TradeDaySummary.Where(m => m.UserId == UserId && m.SeoTitle == kind).Sum(m => m.HelpNonDirectTradeAmt + m.HelpNonDirectDebitTradeAmt + m.NotHelpNonDirectTradeAmt + m.NotHelpNonDirectDebitTradeAmt + m.ProfitNonDirectTradeAmt + m.ProfitNonDirectDebitTradeAmt);
-                }
-            }
-            // RedisDbconn.Instance.Set(key, amt);
-            db.Dispose();
-            return amt;
-        }
-        public decimal GetDateTrade(int UserId, string TradeDate, string kind = "self")
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.TradeDaySummary.Any(m => m.UserId == UserId && m.TradeDate == TradeDate && m.SeoTitle == kind);
-            if (check)
-            {
-                if (kind == "self")
-                {
-                    amt = db.TradeDaySummary.Where(m => m.UserId == UserId && m.TradeDate == TradeDate && m.SeoTitle == kind).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt + m.ProfitDirectTradeAmt + m.ProfitDirectDebitTradeAmt);
-                }
-                else if (kind == "team")
-                {
-                    amt = db.TradeDaySummary.Where(m => m.UserId == UserId && m.TradeDate == TradeDate && m.SeoTitle == kind).Sum(m => m.HelpNonDirectTradeAmt + m.HelpNonDirectDebitTradeAmt + m.NotHelpNonDirectTradeAmt + m.NotHelpNonDirectDebitTradeAmt + m.ProfitNonDirectTradeAmt + m.ProfitNonDirectDebitTradeAmt);
-                }
-            }
-            // RedisDbconn.Instance.Set(key, amt);
-            db.Dispose();
-            return amt;
-        }
-        public decimal GetMonthTrade(int UserId, string TradeMonth, string kind = "self")
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.TradeDaySummary.Any(m => m.UserId == UserId && m.TradeMonth == TradeMonth && m.SeoTitle == kind);
-            if (check)
-            {
-                if (kind == "self")
-                {
-                    amt = db.TradeDaySummary.Where(m => m.UserId == UserId && m.TradeMonth == TradeMonth && m.SeoTitle == kind).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt + m.ProfitDirectTradeAmt + m.ProfitDirectDebitTradeAmt);
-                }
-                else if (kind == "team")
-                {
-                    amt = db.TradeDaySummary.Where(m => m.UserId == UserId && m.TradeMonth == TradeMonth && m.SeoTitle == kind).Sum(m => m.HelpNonDirectTradeAmt + m.HelpNonDirectDebitTradeAmt + m.NotHelpNonDirectTradeAmt + m.NotHelpNonDirectDebitTradeAmt + m.ProfitNonDirectTradeAmt + m.ProfitNonDirectDebitTradeAmt);
-                }
-            }
-            // RedisDbconn.Instance.Set(key, amt);
-            db.Dispose();
-            return amt;
-        }
-        public decimal GetDateTradeForBrand(int UserId, string TradeDate, int BrandId, string kind = "self")
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.TradeDaySummary.Any(m => m.UserId == UserId && m.BrandId == BrandId && m.TradeDate == TradeDate && m.
-            SeoTitle == kind);
-            if (check)
-            {
-                if (kind == "self")
-                {
-                    amt = db.TradeDaySummary.Where(m => m.UserId == UserId && m.BrandId == BrandId && m.TradeDate == TradeDate && m.SeoTitle == kind).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt + m.ProfitDirectTradeAmt + m.ProfitDirectDebitTradeAmt);
-                }
-                else if (kind == "team")
-                {
-                    amt = db.TradeDaySummary.Where(m => m.UserId == UserId && m.BrandId == BrandId && m.TradeDate == TradeDate && m.SeoTitle == kind).Sum(m => m.HelpNonDirectTradeAmt + m.HelpNonDirectDebitTradeAmt + m.NotHelpNonDirectTradeAmt + m.NotHelpNonDirectDebitTradeAmt + m.ProfitNonDirectTradeAmt + m.ProfitNonDirectDebitTradeAmt);
-                }
-            }
-            // RedisDbconn.Instance.Set(key, amt);
-            db.Dispose();
-            return amt;
-        }
-        public decimal GetMonthTradeForBrand(int UserId, string TradeMonth, int BrandId, string kind = "self")
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.TradeDaySummary.Any(m => m.UserId == UserId && m.BrandId == BrandId && m.TradeMonth == TradeMonth && m.SeoTitle == kind);
-            if (check)
-            {
-                if (kind == "self")
-                {
-                    amt = db.TradeDaySummary.Where(m => m.UserId == UserId && m.BrandId == BrandId && m.TradeMonth == TradeMonth && m.SeoTitle == kind).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt + m.ProfitDirectTradeAmt + m.ProfitDirectDebitTradeAmt);
-                }
-                else if (kind == "team")
-                {
-                    amt = db.TradeDaySummary.Where(m => m.UserId == UserId && m.BrandId == BrandId && m.TradeMonth == TradeMonth && m.SeoTitle == kind).Sum(m => m.HelpNonDirectTradeAmt + m.HelpNonDirectDebitTradeAmt + m.NotHelpNonDirectTradeAmt + m.NotHelpNonDirectDebitTradeAmt + m.ProfitNonDirectTradeAmt + m.ProfitNonDirectDebitTradeAmt);
-                }
-            }
-            // RedisDbconn.Instance.Set(key, amt);
-            db.Dispose();
-            return amt;
-        }
-        public decimal GetDateTradeForCloud(int UserId, string TradeDate, int QrPayFlag, string kind = "self")
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.TradeDaySummary.Any(m => m.UserId == UserId && m.QueryCount == QrPayFlag && m.TradeDate == TradeDate && m.SeoTitle == kind);
-            if (check)
-            {
-                if (kind == "self")
-                {
-                    amt = db.TradeDaySummary.Where(m => m.UserId == UserId && m.QueryCount == QrPayFlag && m.TradeDate == TradeDate && m.SeoTitle == kind).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt + m.ProfitDirectTradeAmt + m.ProfitDirectDebitTradeAmt);
-                }
-                else if (kind == "team")
-                {
-                    amt = db.TradeDaySummary.Where(m => m.UserId == UserId && m.QueryCount == QrPayFlag && m.TradeDate == TradeDate && m.SeoTitle == kind).Sum(m => m.HelpNonDirectTradeAmt + m.HelpNonDirectDebitTradeAmt + m.NotHelpNonDirectTradeAmt + m.NotHelpNonDirectDebitTradeAmt + m.ProfitNonDirectTradeAmt + m.ProfitNonDirectDebitTradeAmt);
-                }
-            }
-            // RedisDbconn.Instance.Set(key, amt);
-            db.Dispose();
-            return amt;
-        }
-        public decimal GetMonthTradeForCloud(int UserId, string TradeMonth, int QrPayFlag, string kind = "self")
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.TradeDaySummary.Any(m => m.UserId == UserId && m.QueryCount == QrPayFlag && m.TradeMonth == TradeMonth && m.
-            SeoTitle == kind);
-            if (check)
-            {
-                if (kind == "self")
-                {
-                    amt = db.TradeDaySummary.Where(m => m.UserId == UserId && m.QueryCount == QrPayFlag && m.TradeMonth == TradeMonth && m.SeoTitle == kind).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt + m.ProfitDirectTradeAmt + m.ProfitDirectDebitTradeAmt);
-                }
-                else if (kind == "team")
-                {
-                    amt = db.TradeDaySummary.Where(m => m.UserId == UserId && m.QueryCount == QrPayFlag && m.TradeMonth == TradeMonth && m.SeoTitle == kind).Sum(m => m.HelpNonDirectTradeAmt + m.HelpNonDirectDebitTradeAmt + m.NotHelpNonDirectTradeAmt + m.NotHelpNonDirectDebitTradeAmt + m.ProfitNonDirectTradeAmt + m.ProfitNonDirectDebitTradeAmt);
-                }
-            }
-            // RedisDbconn.Instance.Set(key, amt);
-            db.Dispose();
-            return amt;
-        }
-        #endregion
-
-    }
-}

+ 0 - 291
AppStart/Redis/Mysql/UserTradeDaySummaryVsDbconn.cs

@@ -1,291 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Library;
-using System.Linq;
-using System.Data;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class UserTradeDaySummaryVsDbconn
-    {
-        public readonly static UserTradeDaySummaryVsDbconn Instance = new UserTradeDaySummaryVsDbconn();
-        public UserTradeDaySummaryVsDbconn()
-        { }
-
-        //数据库链接
-        public string StatConn = Library.ConfigurationManager.AppSettings["TSqlConnStr"].ToString();
-
-        // TODO:读取很慢,感觉redis没生效
-
-        #region 获取单个字段
-        //个人业绩
-        public decimal GetTrade(int UserId, string kind = "self")
-        {
-            DataTable dt = CustomerSqlConn.dtable("", StatConn);
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.TradeDaySummary.Any(m => m.UserId == UserId && m.SeoTitle == kind);
-            if (check)
-            {
-                if (kind == "self")
-                {
-                    amt = db.TradeDaySummary.Where(m => m.UserId == UserId && m.SeoTitle == kind).Sum(m => m.HelpDirectTradeAmt + m.HelpDirectDebitTradeAmt + m.NotHelpDirectTradeAmt + m.NotHelpDirectDebitTradeAmt + m.ProfitDirectTradeAmt + m.ProfitDirectDebitTradeAmt);
-                }
-                else if (kind == "team")
-                {
-                    amt = db.TradeDaySummary.Where(m => m.UserId == UserId && m.SeoTitle == kind).Sum(m => m.HelpNonDirectTradeAmt + m.HelpNonDirectDebitTradeAmt + m.NotHelpNonDirectTradeAmt + m.NotHelpNonDirectDebitTradeAmt + m.ProfitNonDirectTradeAmt + m.ProfitNonDirectDebitTradeAmt);
-                }
-            }
-            // RedisDbconn.Instance.Set(key, amt);
-            db.Dispose();
-            return amt;
-        }
-        public decimal GetDateTrade(int UserId, string TradeDate, string kind = "self")
-        {
-            DataTable dt = new DataTable();
-            decimal amt = 0;
-            if (kind == "self")
-            {
-                dt = CustomerSqlConn.dtable("SELECT SUM(TradeAmount) TradeAmount FROM TradeStat" + TradeDate + " WHERE UserId=" + UserId + " AND DirectFlag=1", StatConn);
-                foreach (DataRow item in dt.Rows)
-                {
-                    amt = decimal.Parse(function.CheckNum(item["TradeAmount"].ToString()));
-                }
-            }
-            else if (kind == "team")
-            {
-                dt = CustomerSqlConn.dtable("SELECT SUM(TradeAmount) TradeAmount FROM TradeStat" + TradeDate + " WHERE UserId=" + UserId + " AND DirectFlag=0", StatConn);
-                foreach (DataRow item in dt.Rows)
-                {
-                    amt = decimal.Parse(function.CheckNum(item["TradeAmount"].ToString()));
-                }
-            }
-            // RedisDbconn.Instance.Set(key, amt);
-            return amt;
-        }
-        public decimal GetMonthTrade(int UserId, string TradeMonth, string kind = "self")
-        {
-            DataTable dt = new DataTable();
-            decimal amt = 0;
-            if (kind == "self")
-            {
-                dt = CustomerSqlConn.dtable("SELECT SUM(TradeAmount) TradeAmount FROM TradeStat" + TradeMonth + " WHERE UserId=" + UserId + " AND DirectFlag=1", StatConn);
-                foreach (DataRow item in dt.Rows)
-                {
-                    amt = decimal.Parse(function.CheckNum(item["TradeAmount"].ToString()));
-                }
-            }
-            else if (kind == "team")
-            {
-                dt = CustomerSqlConn.dtable("SELECT SUM(TradeAmount) TradeAmount FROM TradeStat" + TradeMonth + " WHERE UserId=" + UserId + " AND DirectFlag=0", StatConn);
-                foreach (DataRow item in dt.Rows)
-                {
-                    amt = decimal.Parse(function.CheckNum(item["TradeAmount"].ToString()));
-                }
-            }
-
-            // RedisDbconn.Instance.Set(key, amt);
-            return amt;
-        }
-        public decimal GetDateTradeForBrand(int UserId, string TradeDate, int BrandId, string kind = "self")
-        {
-            DataTable dt = new DataTable();
-            decimal amt = 0;
-            if (kind == "self")
-            {
-                dt = CustomerSqlConn.dtable("SELECT SUM(TradeAmount) TradeAmount FROM TradeStat" + TradeDate + " WHERE UserId=" + UserId + " AND DirectFlag=1 AND BrandId=" + BrandId + "", StatConn);
-                foreach (DataRow item in dt.Rows)
-                {
-                    amt = decimal.Parse(function.CheckNum(item["TradeAmount"].ToString()));
-                }
-            }
-            else if (kind == "team")
-            {
-                dt = CustomerSqlConn.dtable("SELECT SUM(TradeAmount) TradeAmount FROM TradeStat" + TradeDate + " WHERE UserId=" + UserId + " AND DirectFlag=0 AND BrandId=" + BrandId + "", StatConn);
-                foreach (DataRow item in dt.Rows)
-                {
-                    amt = decimal.Parse(function.CheckNum(item["TradeAmount"].ToString()));
-                }
-            }
-            // RedisDbconn.Instance.Set(key, amt);
-            return amt;
-        }
-        public decimal GetMonthTradeForBrand(int UserId, string TradeMonth, int BrandId, string kind = "self")
-        {
-            DataTable dt = new DataTable();
-            decimal amt = 0;
-            if (kind == "self")
-            {
-                dt = CustomerSqlConn.dtable("SELECT SUM(TradeAmount) TradeAmount FROM TradeStat" + TradeMonth + " WHERE UserId=" + UserId + " AND DirectFlag=1 AND BrandId=" + BrandId + "", StatConn);
-                foreach (DataRow item in dt.Rows)
-                {
-                    amt = decimal.Parse(function.CheckNum(item["TradeAmount"].ToString()));
-                }
-            }
-            else if (kind == "team")
-            {
-                dt = CustomerSqlConn.dtable("SELECT SUM(TradeAmount) TradeAmount FROM TradeStat" + TradeMonth + " WHERE UserId=" + UserId + " AND DirectFlag=0 AND BrandId=" + BrandId + "", StatConn);
-                foreach (DataRow item in dt.Rows)
-                {
-                    amt = decimal.Parse(function.CheckNum(item["TradeAmount"].ToString()));
-                }
-            }
-            // RedisDbconn.Instance.Set(key, amt);
-            return amt;
-        }
-        public decimal GetDateTradeForCloud(int UserId, string TradeDate, int QrPayFlag, string kind = "self")
-        {
-            DataTable dt = new DataTable();
-            decimal amt = 0;
-            if (kind == "self")
-            {
-                dt = CustomerSqlConn.dtable("SELECT SUM(QrTradeAmount) TradeAmount FROM TradeStat" + TradeDate + " WHERE UserId=" + UserId + " AND DirectFlag=1", StatConn);
-                foreach (DataRow item in dt.Rows)
-                {
-                    amt = decimal.Parse(function.CheckNum(item["TradeAmount"].ToString()));
-                }
-            }
-            else if (kind == "team")
-            {
-                dt = CustomerSqlConn.dtable("SELECT SUM(QrTradeAmount) TradeAmount FROM TradeStat" + TradeDate + " WHERE UserId=" + UserId + " AND DirectFlag=0", StatConn);
-                foreach (DataRow item in dt.Rows)
-                {
-                    amt = decimal.Parse(function.CheckNum(item["TradeAmount"].ToString()));
-                }
-            }
-            // RedisDbconn.Instance.Set(key, amt);
-            return amt;
-        }
-        public decimal GetMonthTradeForCloud(int UserId, string TradeMonth, int QrPayFlag, string kind = "self")
-        {
-            DataTable dt = new DataTable();
-            decimal amt = 0;
-            if (kind == "self")
-            {
-                dt = CustomerSqlConn.dtable("SELECT SUM(QrTradeAmount) TradeAmount FROM TradeStat" + TradeMonth + " WHERE UserId=" + UserId + " AND DirectFlag=1", StatConn);
-                foreach (DataRow item in dt.Rows)
-                {
-                    amt = decimal.Parse(function.CheckNum(item["TradeAmount"].ToString()));
-                }
-            }
-            else if (kind == "team")
-            {
-                dt = CustomerSqlConn.dtable("SELECT SUM(QrTradeAmount) TradeAmount FROM TradeStat" + TradeMonth + " WHERE UserId=" + UserId + " AND DirectFlag=0", StatConn);
-                foreach (DataRow item in dt.Rows)
-                {
-                    amt = decimal.Parse(function.CheckNum(item["TradeAmount"].ToString()));
-                }
-            }
-            // RedisDbconn.Instance.Set(key, amt);
-            return amt;
-        }
-
-
-        public decimal GetDateTradeForClouds(int UserId, string TradeDate, int QrPayFlag, int BankCardType, string kind = "self")
-        {
-            DataTable dt = new DataTable();
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.TradeDaySummary.Any(m => m.UserId == UserId && m.QueryCount == QrPayFlag && m.TradeDate == TradeDate && m.
-            SeoTitle == kind);
-            if (check)
-            {
-                if (kind == "self")
-                {
-                    if (BankCardType == 0)
-                    {
-                        amt = db.TradeDaySummary.Where(m => m.UserId == UserId && m.QueryCount == QrPayFlag && m.TradeDate == TradeDate && m.SeoTitle == kind).Sum(m => m.HelpDirectDebitTradeAmt + m.NotHelpDirectDebitTradeAmt + m.ProfitDirectDebitTradeAmt);
-                        dt = CustomerSqlConn.dtable("SELECT SUM(DebitTradeAmount) TradeAmount FROM TradeStat" + TradeDate + " WHERE UserId=" + UserId + " AND DirectFlag=1", StatConn);
-                        foreach (DataRow item in dt.Rows)
-                        {
-                            amt = decimal.Parse(function.CheckNum(item["TradeAmount"].ToString()));
-                        }
-                    }
-                    else
-                    {
-                        amt = db.TradeDaySummary.Where(m => m.UserId == UserId && m.QueryCount == QrPayFlag && m.TradeDate == TradeDate && m.SeoTitle == kind).Sum(m => m.HelpDirectTradeAmt + m.NotHelpDirectTradeAmt + m.ProfitDirectTradeAmt);
-                        dt = CustomerSqlConn.dtable("SELECT SUM(CreditTradeAmount) TradeAmount FROM TradeStat" + TradeDate + " WHERE UserId=" + UserId + " AND DirectFlag=1", StatConn);
-                        foreach (DataRow item in dt.Rows)
-                        {
-                            amt = decimal.Parse(function.CheckNum(item["TradeAmount"].ToString()));
-                        }
-                    }
-                }
-                else if (kind == "team")
-                {
-                    if (BankCardType == 0)
-                    {
-                        amt = db.TradeDaySummary.Where(m => m.UserId == UserId && m.QueryCount == QrPayFlag && m.TradeDate == TradeDate && m.SeoTitle == kind).Sum(m => m.HelpNonDirectDebitTradeAmt + m.NotHelpNonDirectDebitTradeAmt + m.ProfitNonDirectDebitTradeAmt);
-                        dt = CustomerSqlConn.dtable("SELECT SUM(DebitTradeAmount) TradeAmount FROM TradeStat" + TradeDate + " WHERE UserId=" + UserId + " AND DirectFlag=0", StatConn);
-                        foreach (DataRow item in dt.Rows)
-                        {
-                            amt = decimal.Parse(function.CheckNum(item["TradeAmount"].ToString()));
-                        }
-                    }
-                    else
-                    {
-                        amt = db.TradeDaySummary.Where(m => m.UserId == UserId && m.QueryCount == QrPayFlag && m.TradeDate == TradeDate && m.SeoTitle == kind).Sum(m => m.HelpNonDirectTradeAmt + m.NotHelpNonDirectTradeAmt + m.ProfitNonDirectTradeAmt);
-                        dt = CustomerSqlConn.dtable("SELECT SUM(CreditTradeAmount) TradeAmount FROM TradeStat" + TradeDate + " WHERE UserId=" + UserId + " AND DirectFlag=0", StatConn);
-                        foreach (DataRow item in dt.Rows)
-                        {
-                            amt = decimal.Parse(function.CheckNum(item["TradeAmount"].ToString()));
-                        }
-                    }
-                }
-            }
-            // RedisDbconn.Instance.Set(key, amt);
-            db.Dispose();
-            return amt;
-        }
-
-
-        public decimal GetMonthTradeForClouds(int UserId, string TradeMonth, int QrPayFlag, int BankCardType, string kind = "self")
-        {
-            DataTable dt = new DataTable();
-            decimal amt = 0;
-            if (kind == "self")
-            {
-                if (BankCardType == 0)
-                {
-                    dt = CustomerSqlConn.dtable("SELECT SUM(DebitTradeAmount) TradeAmount FROM TradeStat" + TradeMonth + " WHERE UserId=" + UserId + " AND DirectFlag=1", StatConn);
-                    foreach (DataRow item in dt.Rows)
-                    {
-                        amt = decimal.Parse(function.CheckNum(item["TradeAmount"].ToString()));
-                    }
-                }
-                else
-                {
-                    dt = CustomerSqlConn.dtable("SELECT SUM(CreditTradeAmount) TradeAmount FROM TradeStat" + TradeMonth + " WHERE UserId=" + UserId + " AND DirectFlag=1", StatConn);
-                    foreach (DataRow item in dt.Rows)
-                    {
-                        amt = decimal.Parse(function.CheckNum(item["TradeAmount"].ToString()));
-                    }
-                }
-            }
-            else if (kind == "team")
-            {
-                if (BankCardType == 0)
-                {
-                    dt = CustomerSqlConn.dtable("SELECT SUM(DebitTradeAmount) TradeAmount FROM TradeStat" + TradeMonth + " WHERE UserId=" + UserId + " AND DirectFlag=0", StatConn);
-                    foreach (DataRow item in dt.Rows)
-                    {
-                        amt = decimal.Parse(function.CheckNum(item["TradeAmount"].ToString()));
-                    }
-                }
-                else
-                {
-                    dt = CustomerSqlConn.dtable("SELECT SUM(CreditTradeAmount) TradeAmount FROM TradeStat" + TradeMonth + " WHERE UserId=" + UserId + " AND DirectFlag=0", StatConn);
-                    foreach (DataRow item in dt.Rows)
-                    {
-                        amt = decimal.Parse(function.CheckNum(item["TradeAmount"].ToString()));
-                    }
-                }
-            }
-            // RedisDbconn.Instance.Set(key, amt);
-            return amt;
-        }
-        #endregion
-
-    }
-}

+ 0 - 163
AppStart/Redis/Mysql/UserTradeStat.cs

@@ -1,163 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Library;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class UserTradeStat
-    {
-        public readonly static UserTradeStat Instance = new UserTradeStat();
-        public UserTradeStat()
-        { }
-
-
-        public decimal Amount(int UserId, string DateOrMonth, string kind = "self")
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            if(DateOrMonth.Length == 8)
-            {
-                bool check = db.UserAmountSummary.Any(m => m.UserId == UserId && m.TradeDate == DateOrMonth && m.SeoTitle == kind);
-                if (check)
-                {
-                    amt = db.UserAmountSummary.Where(m => m.UserId == UserId && m.TradeDate == DateOrMonth && m.SeoTitle == kind).Sum(m => m.TotalAmount);
-                }
-            }
-            else
-            {
-                bool check = db.UserAmountSummary.Any(m => m.UserId == UserId && m.TradeMonth == DateOrMonth && m.SeoTitle == kind);
-                if (check)
-                {
-                    amt = db.UserAmountSummary.Where(m => m.UserId == UserId && m.TradeMonth == DateOrMonth && m.SeoTitle == kind).Sum(m => m.TotalAmount);
-                }
-            }
-            db.Dispose();
-            return amt;
-        }
-
-        public int Count(int UserId, string DateOrMonth, string kind = "self")
-        {
-            int amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            if(DateOrMonth.Length == 8)
-            {
-                bool check = db.UserAmountSummary.Any(m => m.UserId == UserId && m.TradeDate == DateOrMonth && m.SeoTitle == kind);
-                if (check)
-                {
-                    amt = db.UserAmountSummary.Where(m => m.UserId == UserId && m.TradeDate == DateOrMonth && m.SeoTitle == kind).Sum(m => m.TradeCount);
-                }
-            }
-            else
-            {
-                bool check = db.UserAmountSummary.Any(m => m.UserId == UserId && m.TradeMonth == DateOrMonth && m.SeoTitle == kind);
-                if (check)
-                {
-                    amt = db.UserAmountSummary.Where(m => m.UserId == UserId && m.TradeMonth == DateOrMonth && m.SeoTitle == kind).Sum(m => m.TradeCount);
-                }
-            }
-            db.Dispose();
-            return amt;
-        }
-
-
-        public decimal Amount(int UserId, string DateOrMonth, int PayMode, string kind = "self")
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            if(DateOrMonth.Length == 8)
-            {
-                bool check = db.UserAmountSummary.Any(m => m.UserId == UserId && m.PayMode == PayMode && m.TradeDate == DateOrMonth && m.SeoTitle == kind);
-                if (check)
-                {
-                    amt = db.UserAmountSummary.Where(m => m.UserId == UserId && m.PayMode == PayMode && m.TradeDate == DateOrMonth && m.SeoTitle == kind).Sum(m => m.TotalAmount);
-                }
-            }
-            else
-            {
-                bool check = db.UserAmountSummary.Any(m => m.UserId == UserId && m.PayMode == PayMode && m.TradeMonth == DateOrMonth && m.SeoTitle == kind);
-                if (check)
-                {
-                    amt = db.UserAmountSummary.Where(m => m.UserId == UserId && m.PayMode == PayMode && m.TradeMonth == DateOrMonth && m.SeoTitle == kind).Sum(m => m.TotalAmount);
-                }
-            }
-            db.Dispose();
-            return amt;
-        }
-
-        public int Count(int UserId, string DateOrMonth, int PayMode, string kind = "self")
-        {
-            int amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            if(DateOrMonth.Length == 8)
-            {
-                bool check = db.UserAmountSummary.Any(m => m.UserId == UserId && m.PayMode == PayMode && m.TradeDate == DateOrMonth && m.SeoTitle == kind);
-                if (check)
-                {
-                    amt = db.UserAmountSummary.Where(m => m.UserId == UserId && m.PayMode == PayMode && m.TradeDate == DateOrMonth && m.SeoTitle == kind).Sum(m => m.TradeCount);
-                }
-            }
-            else
-            {
-                bool check = db.UserAmountSummary.Any(m => m.UserId == UserId && m.PayMode == PayMode && m.TradeMonth == DateOrMonth && m.SeoTitle == kind);
-                if (check)
-                {
-                    amt = db.UserAmountSummary.Where(m => m.UserId == UserId && m.PayMode == PayMode && m.TradeMonth == DateOrMonth && m.SeoTitle == kind).Sum(m => m.TradeCount);
-                }
-            }
-            db.Dispose();
-            return amt;
-        }
-
-
-        public decimal Amount(int UserId, string DateOrMonth, int PayMode, int IsAct, string kind = "self")
-        {
-            decimal amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            if(DateOrMonth.Length == 8)
-            {
-                bool check = db.UserAmountSummary.Any(m => m.UserId == UserId && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeDate == DateOrMonth && m.SeoTitle == kind);
-                if (check)
-                {
-                    amt = db.UserAmountSummary.Where(m => m.UserId == UserId && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeDate == DateOrMonth && m.SeoTitle == kind).Sum(m => m.TotalAmount);
-                }
-            }
-            else
-            {
-                bool check = db.UserAmountSummary.Any(m => m.UserId == UserId && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeMonth == DateOrMonth && m.SeoTitle == kind);
-                if (check)
-                {
-                    amt = db.UserAmountSummary.Where(m => m.UserId == UserId && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeMonth == DateOrMonth && m.SeoTitle == kind).Sum(m => m.TotalAmount);
-                }
-            }
-            db.Dispose();
-            return amt;
-        }
-
-        public int Count(int UserId, string DateOrMonth, int PayMode, int IsAct, string kind = "self")
-        {
-            int amt = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            if(DateOrMonth.Length == 8)
-            {
-                bool check = db.UserAmountSummary.Any(m => m.UserId == UserId && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeDate == DateOrMonth && m.SeoTitle == kind);
-                if (check)
-                {
-                    amt = db.UserAmountSummary.Where(m => m.UserId == UserId && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeDate == DateOrMonth && m.SeoTitle == kind).Sum(m => m.TradeCount);
-                }
-            }
-            else
-            {
-                bool check = db.UserAmountSummary.Any(m => m.UserId == UserId && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeMonth == DateOrMonth && m.SeoTitle == kind);
-                if (check)
-                {
-                    amt = db.UserAmountSummary.Where(m => m.UserId == UserId && m.PayMode == PayMode && m.IsAct == IsAct && m.TradeMonth == DateOrMonth && m.SeoTitle == kind).Sum(m => m.TradeCount);
-                }
-            }
-            db.Dispose();
-            return amt;
-        }
-
-    }
-}

+ 0 - 180
AppStart/Redis/Mysql/UserTradeStatDbconn.cs

@@ -1,180 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Library;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class UserTradeStatDbconn
-    {
-        public readonly static UserTradeStatDbconn Instance = new UserTradeStatDbconn();
-        public UserTradeStatDbconn()
-        { }
-
-        #region 获取单个字段
-        //个人业绩
-        public UserTradeData GetTradeByDate(int UserId, string TradeDate, string kind = "self")
-        {
-            string key = "UserTradeAmt:" + UserId + ":" + TradeDate + ":" + kind; //总交易
-            if (kind == "team")
-            {
-                key = "Team" + key;
-            }
-            UserTradeData obj = RedisDbconn.Instance.Get<UserTradeData>(key);
-            if (obj != null)
-            {
-                return obj;
-            }
-            obj = new UserTradeData();
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.UserTradeDaySummary.Any(m => m.UserId == UserId && m.SeoTitle == kind);
-            if (check)
-            {
-                List<UserTradeDaySummary> data = db.UserTradeDaySummary.Where(m => m.UserId == UserId && m.TradeDate == TradeDate && m.SeoTitle == kind).ToList();
-                if (kind == "self")
-                {
-                    obj.TotalAmt = data.Sum(m => m.DirectTradeAmt + m.DirectDebitTradeAmt);
-                    if (data.Where(m => m.QueryCount == 0).Count() > 0)
-                    {
-                        obj.PosAmt = data.Where(m => m.QueryCount == 0).Sum(m => m.DirectTradeAmt + m.DirectDebitTradeAmt);
-                    }
-                    else if (data.Where(m => m.QueryCount == 1).Count() > 0)
-                    {
-                        obj.QrAmt = data.Where(m => m.QueryCount == 1).Sum(m => m.DirectTradeAmt + m.DirectDebitTradeAmt);
-                    }
-                    obj.Brands = new List<Brand>();
-                    foreach (UserTradeDaySummary sub in data.OrderBy(m => m.BrandId).ToList())
-                    {
-                        if (obj.Brands.FirstOrDefault(m => m.Id == sub.BrandId) == null)
-                        {
-                            obj.Brands.Add(new Brand()
-                            {
-                                Id = sub.BrandId,
-                                Amt = sub.DirectTradeAmt + sub.DirectDebitTradeAmt,
-                            });
-                        }
-                        else
-                        {
-                            obj.Brands.FirstOrDefault(m => m.Id == sub.BrandId).Amt += sub.DirectTradeAmt + sub.DirectDebitTradeAmt;
-                        }
-                    }
-                }
-                else if (kind == "team")
-                {
-                    obj.TotalAmt = data.Sum(m => m.NonDirectTradeAmt + m.NonDirectDebitTradeAmt);
-                    if (data.Where(m => m.QueryCount == 0).Count() > 0)
-                    {
-                        obj.PosAmt = data.Where(m => m.QueryCount == 0).Sum(m => m.NonDirectTradeAmt + m.NonDirectDebitTradeAmt);
-                    }
-                    else if (data.Where(m => m.QueryCount == 1).Count() > 0)
-                    {
-                        obj.QrAmt = data.Where(m => m.QueryCount == 1).Sum(m => m.NonDirectTradeAmt + m.NonDirectDebitTradeAmt);
-                    }
-                    obj.Brands = new List<Brand>();
-                    foreach (UserTradeDaySummary sub in data.OrderBy(m => m.BrandId).ToList())
-                    {
-                        if (obj.Brands.FirstOrDefault(m => m.Id == sub.BrandId) == null)
-                        {
-                            obj.Brands.Add(new Brand()
-                            {
-                                Id = sub.BrandId,
-                                Amt = sub.NonDirectTradeAmt + sub.NonDirectDebitTradeAmt,
-                            });
-                        }
-                        else
-                        {
-                            obj.Brands.FirstOrDefault(m => m.Id == sub.BrandId).Amt += sub.NonDirectTradeAmt + sub.NonDirectDebitTradeAmt;
-                        }
-                    }
-                }
-            }
-            RedisDbconn.Instance.Set(key, obj);
-            db.Dispose();
-            return obj;
-        }
-
-        public UserTradeData GetTradeByMonth(int UserId, string TradeMonth, string kind = "self")
-        {
-            string key = "UserTradeAmt:" + UserId + ":" + TradeMonth + ":" + kind; //总交易
-            if (kind == "team")
-            {
-                key = "Team" + key;
-            }
-            UserTradeData obj = RedisDbconn.Instance.Get<UserTradeData>(key);
-            if (obj != null)
-            {
-                return obj;
-            }
-            obj = new UserTradeData();
-            WebCMSEntities db = new WebCMSEntities();
-            bool check = db.UserTradeDaySummary.Any(m => m.UserId == UserId && m.SeoTitle == kind);
-            if (check)
-            {
-                List<UserTradeDaySummary> data = db.UserTradeDaySummary.Where(m => m.UserId == UserId && m.TradeMonth == TradeMonth && m.SeoTitle == kind).ToList();
-                if (kind == "self")
-                {
-                    obj.TotalAmt = data.Sum(m => m.DirectTradeAmt + m.DirectDebitTradeAmt);
-                    if (data.Where(m => m.QueryCount == 0).Count() > 0)
-                    {
-                        obj.PosAmt = data.Where(m => m.QueryCount == 0).Sum(m => m.DirectTradeAmt + m.DirectDebitTradeAmt);
-                    }
-                    else if (data.Where(m => m.QueryCount == 1).Count() > 0)
-                    {
-                        obj.QrAmt = data.Where(m => m.QueryCount == 1).Sum(m => m.DirectTradeAmt + m.DirectDebitTradeAmt);
-                    }
-                    obj.Brands = new List<Brand>();
-                    foreach (UserTradeDaySummary sub in data.OrderBy(m => m.BrandId).ToList())
-                    {
-                        if (obj.Brands.FirstOrDefault(m => m.Id == sub.BrandId) == null)
-                        {
-                            obj.Brands.Add(new Brand()
-                            {
-                                Id = sub.BrandId,
-                                Amt = sub.DirectTradeAmt + sub.DirectDebitTradeAmt,
-                            });
-                        }
-                        else
-                        {
-                            obj.Brands.FirstOrDefault(m => m.Id == sub.BrandId).Amt += sub.DirectTradeAmt + sub.DirectDebitTradeAmt;
-                        }
-                    }
-                }
-                else if (kind == "team")
-                {
-                    obj.TotalAmt = data.Sum(m => m.NonDirectTradeAmt + m.NonDirectDebitTradeAmt);
-                    if (data.Where(m => m.QueryCount == 0).Count() > 0)
-                    {
-                        obj.PosAmt = data.Where(m => m.QueryCount == 0).Sum(m => m.NonDirectTradeAmt + m.NonDirectDebitTradeAmt);
-                    }
-                    else if (data.Where(m => m.QueryCount == 1).Count() > 0)
-                    {
-                        obj.QrAmt = data.Where(m => m.QueryCount == 1).Sum(m => m.NonDirectTradeAmt + m.NonDirectDebitTradeAmt);
-                    }
-                    obj.Brands = new List<Brand>();
-                    foreach (UserTradeDaySummary sub in data.OrderBy(m => m.BrandId).ToList())
-                    {
-                        if (obj.Brands.FirstOrDefault(m => m.Id == sub.BrandId) == null)
-                        {
-                            obj.Brands.Add(new Brand()
-                            {
-                                Id = sub.BrandId,
-                                Amt = sub.NonDirectTradeAmt + sub.NonDirectDebitTradeAmt,
-                            });
-                        }
-                        else
-                        {
-                            obj.Brands.FirstOrDefault(m => m.Id == sub.BrandId).Amt += sub.NonDirectTradeAmt + sub.NonDirectDebitTradeAmt;
-                        }
-                    }
-                }
-            }
-            RedisDbconn.Instance.Set(key, obj);
-            db.Dispose();
-            return obj;
-        }
-        
-        #endregion
-
-    }
-}

+ 0 - 97
AppStart/Redis/Mysql/UsersDbconn.cs

@@ -1,97 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Library;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class UsersDbconn
-    {
-        public readonly static UsersDbconn Instance = new UsersDbconn();
-
-        #region 获取单个字段
-        public Users Get(int Id)
-        {
-            WebCMSEntities db = new WebCMSEntities();
-            Users order = db.Users.FirstOrDefault(m => m.Id == Id);
-            if (order != null)
-            {
-            }
-            db.Dispose();
-            return order;
-        }
-        //个人新增创客
-        public int GetNewUserCount(int UserId, string TradeMonthOrDate = "")
-        {
-            int count = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            if(string.IsNullOrEmpty(TradeMonthOrDate))
-            {
-                bool check = db.PullnewSummary.Any(m => m.UserId == UserId && m.SeoTitle == "self");
-                if (check)
-                {
-                    count = db.PullnewSummary.Where(m => m.UserId == UserId && m.SeoTitle == "self").Sum(m => m.RecUserAuthNum);
-                }
-            }
-            else
-            {
-                if(TradeMonthOrDate.Length == 8)
-                {
-                    bool check = db.PullnewSummary.Any(m => m.UserId == UserId && m.StatDate == TradeMonthOrDate && m.SeoTitle == "self");
-                    if (check)
-                    {
-                        count = db.PullnewSummary.Where(m => m.UserId == UserId && m.StatDate == TradeMonthOrDate && m.SeoTitle == "self").Sum(m => m.RecUserAuthNum);
-                    }
-                }
-                else
-                {
-                    bool check = db.PullnewSummary.Any(m => m.UserId == UserId && m.StatMonth == TradeMonthOrDate && m.SeoTitle == "self");
-                    if (check)
-                    {
-                        count = db.PullnewSummary.Where(m => m.UserId == UserId && m.StatMonth == TradeMonthOrDate && m.SeoTitle == "self").Sum(m => m.RecUserAuthNum);
-                    }
-                }
-            }
-            db.Dispose();
-            return count;
-        }
-        //团队新增创客
-        public int GetTeamNewUserCount(int UserId, string TradeMonthOrDate = "")
-        {
-            int count = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            if(string.IsNullOrEmpty(TradeMonthOrDate))
-            {
-                bool check = db.PullnewSummary.Any(m => m.UserId == UserId && m.SeoTitle == "team");
-                if (check)
-                {
-                    count = db.PullnewSummary.Where(m => m.UserId == UserId && m.SeoTitle == "team").Sum(m => m.RecUserAuthNum);
-                }
-            }
-            else
-            {
-                if(TradeMonthOrDate.Length == 8)
-                {
-                    bool check = db.PullnewSummary.Any(m => m.UserId == UserId && m.StatDate == TradeMonthOrDate && m.SeoTitle == "team");
-                    if (check)
-                    {
-                        count = db.PullnewSummary.Where(m => m.UserId == UserId && m.StatDate == TradeMonthOrDate && m.SeoTitle == "team").Sum(m => m.RecUserAuthNum);
-                    }
-                }
-                else
-                {
-                    bool check = db.PullnewSummary.Any(m => m.UserId == UserId && m.StatMonth == TradeMonthOrDate && m.SeoTitle == "team");
-                    if (check)
-                    {
-                        count = db.PullnewSummary.Where(m => m.UserId == UserId && m.StatMonth == TradeMonthOrDate && m.SeoTitle == "team").Sum(m => m.RecUserAuthNum);
-                    }
-                }
-            }
-            db.Dispose();
-            return count;
-        }
-        #endregion
-
-    }
-}

+ 0 - 112
AppStart/Redis/Mysql/UsersDbconnOld.cs

@@ -1,112 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Library;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class UsersDbconnOld
-    {
-        public readonly static UsersDbconnOld Instance = new UsersDbconnOld();
-
-        #region 获取单个字段
-        public Users Get(int Id)
-        {
-            WebCMSEntities db = new WebCMSEntities();
-            Users order = db.Users.FirstOrDefault(m => m.Id == Id);
-            if (order != null)
-            {
-            }
-            db.Dispose();
-            return order;
-        }
-        //个人新增创客
-        public int GetNewUserCount(int UserId, string TradeMonth = "")
-        {
-            string key = "AddUser:" + UserId;
-            if (!string.IsNullOrEmpty(TradeMonth))
-            { 
-                key += ":" + TradeMonth;
-            }
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                int obj = RedisDbconn.Instance.Get<int>(key);
-                if (obj > 0)
-                {
-                    return obj;
-                }
-            }
-            int count = 0;
-            WebCMSEntities db = new WebCMSEntities();
-            if (!string.IsNullOrEmpty(TradeMonth))
-            {
-                if (TradeMonth.Length == 8)
-                {
-                    DateTime start = DateTime.Parse(TradeMonth.Substring(0, 4) + "-" + TradeMonth.Substring(4, 2) + "-" + TradeMonth.Substring(6, 2) + " 00:00:00");
-                    DateTime end = start.AddDays(1);
-                    count = db.Users.Count(m => m.ParentUserId == UserId && m.AuthDate >= start && m.AuthDate < end);
-                }
-                else
-                {
-                    DateTime start = DateTime.Parse(TradeMonth.Substring(0, 4) + "-" + TradeMonth.Substring(4, 2) + "-01 00:00:00");
-                    DateTime end = start.AddMonths(1);
-                    count = db.Users.Count(m => m.ParentUserId == UserId && m.AuthDate >= start && m.AuthDate < end);
-                }
-            }
-            else
-            { 
-                count = db.Users.Count(m => m.ParentUserId == UserId);
-            }
-            RedisDbconn.Instance.Set(key, count);
-            RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(100, 200));
-            db.Dispose();
-            return count;
-        }
-        //团队新增创客
-        public int GetTeamNewUserCount(int UserId, string TradeMonth = "")
-        {
-            string key = "TeamAddUser:" + UserId;
-            if (!string.IsNullOrEmpty(TradeMonth))
-            { 
-                key += ":" + TradeMonth;
-            }
-            if (RedisDbconn.Instance.Exists(key))
-            {
-                int obj = RedisDbconn.Instance.Get<int>(key);
-                if (obj > 0)
-                {
-                    return obj;
-                }
-            }
-            int count = 0;
-            string UserIdString = "," + UserId + ",";
-            WebCMSEntities db = new WebCMSEntities();
-            if (!string.IsNullOrEmpty(TradeMonth))
-            {
-                if (TradeMonth.Length == 8)
-                {
-                    DateTime start = DateTime.Parse(TradeMonth.Substring(0, 4) + "-" + TradeMonth.Substring(4, 2) + "-" + TradeMonth.Substring(6, 2) + " 00:00:00");
-                    DateTime end = start.AddDays(1);
-                    count = db.Users.Count(m => m.ParentNav.Contains(UserIdString) && m.AuthDate >= start && m.AuthDate < end);
-                }
-                else
-                {
-                    DateTime start = DateTime.Parse(TradeMonth.Substring(0, 4) + "-" + TradeMonth.Substring(4, 2) + "-01 00:00:00");
-                    DateTime end = start.AddMonths(1);
-                    count = db.Users.Count(m => m.ParentNav.Contains(UserIdString) && m.AuthDate >= start && m.AuthDate < end);
-                }
-            }
-            else
-            { 
-                count = db.Users.Count(m => m.ParentNav.Contains(UserIdString));
-            }
-            RedisDbconn.Instance.Set(key, count);
-            RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(100, 200));
-            db.Dispose();
-            return count;
-        }
-        #endregion
-
-    }
-}

+ 0 - 114
AppStart/RelationClass.cs

@@ -1,114 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using MySystem.MainModels;
-
-namespace MySystem
-{
-    public class RelationClass
-    {
-
-        public static string GetUserLevelSetInfo(int key)
-        {
-            UserLevelSet item = UserLevelSetDbconn.Instance.GetList().FirstOrDefault(m => m.Id == key);
-            if (item != null)
-            {
-                return item.Name;
-            }
-            return "K1";
-        }
-
-
-
-        public static string GetUsersInfo(int key)
-        {
-            Users item = UsersDbconn.Instance.Get(key) ?? new Users();
-            return item.RealName;
-        }
-
-        public static string GetConsumersInfo(int key)
-        {
-            Consumers item = ConsumersDbconn.Instance.Get(key) ?? new Consumers();
-            return item.NickName;
-        }
-
-
-        #region 获取产品名称
-        public static string GetKqProductBrandInfo(int key)
-        {
-            WebCMSEntities db = new WebCMSEntities();
-            KqProducts pro = db.KqProducts.FirstOrDefault(m => m.Id == key);
-            db.Dispose();
-            if (pro != null)
-            {
-                return pro.Name;
-            }
-            return "";
-        }
-        #endregion
-
-
-        #region 收支明细变动类型
-        public static string GetChangeTypeInfo(int key)
-        {
-            if (key == 1) return "达标奖励";
-            return "";
-        }
-        #endregion
-
-        #region 机具类型
-        public static string GetPosSnTypeInfo(int key)
-        {
-            if (key == 0) return "兑换码";
-            if (key == 1) return "循环码";
-            return "";
-        }
-        #endregion
-
-        #region 订单状态
-        public static string GetOrderStatusInfo(int key)
-        {
-            if (key == 0) return "待付款";
-            if (key == 1) return "待发货";
-            if (key == 2) return "已完成";
-            if (key == 3) return "已发货";
-            return "";
-        }
-        #endregion
-
-        #region 机具兑换申请状态
-        public static string GetMachineApplyStatusInfo(int key)
-        {
-            if (key == 0) return "待审核";
-            if (key == 1) return "申请成功";
-            if (key == 2) return "申请失败";
-            return "";
-        }
-        #endregion
-
-        #region 组队申请状态
-        public static string GetTeamOfferApplyStatusInfo(int key)
-        {
-            if (key == 0) return "待审核";
-            if (key == 1) return "审核通过";
-            if (key == 2) return "审核失败";
-            if (key == 3) return "组队成功";
-            if (key == 4) return "组队失败";
-            return "";
-        }
-        #endregion
-
-        #region 商户激活类型
-        public static string GetMerchantActTypeInfo(int key)
-        {
-            if (key == 0) return "正常激活";
-            if (key == 1) return "首次已激活MPOS";
-            if (key == 2) return "首次已激活KPOS";
-            if (key == 3) return "循环机划拨激活";
-            return "";
-        }
-        #endregion
-
-
-    }
-}

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

@@ -21,9 +21,7 @@ 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 Models.WebCMSEntities bsdb = new Models.WebCMSEntities();
         public OpModels.WebCMSEntities opdb = new OpModels.WebCMSEntities();
-        public KxsMainModels.WebCMSEntities kxsdb = new KxsMainModels.WebCMSEntities();
 
         public string ApiKey = "G6H7@J8%";
         public string Host = Library.ConfigurationManager.AppSettings["Host"].ToString();

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

@@ -6,7 +6,6 @@ using Microsoft.AspNetCore.Http;
 using Microsoft.Extensions.Logging;
 using Microsoft.Extensions.Options;
 using System.Web;
-using MySystem.Models;
 using MySystem.MainModels;
 using LitJson;
 using Library;

+ 0 - 1011
Areas/Api/Controllers/v1/MainServer/MerchantInfoController.cs

@@ -21,1016 +21,5 @@ namespace MySystem.Areas.Api.Controllers.v1
         {
         }
 
-
-
-
-
-        #region 首页-快联盟产品-我的业绩-团队业绩-商户列表
-        [Authorize]
-        public JsonResult TeamPerformanceMerchants(string value)
-        {
-            value = DesDecrypt(value);
-            JsonData data = JsonMapper.ToObject(value);
-            List<Dictionary<string, object>> dataList = TeamPerformanceMerchantsDo(value);
-            return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
-        }
-        public List<Dictionary<string, object>> TeamPerformanceMerchantsDo(string value)
-        {
-            JsonData data = JsonMapper.ToObject(value);
-            int UserId = int.Parse(function.CheckInt(data["UserId"].ToString())); //创客
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
-            List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
-            List<int> query = MerchantInfoDbconn.Instance.GetList(UserId, PageNum, PageSize);
-            foreach (int id in query)
-            {
-                MerchantInfo subdata = MerchantInfoDbconn.Instance.Get(id) ?? new MerchantInfo();
-                Dictionary<string, object> curData = new Dictionary<string, object>();
-                curData.Add("MerchantName", subdata.Name); //商户姓名
-                curData.Add("Id", subdata.Id); //Id
-                dataList.Add(curData);
-            }
-            return dataList;
-        }
-        #endregion
-
-
-
-
-        #region 创客-首页-商户签约
-        [Authorize]
-        public JsonResult ContractList(string value)
-        {
-            value = DesDecrypt(value);
-            JsonData data = JsonMapper.ToObject(value);
-            List<Dictionary<string, object>> dataList = ContractListDo(value);
-            return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
-        }
-        public List<Dictionary<string, object>> ContractListDo(string value)
-        {
-            JsonData data = JsonMapper.ToObject(value);
-            int UserId = int.Parse(function.CheckInt(data["UserId"].ToString())); //所属创客
-            string Status = data["Status"].ToString(); //签约状态
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
-            List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
-            List<int> query = MerchantInfoDbconn.Instance.GetList(UserId, PageNum, PageSize);
-            foreach (var id in query)
-            {
-                MerchantInfo subdata = MerchantInfoDbconn.Instance.Get(id) ?? new MerchantInfo();
-                Dictionary<string, object> curData = new Dictionary<string, object>();
-                curData.Add("Name", subdata.Name); //名称
-                curData.Add("Id", subdata.Id); //Id
-                curData.Add("CreateDate", subdata.CreateDate == null ? "" : subdata.CreateDate.Value.ToString("yyyy-MM-dd HH:mm:ss")); //CreateDate
-                curData.Add("Status", ""); //签约状态
-                curData.Add("MainType", ""); //主体类型
-                dataList.Add(curData);
-            }
-            return dataList;
-        }
-        #endregion
-
-
-
-        #region 创客-首页-商户签约-详情
-        [Authorize]
-        public JsonResult ContractDetail(string value)
-        {
-            value = DesDecrypt(value);
-            JsonData data = JsonMapper.ToObject(value);
-            Dictionary<string, object> Obj = ContractDetailDo(value);
-            return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
-        }
-        public Dictionary<string, object> ContractDetailDo(string value)
-        {
-            JsonData data = JsonMapper.ToObject(value);
-            Dictionary<string, object> Obj = new Dictionary<string, object>();
-            MerchantInfo query = new MerchantInfo();
-            int Id = int.Parse(function.CheckInt(data["Id"].ToString()));
-            query = MerchantInfoDbconn.Instance.Get(Id) ?? new MerchantInfo();
-            Obj.Add("Name", query.Name); //名称
-            Obj.Add("Status", ""); //签约状态
-            Obj.Add("Platforms", ""); //品台列表
-            Obj.Add("CreateDate", query.CreateDate); //创建时间
-            return Obj;
-        }
-        #endregion
-
-
-
-        #region 创客-首页-我的商户-商户列表
-        [Authorize]
-        public JsonResult MyMerchant(string value)
-        {
-            value = DesDecrypt(value);
-            JsonData data = JsonMapper.ToObject(value);
-            Dictionary<string, object> Other = new Dictionary<string, object>();
-            List<Dictionary<string, object>> dataList = MyMerchantDo(value, out Other);
-            return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList, Other = Other });
-        }
-        public List<Dictionary<string, object>> MyMerchantDo(string value, out Dictionary<string, object> Other)
-        {
-            JsonData data = JsonMapper.ToObject(value);
-            string SearchKey = data["SearchKey"].ToString(); //搜索关键词
-            int UserId = int.Parse(function.CheckInt(data["UserId"].ToString())); //创客
-            int ActiveStatus = int.Parse(function.CheckInt(data["ActiveStatus"].ToString())); //商户达标状态
-            int IsAct = int.Parse(function.CheckInt(data["IsAct"].ToString())); //激活状态(1 已激活 2 未激活)
-            int Kind = int.Parse(function.CheckInt(data["Kind"].ToString()));
-            string TradeSort = data["TradeSort"].ToString(); //排序
-            string DateSort = data["DateSort"].ToString(); //排序
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
-            List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
-            IQueryable<MerchantInfo> query = maindb.MerchantInfo.Where(m => m.UserId == UserId && (m.Status == 2 || m.QueryCount == 2));
-            DateTime today = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00");
-            if (!string.IsNullOrEmpty(SearchKey))
-            {
-                query = query.Where(m => m.Name.Contains(SearchKey));
-            }
-            if (Kind > 0)
-            {
-                string subjectType = "";
-                if (Kind == 1) subjectType = "SUBJECT_TYPE_INDIVIDUAL";
-                if (Kind == 2) subjectType = "SUBJECT_TYPE_ENTERPRISE";
-                if (Kind == 3) subjectType = "SUBJECT_TYPE_SMALL";
-                List<int> ids = maindb.MerchantAddInfo.Where(m => m.SubjectType == subjectType).ToList().Select(m => m.Id).ToList();
-                query = query.Where(m => ids.Contains(m.Id));
-            }
-            if (ActiveStatus > 0)
-            {
-                if (ActiveStatus == 2) ActiveStatus = 0;
-                query = query.Where(m => m.ActivationStatus == ActiveStatus);
-            }
-            int TotalCount = query.Count();
-            int IsActNum = query.Count(m => m.IsAct == 1);
-            int ProductCount = query.Count();
-            if (IsAct > 0)
-            {
-                if (IsAct == 2) IsAct = 0;
-                query = query.Where(m => m.IsAct == IsAct);
-            }
-            int ActCount = query.Count(m => m.ActivationDate == today);
-            int ProductActCount = query.Count(m => m.ActivationStatus == 1);
-            int ProductUnActCount = ProductCount - ProductActCount;
-            int UnActNum = ProductCount - IsActNum;
-            if (TradeSort == "1")
-            {
-                if (DateSort == "1")
-                {
-                    query = query.OrderBy(m => m.TotalAmount).ThenBy(m => m.CreateDate);
-                }
-                else
-                {
-                    query = query.OrderBy(m => m.TotalAmount).ThenByDescending(m => m.CreateDate);
-                }
-            }
-            else
-            {
-                if (DateSort == "1")
-                {
-                    query = query.OrderByDescending(m => m.TotalAmount).ThenBy(m => m.CreateDate);
-                }
-                else
-                {
-                    query = query.OrderByDescending(m => m.TotalAmount).ThenByDescending(m => m.CreateDate);
-                }
-            }
-            if (PageNum == 1)
-            {
-                query = query.Take(PageSize);
-            }
-            else
-            {
-                int skipNum = PageSize * (PageNum - 1);
-                query = query.Skip(skipNum).Take(PageSize);
-            }
-            foreach (var item in query.ToList())
-            {
-                Dictionary<string, object> curData = new Dictionary<string, object>();
-                curData.Add("MerchantName", item.Name); //商户姓名
-                curData.Add("KqRegTime", item.CreateDate == null ? "" : item.CreateDate.Value.ToString("yyyy-MM-dd")); //渠道注册时间
-                curData.Add("Id", item.Id); //Id
-                curData.Add("TotalAmount", item.TotalAmount.ToString("f2")); //交易额
-                curData.Add("TodayTrade", MerchantTradeStat.Instance.Amount(item.Id, DateTime.Now.ToString("yyyyMMdd")).ToString("f2")); //今日交易额
-                curData.Add("TradeCount", item.TotalConsumeCount); //交易笔数
-                curData.Add("TodayTradeCount", MerchantTradeStat.Instance.Count(item.Id, DateTime.Now.ToString("yyyyMMdd"))); //今日交易笔数
-                dataList.Add(curData);
-            }
-            Other = new Dictionary<string, object>();
-            Other.Add("TotalCount", TotalCount); //商户数
-            Other.Add("ActCount", ActCount); //商户达标数
-            Other.Add("UnActCount", ProductUnActCount); //未达标数
-            Other.Add("IsActNum", IsActNum); //商户激活数
-            Other.Add("UnActNum", UnActNum); //商户未激活数
-            return dataList;
-        }
-        #endregion
-
-
-
-        #region 创客-首页-我的商户-商户详情
-        [Authorize]
-        public JsonResult MyMerchantDetail(string value)
-        {
-            value = DesDecrypt(value);
-            JsonData data = JsonMapper.ToObject(value);
-            Dictionary<string, object> Obj = MyMerchantDetailDo(value);
-            return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
-        }
-        public Dictionary<string, object> MyMerchantDetailDo(string value)
-        {
-            JsonData data = JsonMapper.ToObject(value);
-            Dictionary<string, object> Obj = new Dictionary<string, object>();
-            int Id = int.Parse(function.CheckInt(data["Id"].ToString()));
-            MerchantInfo merchant = MerchantInfoDbconn.Instance.Get(Id) ?? new MerchantInfo();
-            MerchantAddInfo addinfo = MerchantAddInfoDbconn.Instance.Get(Id) ?? new MerchantAddInfo();
-            Obj.Add("MerchantName", merchant.Name); //商户名称
-            Obj.Add("LegalName", addinfo.CertLegalPerson); //企业法人
-            Obj.Add("MerchantMobile", addinfo.MobilePhone); //商户手机号
-            Obj.Add("SubjectType", addinfo.SubjectType); //主体类型
-            Obj.Add("CreateDate", merchant.CreateDate == null ? "" : merchant.CreateDate.Value.ToString("yyyy-MM-dd HH:mm:ss")); //注册时间
-            Obj.Add("ActivationDate", merchant.ActivationDate == null ? "" : merchant.ActivationDate.Value.ToString("yyyy-MM-dd HH:mm:ss")); //达标时间
-            Obj.Add("TotalAmount", merchant.TotalAmount.ToString("f2")); //总交易额
-            Obj.Add("ActivationStatus", merchant.ActivationStatus); //达标状态
-            Obj.Add("IsAct", merchant.IsAct); //是否激活(0 否 1 是)
-            if (merchant.IsAct == 1)
-            {
-                var orderInfo = maindb.MerchantDepositOrder.FirstOrDefault(m => m.Status > 0 && m.MerchantId == Id) ?? new MerchantDepositOrder();
-                var IsPay = 0;
-                if (orderInfo.Id > 0)
-                {
-                    IsPay = 1;
-                    Obj.Add("IsPay", IsPay); //是否缴纳服务费(0 否 1 是)
-                    Obj.Add("ActDate", orderInfo.UpdateDate.Value.ToString("yyyy-MM-dd HH:mm:ss")); //激活时间
-                }
-                else
-                {
-                    Obj.Add("IsPay", IsPay); //是否缴纳服务费(0 否 1 是)
-                    Obj.Add("ActDate", ""); //激活时间
-                }
-            }
-            return Obj;
-        }
-        #endregion
-
-
-
-        #region 创客-首页-我的商户-商户详情-交易统计
-        [Authorize]
-        public JsonResult MerchantTradeList(string value)
-        {
-            value = DesDecrypt(value);
-            JsonData data = JsonMapper.ToObject(value);
-            Dictionary<string, object> other = new Dictionary<string, object>();
-            List<Dictionary<string, object>> dataList = MerchantTradeListDo(value, out other);
-            return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList, Other = other });
-        }
-        public List<Dictionary<string, object>> MerchantTradeListDo(string value, out Dictionary<string, object> other)
-        {
-            JsonData data = JsonMapper.ToObject(value);
-            string TradeMonth = data["TradeMonth"].ToString(); //交易月
-            int MerchantId = int.Parse(function.CheckInt(data["MerchantId"].ToString())); //商户Id
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
-            List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
-            string limit = " limit " + PageSize;
-            if (PageNum > 1)
-            {
-                int skipNum = PageSize * (PageNum - 1);
-                limit = " limit " + skipNum + "," + PageSize;
-            }
-            DataTable dt = CustomerSqlConn.dtable("select TradeDate,sum(TradeAmount),sum(TradeCount),sum(if(IsAct=1, TradeAmount, 0)),sum(if(IsAct=0, TradeAmount, 0)) from MerchantAmountSummay where MerchantId=" + MerchantId + " and TradeMonth='" + TradeMonth + "' group by TradeDate order by TradeDate desc" + limit, AppConfig.Base.SqlConnStr);
-            foreach (DataRow dr in dt.Rows)
-            {
-                string TradeDate = dr["TradeDate"].ToString();
-                Dictionary<string, object> curData = new Dictionary<string, object>();
-                curData.Add("TradeDate", TradeDate.Substring(0, 4) + "-" + TradeDate.Substring(4, 2) + "-" + TradeDate.Substring(6, 2)); //交易日
-                curData.Add("TradeAmt", dr[1].ToString()); //交易金额
-                curData.Add("ActTradeAmt", dr[3].ToString()); //活动交易金额
-                curData.Add("UnActTradeAmt", dr[4].ToString()); //非活动交易金额
-                curData.Add("TradeCount", dr[2].ToString()); //交易笔数
-                dataList.Add(curData);
-            }
-            other = new Dictionary<string, object>();
-            if (PageNum == 1)
-            {
-                DataTable total = CustomerSqlConn.dtable("select sum(TradeAmount),sum(TradeCount),sum(if(IsAct=1, TradeAmount, 0)),sum(if(IsAct=0, TradeAmount, 0)) from MerchantAmountSummay where MerchantId=" + MerchantId + " and TradeMonth='" + TradeMonth + "'", AppConfig.Base.SqlConnStr);
-                decimal TradeAmt = 0;
-                decimal ActTradeAmt = 0;
-                decimal UnActTradeAmt = 0;
-                int TradeCount = 0;
-                if (total.Rows.Count > 0)
-                {
-                    TradeAmt = decimal.Parse(function.CheckNum(total.Rows[0][0].ToString())); //交易金额
-                    ActTradeAmt = decimal.Parse(function.CheckNum(total.Rows[0][2].ToString())); //活动交易金额
-                    UnActTradeAmt = decimal.Parse(function.CheckNum(total.Rows[0][3].ToString())); //非活动交易金额
-                    TradeCount = int.Parse(function.CheckNum(total.Rows[0][1].ToString())); //交易笔数
-                }
-                other.Add("TradeAmt", TradeAmt.ToString("f2")); //交易金额
-                other.Add("ActTradeAmt", ActTradeAmt.ToString("f2")); //活动交易金额
-                other.Add("UnActTradeAmt", UnActTradeAmt.ToString("f2")); //非活动交易金额
-                other.Add("TradeCount", TradeCount); //交易笔数
-            }
-            return dataList;
-        }
-        #endregion
-
-
-
-        #region 创客-首页-我的商户-商户详情-码牌
-        [Authorize]
-        public JsonResult QrCodeList(string value)
-        {
-            value = DesDecrypt(value);
-            JsonData data = JsonMapper.ToObject(value);
-            int TotalCount = 0;
-            List<Dictionary<string, object>> dataList = QrCodeListDo(value, out TotalCount);
-            return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList, Other = TotalCount });
-        }
-        public List<Dictionary<string, object>> QrCodeListDo(string value, out int TotalCount)
-        {
-            JsonData data = JsonMapper.ToObject(value);
-            int MerchantId = int.Parse(function.CheckInt(data["MerchantId"].ToString())); //商户Id
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
-            List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
-            IQueryable<MerchantQrCode> query = maindb.MerchantQrCode.Where(m => m.MerchantId == MerchantId && m.QueryCount == 1).OrderByDescending(m => m.Id);
-            TotalCount = query.Count();
-            if (PageNum == 1)
-            {
-                query = query.Take(PageSize);
-            }
-            else
-            {
-                int skipNum = PageSize * (PageNum - 1);
-                query = query.Skip(skipNum).Take(PageSize);
-            }
-            foreach (MerchantQrCode item in query.ToList())
-            {
-                Dictionary<string, object> curData = new Dictionary<string, object>();
-                curData.Add("SnNo", item.SnNo); //sn
-                curData.Add("TradeAmount", QrCodeTradeStat.Instance.Amount(item.SnNo).ToString("f2"));
-                dataList.Add(curData);
-            }
-            return dataList;
-        }
-        #endregion
-
-
-
-        #region 创客-首页-我的商户-商户详情-音响
-        // [Authorize]
-        public JsonResult QrCodeList2(string value)
-        {
-            value = DesDecrypt(value);
-            value = value.Replace("null", "\"\"");
-            JsonData data = JsonMapper.ToObject(value);
-            int TotalCount = 0;
-            List<Dictionary<string, object>> dataList = QrCodeList2Do(value, out TotalCount);
-            return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList, Other = TotalCount });
-        }
-        public List<Dictionary<string, object>> QrCodeList2Do(string value, out int TotalCount)
-        {
-            JsonData data = JsonMapper.ToObject(value);
-            int MerchantId = int.Parse(function.CheckInt(data["MerchantId"].ToString())); //商户Id
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
-            List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
-            IQueryable<MachineForQrCode> query = maindb.MachineForQrCode.Where(m => m.MerchantId == MerchantId && m.DataId.EndsWith("_1") && m.MachineSnNo != m.SnNo && !string.IsNullOrEmpty(m.MachineSnNo)).OrderByDescending(m => m.MerchantId);
-            TotalCount = query.Count();
-            if (PageNum == 1)
-            {
-                query = query.Take(PageSize);
-            }
-            else
-            {
-                int skipNum = PageSize * (PageNum - 1);
-                query = query.Skip(skipNum).Take(PageSize);
-            }
-            foreach (MachineForQrCode item in query.ToList())
-            {
-                Dictionary<string, object> curData = new Dictionary<string, object>();
-                curData.Add("SnNo", item.SnNo); //sn
-                curData.Add("TradeAmount", QrCodeTradeStat.Instance.Amount(item.SnNo).ToString("f2"));
-                curData.Add("BindTime", item.BindDate == null ? "" : item.BindDate.Value.ToString("yyyy-MM-dd HH:mm:ss"));
-                dataList.Add(curData);
-            }
-            return dataList;
-        }
-        #endregion
-
-
-
-
-        #region 首页-我的商户-商户搜索
-        [Authorize]
-        public JsonResult MerchantSearch(string value)
-        {
-            value = DesDecrypt(value);
-            JsonData data = JsonMapper.ToObject(value);
-            List<Dictionary<string, object>> dataList = MerchantSearchDo(value);
-            return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
-        }
-        public List<Dictionary<string, object>> MerchantSearchDo(string value)
-        {
-            JsonData data = JsonMapper.ToObject(value);
-            string SearchKey = data["SearchKey"].ToString(); //搜索关键词
-            int UserId = int.Parse(function.CheckInt(data["UserId"].ToString()));
-            // int ProductType = 1; //int.Parse(function.CheckInt(data["ProductType"].ToString()));
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
-            List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
-            IQueryable<MerchantInfo> query = maindb.MerchantInfo.Where(m => m.UserId == UserId);
-            if (!string.IsNullOrEmpty(SearchKey))
-            {
-                query = query.Where(m => m.Name.Contains(SearchKey));
-            }
-            if (PageNum == 1)
-            {
-                query = query.Take(PageSize);
-            }
-            else
-            {
-                int skipNum = PageSize * (PageNum - 1);
-                query = query.Skip(skipNum).Take(PageSize);
-            }
-            foreach (var item in query.ToList())
-            {
-                MerchantInfo subdata = MerchantInfoDbconn.Instance.Get(item.Id) ?? new MerchantInfo();
-                Dictionary<string, object> curData = new Dictionary<string, object>();
-                curData.Add("MerchantName", subdata.Name); //商户姓名
-                curData.Add("KqRegTime", subdata.CreateDate == null ? "" : subdata.CreateDate.Value.ToString("yyyy-MM-dd HH:mm:ss")); //渠道注册时间
-                curData.Add("Id", item.Id); //Id
-                curData.Add("ThisMonthTrade", item.TotalAmount); //当月交易额
-                dataList.Add(curData);
-            }
-            return dataList;
-        }
-        #endregion
-
-
-
-        #region 创客-首页-进件查询
-        [Authorize]
-        public JsonResult MerchantByStatus(string value)
-        {
-            value = DesDecrypt(value);
-            JsonData data = JsonMapper.ToObject(value);
-            List<Dictionary<string, object>> dataList = MerchantByStatusDo(value);
-            return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
-        }
-        public List<Dictionary<string, object>> MerchantByStatusDo(string value)
-        {
-            JsonData data = JsonMapper.ToObject(value);
-            string SearchKey = data["SearchKey"].ToString();
-            int Status = int.Parse(function.CheckInt(data["Status"].ToString()));
-            int UserId = int.Parse(function.CheckInt(data["UserId"].ToString())); //所属创客
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
-            List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
-            IQueryable<MerchantInfo> query = maindb.MerchantInfo.Where(m => m.UserId == UserId && m.Sort == 1);
-            if (Status > 0)
-            {
-                if (Status == 1) Status = 0;
-                if (Status == 2) Status = -1;
-                if (Status == 3) Status = 1;
-                if (Status == 4) Status = 2;
-                query = query.Where(m => m.Status == Status);
-            }
-            if (!string.IsNullOrEmpty(SearchKey))
-            {
-                query = query.Where(m => m.Name.Contains(SearchKey));
-            }
-            if (PageNum == 1)
-            {
-                query = query.Take(PageSize);
-            }
-            else
-            {
-                int skipNum = PageSize * (PageNum - 1);
-                query = query.Skip(skipNum).Take(PageSize);
-            }
-            foreach (var subdata in query.ToList())
-            {
-                MerchantAddInfo AddInfo = MerchantAddInfoDbconn.Instance.Get(subdata.Id) ?? new MerchantAddInfo();
-                Dictionary<string, object> curData = new Dictionary<string, object>();
-                curData.Add("Name", subdata.Name); //名称
-                curData.Add("Id", subdata.Id); //Id
-                curData.Add("CreateDate", subdata.CreateDate == null ? "" : subdata.CreateDate.Value.ToString("yyyy-MM-dd HH:mm:ss")); //CreateDate
-                curData.Add("Status", AddInfo.Status); //Status
-                curData.Add("MainType", AddInfo.SubjectType); //主体类型
-                dataList.Add(curData);
-            }
-            return dataList;
-        }
-        #endregion
-
-
-
-        #region 创客-首页-进件查询-详情
-        [Authorize]
-        public JsonResult MerchantDetailByStatus(string value)
-        {
-            value = DesDecrypt(value);
-            JsonData data = JsonMapper.ToObject(value);
-            Dictionary<string, object> Obj = MerchantDetailByStatusDo(value);
-            return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
-        }
-        public Dictionary<string, object> MerchantDetailByStatusDo(string value)
-        {
-            JsonData data = JsonMapper.ToObject(value);
-            Dictionary<string, object> Obj = new Dictionary<string, object>();
-            int Id = int.Parse(function.CheckInt(data["Id"].ToString()));
-            MerchantInfo query = MerchantInfoDbconn.Instance.Get(Id) ?? new MerchantInfo();
-            MerchantAddInfo addInfo = MerchantAddInfoDbconn.Instance.Get(Id) ?? new MerchantAddInfo();
-            Obj.Add("Name", query.Name); //名称
-            Obj.Add("CreateDate", query.CreateDate == null ? "" : query.CreateDate.Value.ToString("yyyy-MM-dd HH:mm:ss")); //提交时间
-            List<Dictionary<string, object>> AuditResult = new List<Dictionary<string, object>>();
-
-            Dictionary<string, object> WeChat = new Dictionary<string, object>();
-            WeChat.Add("Name", "微信");
-            WeChat.Add("Status", addInfo.Status);
-            WeChat.Add("DoTime", addInfo.UpdateDate == null ? "" : addInfo.UpdateDate.Value.ToString("yyyy-MM-dd HH:mm:ss"));
-            WeChat.Add("Season", addInfo.WeChatRemark);
-            WeChat.Add("SignUrl", addInfo.WeChatSignUrl);
-            AuditResult.Add(WeChat);
-
-            Dictionary<string, object> Alipay = new Dictionary<string, object>();
-            Alipay.Add("Name", "支付宝");
-            Alipay.Add("Status", addInfo.QueryCount);
-            Alipay.Add("DoTime", addInfo.UpdateDate == null ? "" : addInfo.UpdateDate.Value.ToString("yyyy-MM-dd HH:mm:ss"));
-            Alipay.Add("Season", addInfo.AlipayRemark);
-            Alipay.Add("SignUrl", function.CheckNull(addInfo.AlipaySignUrl).Replace("\\", ""));
-            AuditResult.Add(Alipay);
-
-            Obj.Add("Status", GetMainStatusName(addInfo.QueryCount, query.Status)); //状态
-            Obj.Add("AuditResult", AuditResult); //审核结果
-            Obj.Add("SubjectType", addInfo.SubjectType);
-            return Obj;
-        }
-        #endregion
-
-
-
-        #region 创客-首页-进件记录-删除
-        [Authorize]
-        public JsonResult Delete(string value)
-        {
-            value = DesDecrypt(value);
-            JsonData data = JsonMapper.ToObject(value);
-            AppResultJson result = DeleteDo(value);
-            return Json(new AppResultJson() { Status = result.Status, Info = result.Info, Data = result.Data });
-        }
-        public AppResultJson DeleteDo(string value)
-        {
-            JsonData data = JsonMapper.ToObject(value);
-            int Id = int.Parse(function.CheckInt(data["Id"].ToString()));
-            int UserId = int.Parse(function.CheckInt(data["UserId"].ToString())); //所属创客
-            Dictionary<string, object> Obj = new Dictionary<string, object>();
-            MerchantInfo edit = maindb.MerchantInfo.FirstOrDefault(m => m.Id == Id && m.UserId == UserId);
-            if (edit != null)
-            {
-                if (edit.Sort == 0 && edit.Status == 0 && edit.QueryCount == 0)
-                {
-
-                    maindb.MerchantInfo.Remove(edit);
-                    MerchantAddInfo editadd = maindb.MerchantAddInfo.FirstOrDefault(m => m.Id == Id);
-                    if (editadd != null)
-                    {
-                        maindb.MerchantAddInfo.Remove(editadd);
-                    }
-                    maindb.SaveChanges();
-                }
-                else
-                {
-                    return new AppResultJson() { Status = "-1", Info = "商户已进件签约,暂不支持删除", Data = Obj };
-                }
-            }
-            return new AppResultJson() { Status = "1", Info = "", Data = Obj };
-        }
-        #endregion
-
-
-
-        #region 创客-首页-暂存商户
-        [Authorize]
-        public JsonResult TmpMerchantList(string value)
-        {
-            value = DesDecrypt(value);
-            JsonData data = JsonMapper.ToObject(value);
-            List<Dictionary<string, object>> dataList = TmpMerchantListDo(value);
-            return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
-        }
-        public List<Dictionary<string, object>> TmpMerchantListDo(string value)
-        {
-            JsonData data = JsonMapper.ToObject(value);
-            int UserId = int.Parse(function.CheckInt(data["UserId"].ToString())); //所属创客
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
-            List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
-            IQueryable<MerchantInfo> query = maindb.MerchantInfo.Where(m => m.UserId == UserId && m.Sort == 0);
-            if (PageNum == 1)
-            {
-                query = query.Take(PageSize);
-            }
-            else
-            {
-                int skipNum = PageSize * (PageNum - 1);
-                query = query.Skip(skipNum).Take(PageSize);
-            }
-            foreach (var subdata in query.ToList())
-            {
-                Dictionary<string, object> curData = new Dictionary<string, object>();
-                curData.Add("Name", subdata.Name); //名称
-                curData.Add("Id", subdata.Id); //Id
-                curData.Add("CreateDate", subdata.CreateDate == null ? "" : subdata.CreateDate.Value.ToString("yyyy-MM-dd HH:mm:ss")); //CreateDate
-                curData.Add("SubjectType", 1); //主体类型
-                dataList.Add(curData);
-            }
-            return dataList;
-        }
-        #endregion
-
-
-
-        #region 商户-主界面统计数据
-        [Authorize]
-        [Route("/v1/workspace/indexstat")]
-        public JsonResult IndexStat(string value)
-        {
-            value = DesDecrypt(value);
-            JsonData data = JsonMapper.ToObject(value);
-            Dictionary<string, object> Obj = IndexStatDo(value);
-            return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
-        }
-        public Dictionary<string, object> IndexStatDo(string value)
-        {
-            JsonData data = JsonMapper.ToObject(value);
-            string TimeType = data["TimeType"].ToString(); //时间范围
-            Dictionary<string, object> Obj = new Dictionary<string, object>();
-            int Id = int.Parse(function.CheckInt(data["MerchantId"].ToString()));
-            decimal TotalAmount = 0;
-            decimal TotalOrder = 0;
-            int TotalUser = 0;
-            decimal TotalActual = 0;
-            DateTime Start = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00");
-            if (TimeType == "1")
-            {
-                Start = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00");
-            }
-            else if (TimeType == "2")
-            {
-                Start = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00").AddDays(-6);
-            }
-            else if (TimeType == "3")
-            {
-                Start = DateTime.Parse(DateTime.Now.ToString("yyyy-MM") + "-01 00:00:00");
-            }
-            while (Start <= DateTime.Now)
-            {
-                Dictionary<string, string> dic = new MerchantAmountSummayService().Sum("TradeAmount,TradeCount,TotalActual", " and MerchantId=" + Id + " and TradeDate='" + Start.ToString("yyyyMMdd") + "'");
-                TotalAmount += decimal.Parse(dic["TradeAmount"]);
-                TotalOrder += decimal.Parse(dic["TradeCount"]);
-                // TotalUser += query.TotalUser;
-                TotalActual += decimal.Parse(dic["TotalActual"]);
-                Start = Start.AddDays(1);
-            }
-            Obj.Add("TotalAmount", TotalAmount); //营总收益
-            Obj.Add("TotalOrder", TotalOrder); //累计订单
-            Obj.Add("TotalUser", TotalUser); //会员数
-            Obj.Add("TotalActual", TotalActual); //实收总额
-            MerchantInfo merchant = new MerchantInfoService().Query(Id);
-            decimal AllocationAmount = merchant.ActMaxAmount - merchant.ActCurrentAmount;
-            if (AllocationAmount < 0) AllocationAmount = 0;
-            Obj.Add("AllocationAmount", AllocationAmount); //未分配活动金额
-
-            return Obj;
-        }
-        #endregion
-
-
-
-        #region 商户-修改登录密码
-        [Authorize]
-        public JsonResult ModifyLoginPwd(string value)
-        {
-            value = DesDecrypt(value);
-            JsonData data = JsonMapper.ToObject(value);
-            AppResultJson result = ModifyLoginPwdDo(value);
-            return Json(new AppResultJson() { Status = result.Status, Info = result.Info, Data = result.Data });
-        }
-        public AppResultJson ModifyLoginPwdDo(string value)
-        {
-            JsonData data = JsonMapper.ToObject(value);
-            string LoginPwd = data["LoginPwd"].ToString(); //登录密码
-            string NewLoginPwd = data["NewLoginPwd"].ToString(); //新登录密码
-            Dictionary<string, object> Obj = new Dictionary<string, object>();
-            MerchantInfo query = new MerchantInfo();
-            int Id = int.Parse(function.CheckInt(data["Id"].ToString()));
-            query = MerchantInfoDbconn.Instance.Get(Id);
-            if (query != null)
-            {
-                query.UpdateDate = DateTime.Now; //修改时间
-                query.LoginPwd = LoginPwd; //登录密码
-            }
-            return new AppResultJson() { Status = "1", Info = "", Data = Obj };
-        }
-        #endregion
-
-
-
-        #region 商户-商户统计数据(个人中心主界面)
-        [Authorize]
-        public JsonResult StatData(string value)
-        {
-            value = DesDecrypt(value);
-            JsonData data = JsonMapper.ToObject(value);
-            Dictionary<string, object> Obj = StatDataDo(value);
-            return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
-        }
-        public Dictionary<string, object> StatDataDo(string value)
-        {
-            JsonData data = JsonMapper.ToObject(value);
-            Dictionary<string, object> Obj = new Dictionary<string, object>();
-            int Id = int.Parse(function.CheckInt(data["Id"].ToString()));
-            MerchantInfo query = MerchantInfoDbconn.Instance.Get(Id) ?? new MerchantInfo();
-            Obj.Add("Name", query.Name); //名称
-            Obj.Add("TotalAmount", query.TotalAmount.ToString("f2")); //营收总金额
-            Obj.Add("TotalActual", query.TotalActual.ToString("f2")); //实收总金额
-            Obj.Add("TotalOrder", query.TotalConsumeCount); //累计订单
-            Obj.Add("TotalCustomer", query.TotalCustomer); //累计客户
-            Obj.Add("Logo", DefaultPic(query.Logo)); //Logo图片
-            int ConsumeCount = 0;
-            decimal WeChatTotal = 0;
-            decimal AlipayTotal = 0;
-            for (int i = 0; i < 7; i++)
-            {
-                string Date = DateTime.Now.AddDays(-i).ToString("yyyyMMdd");
-                // ConsumeCount += 0;
-                WeChatTotal += MerchantAmountSummary.Instance.GetActualTradeByMode(Id, 2, Date);
-                AlipayTotal += MerchantAmountSummary.Instance.GetActualTradeByMode(Id, 1, Date);
-            }
-            Obj.Add("SevenDayConsumer", ConsumeCount); //近7日新增会员
-            Obj.Add("WeChatTotal", WeChatTotal.ToString("f2")); //微信实收
-            Obj.Add("AlipayTotal", AlipayTotal.ToString("f2")); //支付宝实收
-            Obj.Add("CreateDate", query.CreateDate == null ? "" : query.CreateDate.Value.ToString("yyyy-MM-dd"));
-            string yesterday = DateTime.Now.AddDays(-1).ToString("yyyyMMdd");
-            Obj.Add("YesterDayActual", decimal.Parse(function.CheckNum(UserTradeDbconn.Instance.GetTrade(Id, yesterday, "InFactAmount")["InFactAmount"].ToString())).ToString("f2")); //昨日收入
-            Obj.Add("SettleAmount", ""); //待结算金额
-            return Obj;
-        }
-        #endregion
-
-
-
-        #region 商户-商户详情
-        [Authorize]
-        public JsonResult Detail(string value)
-        {
-            value = DesDecrypt(value);
-            JsonData data = JsonMapper.ToObject(value);
-            Dictionary<string, object> Obj = DetailDo(value);
-            return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
-        }
-        public Dictionary<string, object> DetailDo(string value)
-        {
-            JsonData data = JsonMapper.ToObject(value);
-            Dictionary<string, object> Obj = new Dictionary<string, object>();
-            int Id = int.Parse(function.CheckInt(data["Id"].ToString()));
-            MerchantInfo query = MerchantInfoDbconn.Instance.Get(Id) ?? new MerchantInfo();
-            MerchantAddInfo merchantAddInfo = maindb.MerchantAddInfo.FirstOrDefault(m => m.Id == Id) ?? new MerchantAddInfo();
-            Obj.Add("Name", query.Name); //名称
-            Obj.Add("Mobile", query.Mobile); //手机号
-            Obj.Add("IsAuth", query.IsAuth); //是否认证
-            Obj.Add("Logo", DefaultPic(query.Logo)); //Logo图片
-            Obj.Add("Status", GetMainStatusName(merchantAddInfo.QueryCount, merchantAddInfo.Status));
-            Obj.Add("AlipayStatus", merchantAddInfo.QueryCount);
-            Obj.Add("WeChatStatus", merchantAddInfo.Status);
-            Obj.Add("CreateDate", query.CreateDate == null ? "" : query.CreateDate.Value.ToString("yyyy-MM-dd"));
-            Obj.Add("IsAct", query.IsAct); //是否激活(0 否 1 是)
-            if (query.IsAct == 1)
-            {
-                var orderInfo = maindb.MerchantDepositOrder.FirstOrDefault(m => m.Status > 0 && m.MerchantId == Id) ?? new MerchantDepositOrder();
-                var IsPay = 0;
-                if (orderInfo.Id > 0)
-                {
-                    IsPay = 1;
-                }
-                Obj.Add("IsPay", IsPay); //是否缴纳服务费(0 否 1 是)
-            }
-            return Obj;
-        }
-        private string GetMainStatusName(int AlipayStatus, int WeChatStatus)
-        {
-            if (AlipayStatus == 0 && WeChatStatus == 0) return "待审核";
-            if (AlipayStatus == 0 && WeChatStatus == -1) return "部分未通过";
-            if (AlipayStatus == -1 && WeChatStatus == 0) return "部分未通过";
-            if (AlipayStatus == 0 && WeChatStatus == 1) return "部分待签约";
-            if (AlipayStatus == 1 && WeChatStatus == 0) return "部分待签约";
-            if (AlipayStatus == 0 && WeChatStatus == 2) return "部分已通过";
-            if (AlipayStatus == 2 && WeChatStatus == 0) return "部分已通过";
-            if (AlipayStatus == -1 && WeChatStatus == -1) return "审核未通过";
-            if (AlipayStatus == -1 && WeChatStatus == 1) return "部分未通过";
-            if (AlipayStatus == 1 && WeChatStatus == -1) return "部分未通过";
-            if (AlipayStatus == -1 && WeChatStatus == 2) return "部分未通过";
-            if (AlipayStatus == 2 && WeChatStatus == -1) return "部分未通过";
-            if (AlipayStatus == 1 && WeChatStatus == 1) return "待签约";
-            if (AlipayStatus == 1 && WeChatStatus == 2) return "部分待签约";
-            if (AlipayStatus == 2 && WeChatStatus == 1) return "部分待签约";
-            if (AlipayStatus == 2 && WeChatStatus == 2) return "已通过";
-            return "";
-        }
-        private string GetStatusName(int WeChatStatus)
-        {
-            if (WeChatStatus == -1) return "审核未通过";
-            if (WeChatStatus == 0) return "待审核";
-            if (WeChatStatus == 1) return "待签约";
-            if (WeChatStatus == 2) return "已通过";
-            return "";
-        }
-        #endregion
-
-
-
-        #region 商户-通过sn获取商户详情
-        [Authorize]
-        public JsonResult DetailBySn(string value)
-        {
-            if (string.IsNullOrEmpty(value))
-            {
-                System.IO.StreamReader sr = new System.IO.StreamReader(Request.Body);
-                value = sr.ReadToEnd();
-                value = value.Split('=')[1];
-            }
-            value = DesDecrypt(value);
-            JsonData data = JsonMapper.ToObject(value);
-            Dictionary<string, object> Obj = DetailBySnDo(value);
-            return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
-        }
-        public Dictionary<string, object> DetailBySnDo(string value)
-        {
-            function.WriteLog(value, "商户-通过sn获取商户详情");
-            JsonData data = JsonMapper.ToObject(value);
-            Dictionary<string, object> Obj = new Dictionary<string, object>();
-            string Sn = data["Sn"].ToString();
-            string Machine = data["Machine"].ToString();
-            if (Sn.Length > 20)
-            {
-                Sn = System.Web.HttpUtility.UrlDecode(Sn);
-                if (!Sn.EndsWith("="))
-                {
-                    Sn += "=";
-                }
-                Sn = dbconn.Decrypt3DES(Sn, "l2k0b2#3");
-                Sn = Sn.TrimEnd('\0');
-                Sn = Sn.Substring(0, Sn.Length - 8);
-            }
-            if (Machine == Sn)
-            {
-                MerchantQrCode code = new MerchantQrCodeService().Query(Sn);
-                MerchantInfo query = new MerchantInfoService().Query(code.MerchantId);
-                MerchantParamSet set = new MerchantParamSetService().Query(code.MerchantId);
-                Obj.Add("Name", query.Name); //名称
-                Obj.Add("Mobile", query.Mobile); //手机号
-                Obj.Add("IsAuth", query.IsAuth); //是否认证
-                Obj.Add("Logo", DefaultPic(query.Logo)); //Logo图片
-                Obj.Add("DiviPercent", set.IsAll == 1 ? 0M : set.DiviPercent);
-                Obj.Add("MinPayMoney", set.MinPayMoney);
-                Obj.Add("IsAct", query.IsAct); //是否激活(0 否 1 是)
-            }
-            else
-            {
-                PosMachines machine = new PosMachinesService().Query(Sn);
-                MainModels2.MerchantInfo query = new MerchantInfo2Service().Query(machine.BindMerchantId);
-                MainModels2.MerchantParamSet set = new MerchantParamSet2Service().Query(machine.BindMerchantId);
-                Obj.Add("Name", query.Name); //名称
-                Obj.Add("Mobile", query.Mobile); //手机号
-                Obj.Add("IsAuth", query.IsAuth); //是否认证
-                Obj.Add("Logo", DefaultPic(query.Logo)); //Logo图片
-                Obj.Add("DiviPercent", set.IsAll == 1 ? 0M : set.DiviPercent);
-                Obj.Add("MinPayMoney", set.MinPayMoney);
-                Obj.Add("IsAct", query.IsAct); //是否激活(0 否 1 是)
-            }
-            return Obj;
-        }
-        #endregion
-
-
-
-        #region 商户-忘记密码
-        // [Authorize]
-        public JsonResult ForgetPwd(string value)
-        {
-            value = DesDecrypt(value);
-            JsonData data = JsonMapper.ToObject(value);
-            AppResultJson result = ForgetPwdDo(value);
-            return Json(new AppResultJson() { Status = result.Status, Info = result.Info, Data = result.Data });
-        }
-        public AppResultJson ForgetPwdDo(string value)
-        {
-            JsonData data = JsonMapper.ToObject(value);
-            string Mobile = data["Mobile"].ToString(); //手机号
-            string LoginPwd = data["LoginPwd"].ToString(); //登录密码
-            string MobileCode = data["MobileCode"].ToString(); //短信验证码
-            if (string.IsNullOrEmpty(data["Mobile"].ToString()))
-            {
-                return new AppResultJson() { Status = "-1", Info = "请填写手机号" };
-            }
-            if (data["Mobile"].ToString().Length > 11)
-            {
-                return new AppResultJson() { Status = "-1", Info = "手机号最多11个字符" };
-            }
-            MobileCodeCheck mobilecheck = RedisDbconn.Instance.Get<MobileCodeCheck>("MobileCodeCheck:" + Mobile);
-            if (mobilecheck == null)
-            {
-                return new AppResultJson() { Status = "-1", Info = "短信验证码不正确" };
-            }
-            if (mobilecheck.CheckCode != MobileCode)
-            {
-                return new AppResultJson() { Status = "-1", Info = "短信验证码不正确" };
-            }
-            RedisDbconn.Instance.Clear("MobileCodeCheck:" + Mobile);
-            Dictionary<string, object> Obj = new Dictionary<string, object>();
-            // MerchantForMobile find = new MerchantForMobileService().Query(Mobile);
-            // if (find == null)
-            // {
-            //     return new AppResultJson() { Status = "-1", Info = "手机号不正确" };
-            // }
-            // MerchantInfo query = maindb.MerchantInfo.FirstOrDefault(m => m.Id == find.MerchantId);
-            // if (query != null)
-            // {
-            //     query.LoginPwd = function.MD532(LoginPwd); //登录密码
-            //     maindb.SaveChanges();
-            // }
-            MerchantLoginInfo query = maindb.MerchantLoginInfo.FirstOrDefault(m => m.LoginMobile == Mobile);
-            if (query == null)
-            {
-                return new AppResultJson() { Status = "-1", Info = "手机号不正确" };
-            }
-            query.LoginPwd = function.MD532(LoginPwd); //登录密码
-            maindb.SaveChanges();
-            return new AppResultJson() { Status = "1", Info = "", Data = Obj };
-        }
-        #endregion
-
-
-
-        #region 商户-登录
-        // [Authorize]
-        public JsonResult Login(string value)
-        {
-            value = DesDecrypt(value);
-            JsonData data = JsonMapper.ToObject(value);
-            string Mobile = data["Mobile"].ToString(); //手机号
-            string LoginPwd = data["LoginPwd"].ToString(); //登录密码
-            Dictionary<string, object> Obj = new Dictionary<string, object>();
-            if (Mobile == "13802211996")
-            {
-                if (LoginPwd != "kxs2022")
-                {
-                    return Json(new AppResultJson() { Status = "-1", Info = "登录密码不正确" });
-                }
-                Obj.Add("Id", 1);
-                Obj.Add("Token", PublicFunction.AppToken(1, JwtSecret, JwtIss, "merchant"));
-                return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
-            }
-            MerchantLoginInfo query = new MerchantLoginInfoService().Query(Mobile, function.MD532(LoginPwd));
-            if (query.Id == 0)
-            {
-                return Json(new AppResultJson() { Status = "-1", Info = "手机号或登录密码不正确" });
-            }
-            Obj.Add("Id", query.Id); //Id
-            Obj.Add("Token", PublicFunction.AppToken(query.Id, JwtSecret, JwtIss, "merchant"));
-            Obj.Add("MerchantList", new MerchantAccountLinkInfoService().List(query.Id));
-            return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
-        }
-        #endregion
-
-
-
-
-
-        #region 检查签名是否合法,合法返回1,不合法返回提示信息
-
-        /// <summary>
-        /// 检查签名是否合法,合法返回1,不合法返回提示信息
-        /// </summary>
-        /// <param name="value">请求的参数(json字符串)</param>
-        /// <param name="signField">要签名的字段</param>
-        /// <returns></returns>
-        private string CheckSign(string value, string[] signField)
-        {
-            JsonData json = JsonMapper.ToObject(value);
-            Dictionary<string, string> dic = new Dictionary<string, string>();
-            for (int i = 0; i < signField.Length; i++)
-            {
-                dic.Add(signField[i], json[signField[i]].ToString());
-            }
-            string sign = json["sign"].ToString(); //客户端签名字符串
-            return new Sign().sign(dic, sign);
-        }
-
-        #endregion
-
     }
 }

+ 0 - 1
Filter/GlobalActionFilter.cs

@@ -5,7 +5,6 @@ using Library;
 using LitJson;
 using Microsoft.AspNetCore.Mvc;
 using Microsoft.AspNetCore.Mvc.Filters;
-using MySystem.Models;
 
 namespace MySystem
 {

+ 0 - 49
KxsMainModels/ActiveReward.cs

@@ -1,49 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class ActiveReward
-    {
-        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 ParentParentUserId { get; set; }
-        public int ParentUserId { get; set; }
-        public int MerUserId { get; set; }
-        public int TopUserId { get; set; }
-        public DateTime? ActDate { get; set; }
-        public string Remark { get; set; }
-        public string City { get; set; }
-        public string Province { get; set; }
-        public string RewardTips { get; set; }
-        public int RewardRef { get; set; }
-        public int SnStoreId { get; set; }
-        public string ActTypeDesc { get; set; }
-        public int ActType { get; set; }
-        public int SnApplyUserId { get; set; }
-        public int SnType { get; set; }
-        public string KqSnNo { get; set; }
-        public string KqMerNo { get; set; }
-        public string MerUserNav { get; set; }
-        public int DirectBuddyNo { get; set; }
-        public string UserNav { get; set; }
-        public int BrandId { get; set; }
-        public decimal RuleRewardAmount { get; set; }
-        public decimal DivideAmount { get; set; }
-        public decimal RewardAmount { get; set; }
-        public int RewardSourceUserId { get; set; }
-        public DateTime? StandardDate { get; set; }
-        public int MerchantId { get; set; }
-        public int UserId { get; set; }
-    }
-}

+ 0 - 26
KxsMainModels/ActivityEnrolRecord.cs

@@ -1,26 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class ActivityEnrolRecord
-    {
-        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 EffectEndTime { get; set; }
-        public string EffectStartTime { get; set; }
-        public string EnrolMonth { get; set; }
-        public int UserId { get; set; }
-        public int ActId { get; set; }
-    }
-}

+ 0 - 37
KxsMainModels/ActivityInfo.cs

@@ -1,37 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class ActivityInfo
-    {
-        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 ActContent { get; set; }
-        public string ActBanner { get; set; }
-        public string ActReferUrl { get; set; }
-        public string EnrolEndTime { get; set; }
-        public string EnrolStartTime { get; set; }
-        public DateTime? EnrolEndDate { get; set; }
-        public DateTime? EnrolStartDate { get; set; }
-        public DateTime? EffectEndDate { get; set; }
-        public DateTime? EffectStartDate { get; set; }
-        public int IsTop { get; set; }
-        public string LimitTopBuddy { get; set; }
-        public string BrandId { get; set; }
-        public string ActName { get; set; }
-        public int ActType { get; set; }
-        public string ActCode { get; set; }
-    }
-}

+ 0 - 32
KxsMainModels/ActivityPrizeDetail.cs

@@ -1,32 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class ActivityPrizeDetail
-    {
-        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 TopUserId { get; set; }
-        public decimal ProfitRate { get; set; }
-        public decimal ActRewardAmt { get; set; }
-        public decimal CreditTradeAmt { get; set; }
-        public decimal OtherProdCreditTradeAmt { get; set; }
-        public string TradeMonth { get; set; }
-        public int CheckStatus { get; set; }
-        public decimal TradeAmt { get; set; }
-        public int BrandId { get; set; }
-        public int UserId { get; set; }
-        public int ActivityId { get; set; }
-    }
-}

+ 0 - 24
KxsMainModels/ActivityRedPackageJoins.cs

@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class ActivityRedPackageJoins
-    {
-        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 PrizeAmt { get; set; }
-        public string ActivityDate { get; set; }
-        public int UserId { get; set; }
-    }
-}

+ 0 - 24
KxsMainModels/ActivityRedPackageStock.cs

@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class ActivityRedPackageStock
-    {
-        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 ActivityDate { get; set; }
-        public decimal PrizeAmt { get; set; }
-        public int UserId { get; set; }
-    }
-}

+ 0 - 25
KxsMainModels/ActivityRedPackageTop10.cs

@@ -1,25 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class ActivityRedPackageTop10
-    {
-        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 Kind { get; set; }
-        public int TimeNum { get; set; }
-        public decimal PrizeAmt { get; set; }
-        public int UserId { get; set; }
-    }
-}

+ 0 - 26
KxsMainModels/Advertisment.cs

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

@@ -1,25 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class AgentLevelSet
-    {
-        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 AreasProfitPercent { get; set; }
-        public ulong LevelDiff { get; set; }
-        public decimal ProfitPercent { get; set; }
-        public string Name { get; set; }
-    }
-}

+ 0 - 32
KxsMainModels/AppBottomNavs.cs

@@ -1,32 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class AppBottomNavs
-    {
-        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 BgColor { get; set; }
-        public string NoPageHint { get; set; }
-        public string PageName { get; set; }
-        public string NormalTextColor { get; set; }
-        public string SelectTextColor { get; set; }
-        public string NormalIcon { get; set; }
-        public string SelectIcon { get; set; }
-        public string Title { get; set; }
-        public string PagPath { get; set; }
-        public string ScrollerAnimationImages { get; set; }
-        public string Style { get; set; }
-    }
-}

+ 0 - 28
KxsMainModels/AppVersion.cs

@@ -1,28 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class AppVersion
-    {
-        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 DownloadUrl { get; set; }
-        public string CancelText { get; set; }
-        public string ConfirmText { get; set; }
-        public string Info { get; set; }
-        public string Title { get; set; }
-        public string VersionNum { get; set; }
-        public string TerminalKind { get; set; }
-    }
-}

+ 0 - 24
KxsMainModels/AppVideo.cs

@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class AppVideo
-    {
-        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 BannerPic { get; set; }
-        public string Name { get; set; }
-    }
-}

+ 0 - 26
KxsMainModels/AppVideoList.cs

@@ -1,26 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class AppVideoList
-    {
-        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 BgPic { get; set; }
-        public int VideoId { get; set; }
-        public string Remark { get; set; }
-        public string VideoUrl { get; set; }
-        public string Title { get; set; }
-    }
-}

+ 0 - 28
KxsMainModels/BackEndOpRecord.cs

@@ -1,28 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class BackEndOpRecord
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public string Remark { get; set; }
-        public string AfterData { get; set; }
-        public string BeforeData { get; set; }
-        public string TableEnName { get; set; }
-        public string TableChName { get; set; }
-        public string SysRealName { get; set; }
-        public string SysUserName { get; set; }
-        public string CreateMan { get; set; }
-        public string UpdateMan { get; set; }
-        public int Version { get; set; }
-    }
-}

+ 0 - 26
KxsMainModels/BankInfo.cs

@@ -1,26 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class BankInfo
-    {
-        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 BankNameAbbr { get; set; }
-        public string UnitedBankName { get; set; }
-        public string UnitedBankNo { get; set; }
-        public string BankCode { get; set; }
-        public string BankName { get; set; }
-    }
-}

+ 0 - 47
KxsMainModels/BrokenMachineChange.cs

@@ -1,47 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class BrokenMachineChange
-    {
-        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 OutStoreManagerMobile { get; set; }
-        public string OutStoreManager { get; set; }
-        public string OutStoreAddress { get; set; }
-        public string OutStoreAreas { get; set; }
-        public string OutStoreName { get; set; }
-        public int OutStoreId { get; set; }
-        public string OutProductName { get; set; }
-        public int OutProductType { get; set; }
-        public int BackStoreUserId { get; set; }
-        public string Remark { get; set; }
-        public string BackStoreName { get; set; }
-        public int BackStoreId { get; set; }
-        public string ChangeSnExpand { get; set; }
-        public string OrderExpand { get; set; }
-        public DateTime? CompleteTime { get; set; }
-        public string AuditRemark { get; set; }
-        public int AuditResult { get; set; }
-        public DateTime? AuditTime { get; set; }
-        public string AuditBy { get; set; }
-        public DateTime? ChangeTime { get; set; }
-        public int ChangeDeviceNum { get; set; }
-        public string ChangeDeviceName { get; set; }
-        public string BackProductName { get; set; }
-        public int BackProductType { get; set; }
-        public int UserId { get; set; }
-        public string ChangeNo { get; set; }
-    }
-}

+ 0 - 34
KxsMainModels/BrokenMachineChangeDetail.cs

@@ -1,34 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class BrokenMachineChangeDetail
-    {
-        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 BackSnType { get; set; }
-        public string Remark { get; set; }
-        public int OutSnType { get; set; }
-        public string OutSnNo { get; set; }
-        public string OutProductName { get; set; }
-        public int OutProductType { get; set; }
-        public int BackDeviceStatus { get; set; }
-        public string BackSnNo { get; set; }
-        public int UserId { get; set; }
-        public string BackProductName { get; set; }
-        public int BackProductType { get; set; }
-        public int ChangeId { get; set; }
-        public string ChangeNo { get; set; }
-    }
-}

+ 0 - 28
KxsMainModels/BusinessActSummary.cs

@@ -1,28 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class BusinessActSummary
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public int Version { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string CreateMan { get; set; }
-        public string UpdateMan { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public int UserId { get; set; }
-        public string TradeDate { get; set; }
-        public string Remark { get; set; }
-        public int ActCount { get; set; }
-        public int BrandId { get; set; }
-        public string TradeMonth { get; set; }
-        public int PartnerId { get; set; }
-    }
-}

+ 0 - 26
KxsMainModels/BusinessPartner.cs

@@ -1,26 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class BusinessPartner
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public int Version { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string CreateMan { get; set; }
-        public string UpdateMan { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public int UserId { get; set; }
-        public decimal ThisMonthTrade { get; set; }
-        public string LoginPassword { get; set; }
-        public string Name { get; set; }
-        public string Mobile { get; set; }
-    }
-}

+ 0 - 25
KxsMainModels/BusinessPartnerMerchant.cs

@@ -1,25 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class BusinessPartnerMerchant
-    {
-        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 MerNo { get; set; }
-        public int MerchantId { get; set; }
-        public int PartnerId { get; set; }
-        public int UserId { get; set; }
-    }
-}

+ 0 - 25
KxsMainModels/BusinessPartnerPos.cs

@@ -1,25 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class BusinessPartnerPos
-    {
-        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 PosSn { get; set; }
-        public int PosId { get; set; }
-        public int PartnerId { get; set; }
-        public int UserId { get; set; }
-    }
-}

+ 0 - 67
KxsMainModels/BusinessTradeSummary.cs

@@ -1,67 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class BusinessTradeSummary
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public int Version { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string CreateMan { get; set; }
-        public string UpdateMan { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public int UserId { get; set; }
-        public int PayType { get; set; }
-        public int VipFlag { get; set; }
-        public int TopUserId { get; set; }
-        public decimal HelpNonDirectNonQrDebitTradeAmt { get; set; }
-        public decimal HelpDirectNonQrDebitTradeAmt { get; set; }
-        public decimal HelpNonDirectQrDebitTradeAmt { get; set; }
-        public decimal HelpDirectQrDebitTradeAmt { get; set; }
-        public decimal HelpNonDirectDebitCapNum { get; set; }
-        public decimal HelpNonDirectDebitCapTradeAmt { get; set; }
-        public decimal HelpNonDirectDebitTradeAmt { get; set; }
-        public decimal HelpDirectDebitCapNum { get; set; }
-        public decimal HelpDirectDebitCapTradeAmt { get; set; }
-        public decimal HelpDirectDebitTradeAmt { get; set; }
-        public decimal HelpNonDirectNonQrCreditTradeAmt { get; set; }
-        public decimal HelpDirectNonQrCreditTradeAmt { get; set; }
-        public decimal HelpNonDirectQrCreditTradeAmt { get; set; }
-        public decimal HelpDirectQrCreditTradeAmt { get; set; }
-        public decimal HelpNonDirectCreditTradeAmt { get; set; }
-        public decimal HelpDirectCreditTradeAmt { get; set; }
-        public decimal HelpNonDirectTradeAmt { get; set; }
-        public decimal HelpDirectTradeAmt { get; set; }
-        public decimal NotHelpNonDirectNonQrDebitTradeAmt { get; set; }
-        public decimal NotHelpDirectNonQrDebitTradeAmt { get; set; }
-        public decimal NotHelpNonDirectQrDebitTradeAmt { get; set; }
-        public decimal NotHelpDirectQrDebitTradeAmt { get; set; }
-        public int NotHelpNonDirectDebitCapNum { get; set; }
-        public decimal NotHelpNonDirectDebitCapTradeAmt { get; set; }
-        public decimal NotHelpNonDirectDebitTradeAmt { get; set; }
-        public int NotHelpDirectDebitCapNum { get; set; }
-        public decimal NotHelpDirectDebitCapTradeAmt { get; set; }
-        public decimal NotHelpDirectDebitTradeAmt { get; set; }
-        public decimal NotHelpNonDirectNonQrCreditTradeAmt { get; set; }
-        public decimal NotHelpDirectNonQrCreditTradeAmt { get; set; }
-        public decimal NotHelpNonDirectQrCreditTradeAmt { get; set; }
-        public decimal NotHelpDirectQrCreditTradeAmt { get; set; }
-        public decimal NotHelpNonDirectCreditTradeAmt { get; set; }
-        public decimal NotHelpDirectCreditTradeAmt { get; set; }
-        public decimal NotHelpNonDirectTradeAmt { get; set; }
-        public decimal NotHelpDirectTradeAmt { get; set; }
-        public string MgrName { get; set; }
-        public string MgrNo { get; set; }
-        public int BrandId { get; set; }
-        public string TradeMonth { get; set; }
-        public string TradeDate { get; set; }
-        public int PartnerId { get; set; }
-    }
-}

+ 0 - 37
KxsMainModels/Col.cs

@@ -1,37 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    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 string ClassName { get; set; }
-        public string ColEnNav { get; set; }
-        public int ParentId { get; set; }
-        public int ListPageCount { get; set; }
-        public string DetailTempM { get; set; }
-        public string ListTempM { get; set; }
-        public string DetailTemp { get; set; }
-        public string ListTemp { 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 - 11
KxsMainModels/ConsumerOpenIds.cs

@@ -1,11 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class ConsumerOpenIds
-    {
-        public string OpenId { get; set; }
-        public int ConsumerId { get; set; }
-    }
-}

+ 0 - 11
KxsMainModels/ConsumerOrderForNo.cs

@@ -1,11 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class ConsumerOrderForNo
-    {
-        public string OrderNo { get; set; }
-        public int OrderIds { get; set; }
-    }
-}

+ 0 - 31
KxsMainModels/ConsumerOrders.cs

@@ -1,31 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class ConsumerOrders
-    {
-        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 CurDivi { get; set; }
-        public decimal MaxDivi { get; set; }
-        public string SnNo { get; set; }
-        public decimal ReturnMoney { get; set; }
-        public decimal PayMoney { get; set; }
-        public int PayMode { get; set; }
-        public string OrderNo { get; set; }
-        public int ConsumerId { get; set; }
-        public int MerchantId { get; set; }
-        public ulong IsAct { get; set; }
-    }
-}

+ 0 - 25
KxsMainModels/ConsumerProfit.cs

@@ -1,25 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class ConsumerProfit
-    {
-        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 OrderId { get; set; }
-        public decimal GetMoney { get; set; }
-        public int MerchantId { get; set; }
-        public int ConsumerId { get; set; }
-    }
-}

+ 0 - 36
KxsMainModels/Consumers.cs

@@ -1,36 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class Consumers
-    {
-        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 WechatOpenId { get; set; }
-        public ulong CardFlag { get; set; }
-        public ulong AlipayFlag { get; set; }
-        public ulong WeChatPayFlag { get; set; }
-        public DateTime? LastConsumDate { get; set; }
-        public int TotalConsumCount { get; set; }
-        public decimal TotalAmount { get; set; }
-        public string AlipayUserId { get; set; }
-        public string WechatUnionid { get; set; }
-        public int CurIntgegral { get; set; }
-        public int TotalIntegral { get; set; }
-        public decimal TotalDividend { get; set; }
-        public string Mobile { get; set; }
-        public string HeadPhoto { get; set; }
-        public string NickName { get; set; }
-    }
-}

+ 0 - 33
KxsMainModels/CouponAssignRecords.cs

@@ -1,33 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class CouponAssignRecords
-    {
-        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 CouponIds { get; set; }
-        public string Mobile { get; set; }
-        public string Areas { get; set; }
-        public string UserGroupId { get; set; }
-        public decimal CurMoneyMax { get; set; }
-        public decimal CurMoneyMin { get; set; }
-        public decimal TotalUseIntegralMax { get; set; }
-        public decimal TotalUseIntegralMin { get; set; }
-        public decimal TotalOrderMoneyMax { get; set; }
-        public decimal TotalOrderMoneyMin { get; set; }
-        public int UserMaxLevel { get; set; }
-        public int UserMinLevel { get; set; }
-    }
-}

+ 0 - 48
KxsMainModels/Coupons.cs

@@ -1,48 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class Coupons
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public int Version { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string CreateMan { get; set; }
-        public string UpdateMan { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public DateTime? ExpireEndDate { get; set; }
-        public DateTime? ExpireStartDate { get; set; }
-        public decimal FullReduceData { get; set; }
-        public decimal FullReduceMoney { get; set; }
-        public ulong AndPromotion { get; set; }
-        public ulong IsSuperpose { get; set; }
-        public int PublicMaxByDay { get; set; }
-        public int PublicMax { get; set; }
-        public DateTime? PublicEndDate { get; set; }
-        public DateTime? PublicStartDate { get; set; }
-        public ulong IsReUse { get; set; }
-        public string RepeatCondition { get; set; }
-        public int RepeatType { get; set; }
-        public ulong IsRepeat { get; set; }
-        public DateTime? UseEndDate { get; set; }
-        public DateTime? UseStartDate { get; set; }
-        public int UserMinLevel { get; set; }
-        public int UserMaxLevel { get; set; }
-        public string ProductId { get; set; }
-        public string ProductColId { get; set; }
-        public string MerchantId { get; set; }
-        public int Kind { get; set; }
-        public decimal Stock { get; set; }
-        public ulong IsPublic { get; set; }
-        public ulong IsNewUser { get; set; }
-        public string Explanation { get; set; }
-        public string Name { get; set; }
-    }
-}

+ 0 - 26
KxsMainModels/CouponsForUser.cs

@@ -1,26 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class CouponsForUser
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public int Version { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string CreateMan { get; set; }
-        public string UpdateMan { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public DateTime? UseDate { get; set; }
-        public ulong IsLock { get; set; }
-        public ulong IsUse { get; set; }
-        public int CouponId { get; set; }
-        public int UserId { get; set; }
-    }
-}

+ 0 - 24
KxsMainModels/CustomTagSet.cs

@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class CustomTagSet
-    {
-        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 Title { get; set; }
-        public string Tags { get; set; }
-    }
-}

+ 0 - 24
KxsMainModels/ErpCompanys.cs

@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class ErpCompanys
-    {
-        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 Phone { get; set; }
-        public string Code { get; set; }
-        public string Name { get; set; }
-    }
-}

+ 0 - 21
KxsMainModels/ExportExcels.cs

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

+ 0 - 24
KxsMainModels/FileUpdateInfo.cs

@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class FileUpdateInfo
-    {
-        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 FileName { get; set; }
-        public string Path { get; set; }
-        public int VersionNum { get; set; }
-    }
-}

+ 0 - 43
KxsMainModels/FluxProfitDetail.cs

@@ -1,43 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class FluxProfitDetail
-    {
-        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 MerUserType { get; set; }
-        public int TopUserId { get; set; }
-        public int BrandId { get; set; }
-        public string Remark { get; set; }
-        public string PosType { get; set; }
-        public decimal FluxProfitAmt { get; set; }
-        public string FluxEndDate { get; set; }
-        public string FluxStartDate { get; set; }
-        public decimal FluxFeeAmt { get; set; }
-        public decimal TradeAmt { get; set; }
-        public string TradeOrderNo { get; set; }
-        public string FluxOrderNo { get; set; }
-        public int ProfitType { get; set; }
-        public string SnNo { get; set; }
-        public string MerNo { get; set; }
-        public int MerchantUserId { get; set; }
-        public int MerchantId { get; set; }
-        public int UserId { get; set; }
-        public string TradeMonth { get; set; }
-        public string TradeTime { get; set; }
-        public string TradeDate { get; set; }
-        public string RecordNo { get; set; }
-    }
-}

+ 0 - 30
KxsMainModels/FluxProfitSummary.cs

@@ -1,30 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class FluxProfitSummary
-    {
-        public int Id { get; set; }
-        public int Sort { get; set; }
-        public int QueryCount { get; set; }
-        public int Status { get; set; }
-        public int Version { get; set; }
-        public DateTime? CreateDate { get; set; }
-        public DateTime? UpdateDate { get; set; }
-        public string CreateMan { get; set; }
-        public string UpdateMan { get; set; }
-        public string SeoTitle { get; set; }
-        public string SeoKeyword { get; set; }
-        public string SeoDescription { get; set; }
-        public int BrandId { get; set; }
-        public string Remark { get; set; }
-        public int CheckStatus { get; set; }
-        public int FluxTradeNum { get; set; }
-        public decimal FluxProfitAmt { get; set; }
-        public int MerUserType { get; set; }
-        public string TradeMonth { get; set; }
-        public int TopUserId { get; set; }
-        public int UserId { get; set; }
-    }
-}

+ 0 - 33
KxsMainModels/HelpProfitAccountRecord.cs

@@ -1,33 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MySystem.KxsMainModels
-{
-    public partial class HelpProfitAccountRecord
-    {
-        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; }
-    }
-}

Некоторые файлы не были показаны из-за большого количества измененных файлов