lichunlei 1 kuukausi sitten
commit
ac8d59a010
93 muutettua tiedostoa jossa 6323 lisäystä ja 0 poistoa
  1. 5 0
      .gitignore
  2. 1 0
      .vscode/api.code-snippets
  3. 896 0
      .vscode/db.code-snippets
  4. 53 0
      .vscode/launch.json
  5. 55 0
      .vscode/public.code-snippets
  6. 42 0
      .vscode/tasks.json
  7. 35 0
      AppStart/StartHelper.cs
  8. 28 0
      AppStart/TemplateViewLocationExpander.cs
  9. 25 0
      Config/Base.cs
  10. 15 0
      Config/JwtConfig.cs
  11. 12 0
      Config/LoginSession.cs
  12. 22 0
      Config/Oss.cs
  13. 241 0
      Controllers/HomeController.cs
  14. BIN
      DLL/Aliyun.OSS.dll
  15. BIN
      DLL/LitJSON.dll
  16. BIN
      DLL/MySystemLib.dll
  17. BIN
      DLL/Newtonsoft.Json.dll
  18. BIN
      DLL/ThoughtWorks.QRCode.dll
  19. BIN
      DLL/aliyun-net-sdk-core.dll
  20. 21 0
      Entity/AdminRightListItem.cs
  21. 12 0
      Entity/AppResultJson.cs
  22. 41 0
      Entity/DbScheme.cs
  23. 12 0
      Entity/RedisTables/AccountTable.cs
  24. 9 0
      Entity/RedisTables/AdminIpList.cs
  25. 18 0
      Entity/RedisTables/UData.cs
  26. 18 0
      Entity/Setting.cs
  27. 25 0
      Filter/AuthorizeFilter.cs
  28. 19 0
      Filter/GlobalActionFilter.cs
  29. 19 0
      Filter/GlobalExceptionsFilter.cs
  30. 19 0
      Filter/ResourceFilter.cs
  31. 19 0
      Filter/ResultFilter.cs
  32. 20 0
      Models/Push/Merchant.cs
  33. 22 0
      Models/Push/PushObj.cs
  34. 25 0
      Models/Push/PushObjCondition.cs
  35. 16 0
      Models/Push/PushPosRecord.cs
  36. 19 0
      Models/Push/PushRecord.cs
  37. 23 0
      Models/Push/RePushQueue.cs
  38. 19 0
      Models/Push/SourceCondition.cs
  39. 21 0
      Models/Push/SourceData.cs
  40. 19 0
      Models/Push/SourceDataSubTable.cs
  41. 18 0
      Models/Push/UMerchantDepositRecord.cs
  42. 21 0
      Models/Push/UPosMerchantInfo.cs
  43. 26 0
      Models/Push/UTradeRecord.cs
  44. 925 0
      Models/Push/WebCMSEntities.cs
  45. 76 0
      MySystem.csproj
  46. 32 0
      Program.cs
  47. 13 0
      Properties/PublishProfiles/FolderProfile 1.pubxml
  48. 13 0
      Properties/PublishProfiles/FolderProfile 10.pubxml
  49. 13 0
      Properties/PublishProfiles/FolderProfile 11.pubxml
  50. 13 0
      Properties/PublishProfiles/FolderProfile 12.pubxml
  51. 13 0
      Properties/PublishProfiles/FolderProfile 13.pubxml
  52. 13 0
      Properties/PublishProfiles/FolderProfile 14.pubxml
  53. 13 0
      Properties/PublishProfiles/FolderProfile 15.pubxml
  54. 13 0
      Properties/PublishProfiles/FolderProfile 16.pubxml
  55. 13 0
      Properties/PublishProfiles/FolderProfile 17.pubxml
  56. 13 0
      Properties/PublishProfiles/FolderProfile 2.pubxml
  57. 13 0
      Properties/PublishProfiles/FolderProfile 3.pubxml
  58. 13 0
      Properties/PublishProfiles/FolderProfile 4.pubxml
  59. 13 0
      Properties/PublishProfiles/FolderProfile 5.pubxml
  60. 13 0
      Properties/PublishProfiles/FolderProfile 6.pubxml
  61. 13 0
      Properties/PublishProfiles/FolderProfile 7.pubxml
  62. 13 0
      Properties/PublishProfiles/FolderProfile 8.pubxml
  63. 13 0
      Properties/PublishProfiles/FolderProfile 9.pubxml
  64. 13 0
      Properties/PublishProfiles/FolderProfile.pubxml
  65. 27 0
      Properties/launchSettings.json
  66. 301 0
      ServiceReference1/Reference.cs
  67. 110 0
      Startup.cs
  68. 88 0
      Util/Aliyun/AliyunPush.cs
  69. 12 0
      Util/Base/BaseClass.cs
  70. 8 0
      Util/Base/Func.cs
  71. 44 0
      Util/DictionaryClass.cs
  72. 43 0
      Util/EncryptHelper.cs
  73. 22 0
      Util/Extension/JsonDataExtension.cs
  74. 17 0
      Util/Extension/StringExtension.cs
  75. 66 0
      Util/LogHelper.cs
  76. 131 0
      Util/OssHelper.cs
  77. 191 0
      Util/PublicFunction.cs
  78. 72 0
      Util/Queue/AliyunPushHelper.cs
  79. 217 0
      Util/Queue/PosPushHelper.cs
  80. 186 0
      Util/Queue/PosRePushHelper.cs
  81. 248 0
      Util/Queue/PushHelper.cs
  82. 107 0
      Util/Queue/RePushHelper.cs
  83. 351 0
      Util/Queue/SourceHelper.cs
  84. 110 0
      Util/RabbitMQClient.cs
  85. 211 0
      Util/RedisDbconn.cs
  86. 211 0
      Util/RedisDbconnTest.cs
  87. 66 0
      Util/TestHelper.cs
  88. 16 0
      Util/Utils.cs
  89. 251 0
      Util/VerifyCodeHelper.cs
  90. 1 0
      Views/Home/Error.cshtml
  91. 1 0
      Views/Home/Index.cshtml
  92. 32 0
      appsettings.Development.json
  93. 5 0
      global.json

+ 5 - 0
.gitignore

@@ -0,0 +1,5 @@
+/bin
+/publish
+/obj
+/appsettings.json
+.DS_Store

+ 1 - 0
.vscode/api.code-snippets

@@ -0,0 +1 @@
+{}

+ 896 - 0
.vscode/db.code-snippets

@@ -0,0 +1,896 @@
+{"查询广告位列表": {
+"prefix": "ym-db-Advertisment-Find",
+"body": [
+"List<Advertisment> $1 = db.Advertisment.Where(m => $2).OrderByDescending(m => m.Id).ToList();",
+"foreach (Advertisment $3 in $1)",
+"{",
+"}"
+]
+},
+"查询广告位列表,并取值": {
+"prefix": "ym-db-Advertisment-FindWithData",
+"body": [
+"List<Advertisment> $1 = db.Advertisment.Where(m => $2).OrderByDescending(m => m.Id).ToList();",
+"foreach (Advertisment $3 in $1)",
+"{",
+"	string Title = $3.Title; //标题",
+"	string ColId = $3.ColId; //分类",
+"	string PicPath = $3.PicPath; //图片",
+"	string Contents = $3.Contents; //内容",
+"	string Url = $3.Url; //链接地址",
+"}"
+]
+},
+"查询广告位": {
+"prefix": "ym-db-Advertisment-Exist",
+"body": [
+"bool $1 = db.Advertisment.Any(m => m.Id == $2);",
+]
+},
+"查询某个广告位,并取值": {
+"prefix": "ym-db-Advertisment-FindByPrimaryKey",
+"body": [
+"Advertisment $1 = db.Advertisment.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	string Title = $1.Title; //标题",
+"	string ColId = $1.ColId; //分类",
+"	string PicPath = $1.PicPath; //图片",
+"	string Contents = $1.Contents; //内容",
+"	string Url = $1.Url; //链接地址",
+"}"
+]
+},
+"查询某个广告位,并赋值": {
+"prefix": "ym-db-Advertisment-Update",
+"body": [
+"Advertisment $1 = db.Advertisment.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	$1.Title = $2; //标题",
+"	$1.ColId = $3; //分类",
+"	$1.PicPath = $4; //图片",
+"	$1.Contents = $5; //内容",
+"	$1.Url = $6; //链接地址",
+"}"
+]
+},
+"获取广告位数量": {
+"prefix": "ym-db-Advertisment-FindAndCount",
+"body": [
+"int $1 = db.Advertisment.Count(m => $2);",
+]
+},
+"添加广告位": {
+"prefix": "ym-db-Advertisment-Create",
+"body": [
+"db.Advertisment.Add(new Advertisment()",
+"{",
+"	CreateDate = DateTime.Now,",
+"	UpdateDate = DateTime.Now,",
+"	Title = $1, //标题",
+"	ColId = $2, //分类",
+"	PicPath = $3, //图片",
+"	Contents = $4, //内容",
+"	Url = $5, //链接地址",
+"});"
+]
+},"删除某个广告位": {
+"prefix": "ym-db-Advertisment-Delete",
+"body": [
+"Advertisment $1 = db.Advertisment.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	db.Advertisment.Remove($1);",
+"}"
+]
+},
+"查询企业入驻审核记录列表": {
+"prefix": "ym-db-BussinessAuditRecord-Find",
+"body": [
+"List<BussinessAuditRecord> $1 = db.BussinessAuditRecord.Where(m => $2).OrderByDescending(m => m.Id).ToList();",
+"foreach (BussinessAuditRecord $3 in $1)",
+"{",
+"}"
+]
+},
+"查询企业入驻审核记录列表,并取值": {
+"prefix": "ym-db-BussinessAuditRecord-FindWithData",
+"body": [
+"List<BussinessAuditRecord> $1 = db.BussinessAuditRecord.Where(m => $2).OrderByDescending(m => m.Id).ToList();",
+"foreach (BussinessAuditRecord $3 in $1)",
+"{",
+"	int UserId = $3.UserId; //会员",
+"	int AuditId = $3.AuditId; //审核人",
+"	string AuditNote = $3.AuditNote; //审核意见",
+"	string UserRealName = $3.UserRealName; //会员姓名",
+"	string UserCode = $3.UserCode; //会员编号",
+"	string UserMobile = $3.UserMobile; //会员手机号",
+"	string SysAdminName = $3.SysAdminName; //审核人名称",
+"}"
+]
+},
+"查询企业入驻审核记录": {
+"prefix": "ym-db-BussinessAuditRecord-Exist",
+"body": [
+"bool $1 = db.BussinessAuditRecord.Any(m => m.Id == $2);",
+]
+},
+"查询某个企业入驻审核记录,并取值": {
+"prefix": "ym-db-BussinessAuditRecord-FindByPrimaryKey",
+"body": [
+"BussinessAuditRecord $1 = db.BussinessAuditRecord.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	int UserId = $1.UserId; //会员",
+"	int AuditId = $1.AuditId; //审核人",
+"	string AuditNote = $1.AuditNote; //审核意见",
+"	string UserRealName = $1.UserRealName; //会员姓名",
+"	string UserCode = $1.UserCode; //会员编号",
+"	string UserMobile = $1.UserMobile; //会员手机号",
+"	string SysAdminName = $1.SysAdminName; //审核人名称",
+"}"
+]
+},
+"查询某个企业入驻审核记录,并赋值": {
+"prefix": "ym-db-BussinessAuditRecord-Update",
+"body": [
+"BussinessAuditRecord $1 = db.BussinessAuditRecord.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	$1.UserId = $2; //会员",
+"	$1.AuditId = $3; //审核人",
+"	$1.AuditNote = $4; //审核意见",
+"	$1.UserRealName = $5; //会员姓名",
+"	$1.UserCode = $6; //会员编号",
+"	$1.UserMobile = $7; //会员手机号",
+"	$1.SysAdminName = $8; //审核人名称",
+"}"
+]
+},
+"获取企业入驻审核记录数量": {
+"prefix": "ym-db-BussinessAuditRecord-FindAndCount",
+"body": [
+"int $1 = db.BussinessAuditRecord.Count(m => $2);",
+]
+},
+"添加企业入驻审核记录": {
+"prefix": "ym-db-BussinessAuditRecord-Create",
+"body": [
+"db.BussinessAuditRecord.Add(new BussinessAuditRecord()",
+"{",
+"	CreateDate = DateTime.Now,",
+"	UpdateDate = DateTime.Now,",
+"	UserId = $1, //会员",
+"	AuditId = $2, //审核人",
+"	AuditNote = $3, //审核意见",
+"	UserRealName = $4, //会员姓名",
+"	UserCode = $5, //会员编号",
+"	UserMobile = $6, //会员手机号",
+"	SysAdminName = $7, //审核人名称",
+"});"
+]
+},"删除某个企业入驻审核记录": {
+"prefix": "ym-db-BussinessAuditRecord-Delete",
+"body": [
+"BussinessAuditRecord $1 = db.BussinessAuditRecord.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	db.BussinessAuditRecord.Remove($1);",
+"}"
+]
+},
+"查询分类设置列表": {
+"prefix": "ym-db-Col-Find",
+"body": [
+"List<Col> $1 = db.Col.Where(m => $2).OrderByDescending(m => m.Id).ToList();",
+"foreach (Col $3 in $1)",
+"{",
+"}"
+]
+},
+"查询分类设置列表,并取值": {
+"prefix": "ym-db-Col-FindWithData",
+"body": [
+"List<Col> $1 = db.Col.Where(m => $2).OrderByDescending(m => m.Id).ToList();",
+"foreach (Col $3 in $1)",
+"{",
+"	string ColId = $3.ColId; //编号",
+"	string ColName = $3.ColName; //名称",
+"	string ColPicPath = $3.ColPicPath; //图标",
+"	string ColDetail = $3.ColDetail; //简介",
+"	ulong Recommend = $3.Recommend; //推荐",
+"	string ColEnName = $3.ColEnName; //英文名",
+"	string Contents = $3.Contents; //详细内容",
+"	string Url = $3.Url; //第三方链接",
+"}"
+]
+},
+"查询分类设置": {
+"prefix": "ym-db-Col-Exist",
+"body": [
+"bool $1 = db.Col.Any(m => m.Id == $2);",
+]
+},
+"查询某个分类设置,并取值": {
+"prefix": "ym-db-Col-FindByPrimaryKey",
+"body": [
+"Col $1 = db.Col.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	string ColId = $1.ColId; //编号",
+"	string ColName = $1.ColName; //名称",
+"	string ColPicPath = $1.ColPicPath; //图标",
+"	string ColDetail = $1.ColDetail; //简介",
+"	ulong Recommend = $1.Recommend; //推荐",
+"	string ColEnName = $1.ColEnName; //英文名",
+"	string Contents = $1.Contents; //详细内容",
+"	string Url = $1.Url; //第三方链接",
+"}"
+]
+},
+"查询某个分类设置,并赋值": {
+"prefix": "ym-db-Col-Update",
+"body": [
+"Col $1 = db.Col.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	$1.ColId = $2; //编号",
+"	$1.ColName = $3; //名称",
+"	$1.ColPicPath = $4; //图标",
+"	$1.ColDetail = $5; //简介",
+"	$1.Recommend = $6; //推荐",
+"	$1.ColEnName = $7; //英文名",
+"	$1.Contents = $8; //详细内容",
+"	$1.Url = $9; //第三方链接",
+"}"
+]
+},
+"获取分类设置数量": {
+"prefix": "ym-db-Col-FindAndCount",
+"body": [
+"int $1 = db.Col.Count(m => $2);",
+]
+},
+"添加分类设置": {
+"prefix": "ym-db-Col-Create",
+"body": [
+"db.Col.Add(new Col()",
+"{",
+"	CreateDate = DateTime.Now,",
+"	UpdateDate = DateTime.Now,",
+"	ColId = $1, //编号",
+"	ColName = $2, //名称",
+"	ColPicPath = $3, //图标",
+"	ColDetail = $4, //简介",
+"	Recommend = $5, //推荐",
+"	ColEnName = $6, //英文名",
+"	Contents = $7, //详细内容",
+"	Url = $8, //第三方链接",
+"});"
+]
+},"删除某个分类设置": {
+"prefix": "ym-db-Col-Delete",
+"body": [
+"Col $1 = db.Col.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	db.Col.Remove($1);",
+"}"
+]
+},
+"查询小程序版本库列表": {
+"prefix": "ym-db-MiniProgramVersions-Find",
+"body": [
+"List<MiniProgramVersions> $1 = db.MiniProgramVersions.Where(m => $2).OrderByDescending(m => m.Id).ToList();",
+"foreach (MiniProgramVersions $3 in $1)",
+"{",
+"}"
+]
+},
+"查询小程序版本库列表,并取值": {
+"prefix": "ym-db-MiniProgramVersions-FindWithData",
+"body": [
+"List<MiniProgramVersions> $1 = db.MiniProgramVersions.Where(m => $2).OrderByDescending(m => m.Id).ToList();",
+"foreach (MiniProgramVersions $3 in $1)",
+"{",
+"	int UserId = $3.UserId; //会员",
+"	int AuditId = $3.AuditId; //审核人",
+"	string AuditNote = $3.AuditNote; //审核意见",
+"	string UserRealName = $3.UserRealName; //会员姓名",
+"	string UserCode = $3.UserCode; //会员编号",
+"	string UserMobile = $3.UserMobile; //会员手机号",
+"	string SysAdminName = $3.SysAdminName; //审核人名称",
+"	int ProjectId = $3.ProjectId; //项目",
+"	string ProjectName = $3.ProjectName; //项目名称",
+"	string VerNum = $3.VerNum; //版本号",
+"	int UpdateKind = $3.UpdateKind; //更新类型",
+"	string UpdateNote = $3.UpdateNote; //更新备注",
+"	int VerType = $3.VerType; //版本类型",
+"	DateTime AuditDate = $3.AuditDate; //审核时间",
+"	DateTime PublishDate = $3.PublishDate; //发布时间",
+"	string SourceFilePath = $3.SourceFilePath; //资源文件路径",
+"}"
+]
+},
+"查询小程序版本库": {
+"prefix": "ym-db-MiniProgramVersions-Exist",
+"body": [
+"bool $1 = db.MiniProgramVersions.Any(m => m.Id == $2);",
+]
+},
+"查询某个小程序版本库,并取值": {
+"prefix": "ym-db-MiniProgramVersions-FindByPrimaryKey",
+"body": [
+"MiniProgramVersions $1 = db.MiniProgramVersions.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	int UserId = $1.UserId; //会员",
+"	int AuditId = $1.AuditId; //审核人",
+"	string AuditNote = $1.AuditNote; //审核意见",
+"	string UserRealName = $1.UserRealName; //会员姓名",
+"	string UserCode = $1.UserCode; //会员编号",
+"	string UserMobile = $1.UserMobile; //会员手机号",
+"	string SysAdminName = $1.SysAdminName; //审核人名称",
+"	int ProjectId = $1.ProjectId; //项目",
+"	string ProjectName = $1.ProjectName; //项目名称",
+"	string VerNum = $1.VerNum; //版本号",
+"	int UpdateKind = $1.UpdateKind; //更新类型",
+"	string UpdateNote = $1.UpdateNote; //更新备注",
+"	int VerType = $1.VerType; //版本类型",
+"	DateTime AuditDate = $1.AuditDate; //审核时间",
+"	DateTime PublishDate = $1.PublishDate; //发布时间",
+"	string SourceFilePath = $1.SourceFilePath; //资源文件路径",
+"}"
+]
+},
+"查询某个小程序版本库,并赋值": {
+"prefix": "ym-db-MiniProgramVersions-Update",
+"body": [
+"MiniProgramVersions $1 = db.MiniProgramVersions.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	$1.UserId = $2; //会员",
+"	$1.AuditId = $3; //审核人",
+"	$1.AuditNote = $4; //审核意见",
+"	$1.UserRealName = $5; //会员姓名",
+"	$1.UserCode = $6; //会员编号",
+"	$1.UserMobile = $7; //会员手机号",
+"	$1.SysAdminName = $8; //审核人名称",
+"	$1.ProjectId = $9; //项目",
+"	$1.ProjectName = $10; //项目名称",
+"	$1.VerNum = $11; //版本号",
+"	$1.UpdateKind = $12; //更新类型",
+"	$1.UpdateNote = $13; //更新备注",
+"	$1.VerType = $14; //版本类型",
+"	$1.AuditDate = $15; //审核时间",
+"	$1.PublishDate = $16; //发布时间",
+"	$1.SourceFilePath = $17; //资源文件路径",
+"}"
+]
+},
+"获取小程序版本库数量": {
+"prefix": "ym-db-MiniProgramVersions-FindAndCount",
+"body": [
+"int $1 = db.MiniProgramVersions.Count(m => $2);",
+]
+},
+"添加小程序版本库": {
+"prefix": "ym-db-MiniProgramVersions-Create",
+"body": [
+"db.MiniProgramVersions.Add(new MiniProgramVersions()",
+"{",
+"	CreateDate = DateTime.Now,",
+"	UpdateDate = DateTime.Now,",
+"	UserId = $1, //会员",
+"	AuditId = $2, //审核人",
+"	AuditNote = $3, //审核意见",
+"	UserRealName = $4, //会员姓名",
+"	UserCode = $5, //会员编号",
+"	UserMobile = $6, //会员手机号",
+"	SysAdminName = $7, //审核人名称",
+"	ProjectId = $8, //项目",
+"	ProjectName = $9, //项目名称",
+"	VerNum = $10, //版本号",
+"	UpdateKind = $11, //更新类型",
+"	UpdateNote = $12, //更新备注",
+"	VerType = $13, //版本类型",
+"	AuditDate = $14, //审核时间",
+"	PublishDate = $15, //发布时间",
+"	SourceFilePath = $16, //资源文件路径",
+"});"
+]
+},"删除某个小程序版本库": {
+"prefix": "ym-db-MiniProgramVersions-Delete",
+"body": [
+"MiniProgramVersions $1 = db.MiniProgramVersions.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	db.MiniProgramVersions.Remove($1);",
+"}"
+]
+},
+"查询单页内容列表": {
+"prefix": "ym-db-PageInfo-Find",
+"body": [
+"List<PageInfo> $1 = db.PageInfo.Where(m => $2).OrderByDescending(m => m.Id).ToList();",
+"foreach (PageInfo $3 in $1)",
+"{",
+"}"
+]
+},
+"查询单页内容列表,并取值": {
+"prefix": "ym-db-PageInfo-FindWithData",
+"body": [
+"List<PageInfo> $1 = db.PageInfo.Where(m => $2).OrderByDescending(m => m.Id).ToList();",
+"foreach (PageInfo $3 in $1)",
+"{",
+"	string Title = $3.Title; //标题",
+"	string ColId = $3.ColId; //分类",
+"	string Contents = $3.Contents; //内容",
+"}"
+]
+},
+"查询单页内容": {
+"prefix": "ym-db-PageInfo-Exist",
+"body": [
+"bool $1 = db.PageInfo.Any(m => m.Id == $2);",
+]
+},
+"查询某个单页内容,并取值": {
+"prefix": "ym-db-PageInfo-FindByPrimaryKey",
+"body": [
+"PageInfo $1 = db.PageInfo.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	string Title = $1.Title; //标题",
+"	string ColId = $1.ColId; //分类",
+"	string Contents = $1.Contents; //内容",
+"}"
+]
+},
+"查询某个单页内容,并赋值": {
+"prefix": "ym-db-PageInfo-Update",
+"body": [
+"PageInfo $1 = db.PageInfo.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	$1.Title = $2; //标题",
+"	$1.ColId = $3; //分类",
+"	$1.Contents = $4; //内容",
+"}"
+]
+},
+"获取单页内容数量": {
+"prefix": "ym-db-PageInfo-FindAndCount",
+"body": [
+"int $1 = db.PageInfo.Count(m => $2);",
+]
+},
+"添加单页内容": {
+"prefix": "ym-db-PageInfo-Create",
+"body": [
+"db.PageInfo.Add(new PageInfo()",
+"{",
+"	CreateDate = DateTime.Now,",
+"	UpdateDate = DateTime.Now,",
+"	Title = $1, //标题",
+"	ColId = $2, //分类",
+"	Contents = $3, //内容",
+"});"
+]
+},"删除某个单页内容": {
+"prefix": "ym-db-PageInfo-Delete",
+"body": [
+"PageInfo $1 = db.PageInfo.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	db.PageInfo.Remove($1);",
+"}"
+]
+},
+"查询项目审核记录列表": {
+"prefix": "ym-db-ProjectAuditRecord-Find",
+"body": [
+"List<ProjectAuditRecord> $1 = db.ProjectAuditRecord.Where(m => $2).OrderByDescending(m => m.Id).ToList();",
+"foreach (ProjectAuditRecord $3 in $1)",
+"{",
+"}"
+]
+},
+"查询项目审核记录列表,并取值": {
+"prefix": "ym-db-ProjectAuditRecord-FindWithData",
+"body": [
+"List<ProjectAuditRecord> $1 = db.ProjectAuditRecord.Where(m => $2).OrderByDescending(m => m.Id).ToList();",
+"foreach (ProjectAuditRecord $3 in $1)",
+"{",
+"	int UserId = $3.UserId; //会员",
+"	int AuditId = $3.AuditId; //审核人",
+"	string AuditNote = $3.AuditNote; //审核意见",
+"	string UserRealName = $3.UserRealName; //会员姓名",
+"	string UserCode = $3.UserCode; //会员编号",
+"	string UserMobile = $3.UserMobile; //会员手机号",
+"	string SysAdminName = $3.SysAdminName; //审核人名称",
+"	int ProjectId = $3.ProjectId; //项目",
+"	string ProjectName = $3.ProjectName; //项目名称",
+"}"
+]
+},
+"查询项目审核记录": {
+"prefix": "ym-db-ProjectAuditRecord-Exist",
+"body": [
+"bool $1 = db.ProjectAuditRecord.Any(m => m.Id == $2);",
+]
+},
+"查询某个项目审核记录,并取值": {
+"prefix": "ym-db-ProjectAuditRecord-FindByPrimaryKey",
+"body": [
+"ProjectAuditRecord $1 = db.ProjectAuditRecord.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	int UserId = $1.UserId; //会员",
+"	int AuditId = $1.AuditId; //审核人",
+"	string AuditNote = $1.AuditNote; //审核意见",
+"	string UserRealName = $1.UserRealName; //会员姓名",
+"	string UserCode = $1.UserCode; //会员编号",
+"	string UserMobile = $1.UserMobile; //会员手机号",
+"	string SysAdminName = $1.SysAdminName; //审核人名称",
+"	int ProjectId = $1.ProjectId; //项目",
+"	string ProjectName = $1.ProjectName; //项目名称",
+"}"
+]
+},
+"查询某个项目审核记录,并赋值": {
+"prefix": "ym-db-ProjectAuditRecord-Update",
+"body": [
+"ProjectAuditRecord $1 = db.ProjectAuditRecord.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	$1.UserId = $2; //会员",
+"	$1.AuditId = $3; //审核人",
+"	$1.AuditNote = $4; //审核意见",
+"	$1.UserRealName = $5; //会员姓名",
+"	$1.UserCode = $6; //会员编号",
+"	$1.UserMobile = $7; //会员手机号",
+"	$1.SysAdminName = $8; //审核人名称",
+"	$1.ProjectId = $9; //项目",
+"	$1.ProjectName = $10; //项目名称",
+"}"
+]
+},
+"获取项目审核记录数量": {
+"prefix": "ym-db-ProjectAuditRecord-FindAndCount",
+"body": [
+"int $1 = db.ProjectAuditRecord.Count(m => $2);",
+]
+},
+"添加项目审核记录": {
+"prefix": "ym-db-ProjectAuditRecord-Create",
+"body": [
+"db.ProjectAuditRecord.Add(new ProjectAuditRecord()",
+"{",
+"	CreateDate = DateTime.Now,",
+"	UpdateDate = DateTime.Now,",
+"	UserId = $1, //会员",
+"	AuditId = $2, //审核人",
+"	AuditNote = $3, //审核意见",
+"	UserRealName = $4, //会员姓名",
+"	UserCode = $5, //会员编号",
+"	UserMobile = $6, //会员手机号",
+"	SysAdminName = $7, //审核人名称",
+"	ProjectId = $8, //项目",
+"	ProjectName = $9, //项目名称",
+"});"
+]
+},"删除某个项目审核记录": {
+"prefix": "ym-db-ProjectAuditRecord-Delete",
+"body": [
+"ProjectAuditRecord $1 = db.ProjectAuditRecord.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	db.ProjectAuditRecord.Remove($1);",
+"}"
+]
+},
+"查询后台管理员列表": {
+"prefix": "ym-db-SysAdmin-Find",
+"body": [
+"List<SysAdmin> $1 = db.SysAdmin.Where(m => $2).OrderByDescending(m => m.Id).ToList();",
+"foreach (SysAdmin $3 in $1)",
+"{",
+"}"
+]
+},
+"查询后台管理员列表,并取值": {
+"prefix": "ym-db-SysAdmin-FindWithData",
+"body": [
+"List<SysAdmin> $1 = db.SysAdmin.Where(m => $2).OrderByDescending(m => m.Id).ToList();",
+"foreach (SysAdmin $3 in $1)",
+"{",
+"	string AdminName = $3.AdminName; //用户名",
+"	string Password = $3.Password; //密码",
+"	string RealName = $3.RealName; //名称",
+"	string Role = $3.Role; //角色",
+"	DateTime LastLoginDate = $3.LastLoginDate; //最后登录时间",
+"}"
+]
+},
+"查询后台管理员": {
+"prefix": "ym-db-SysAdmin-Exist",
+"body": [
+"bool $1 = db.SysAdmin.Any(m => m.Id == $2);",
+]
+},
+"查询某个后台管理员,并取值": {
+"prefix": "ym-db-SysAdmin-FindByPrimaryKey",
+"body": [
+"SysAdmin $1 = db.SysAdmin.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	string AdminName = $1.AdminName; //用户名",
+"	string Password = $1.Password; //密码",
+"	string RealName = $1.RealName; //名称",
+"	string Role = $1.Role; //角色",
+"	DateTime LastLoginDate = $1.LastLoginDate; //最后登录时间",
+"}"
+]
+},
+"查询某个后台管理员,并赋值": {
+"prefix": "ym-db-SysAdmin-Update",
+"body": [
+"SysAdmin $1 = db.SysAdmin.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	$1.AdminName = $2; //用户名",
+"	$1.Password = $3; //密码",
+"	$1.RealName = $4; //名称",
+"	$1.Role = $5; //角色",
+"	$1.LastLoginDate = $6; //最后登录时间",
+"}"
+]
+},
+"获取后台管理员数量": {
+"prefix": "ym-db-SysAdmin-FindAndCount",
+"body": [
+"int $1 = db.SysAdmin.Count(m => $2);",
+]
+},
+"添加后台管理员": {
+"prefix": "ym-db-SysAdmin-Create",
+"body": [
+"db.SysAdmin.Add(new SysAdmin()",
+"{",
+"	CreateDate = DateTime.Now,",
+"	UpdateDate = DateTime.Now,",
+"	AdminName = $1, //用户名",
+"	Password = $2, //密码",
+"	RealName = $3, //名称",
+"	Role = $4, //角色",
+"	LastLoginDate = $5, //最后登录时间",
+"});"
+]
+},"删除某个后台管理员": {
+"prefix": "ym-db-SysAdmin-Delete",
+"body": [
+"SysAdmin $1 = db.SysAdmin.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	db.SysAdmin.Remove($1);",
+"}"
+]
+},
+"查询后台管理员角色列表": {
+"prefix": "ym-db-SysAdminRole-Find",
+"body": [
+"List<SysAdminRole> $1 = db.SysAdminRole.Where(m => $2).OrderByDescending(m => m.Id).ToList();",
+"foreach (SysAdminRole $3 in $1)",
+"{",
+"}"
+]
+},
+"查询后台管理员角色列表,并取值": {
+"prefix": "ym-db-SysAdminRole-FindWithData",
+"body": [
+"List<SysAdminRole> $1 = db.SysAdminRole.Where(m => $2).OrderByDescending(m => m.Id).ToList();",
+"foreach (SysAdminRole $3 in $1)",
+"{",
+"	string Name = $3.Name; //名称",
+"	string Details = $3.Details; //描述",
+"	string RightInfo = $3.RightInfo; //权限设置",
+"}"
+]
+},
+"查询后台管理员角色": {
+"prefix": "ym-db-SysAdminRole-Exist",
+"body": [
+"bool $1 = db.SysAdminRole.Any(m => m.Id == $2);",
+]
+},
+"查询某个后台管理员角色,并取值": {
+"prefix": "ym-db-SysAdminRole-FindByPrimaryKey",
+"body": [
+"SysAdminRole $1 = db.SysAdminRole.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	string Name = $1.Name; //名称",
+"	string Details = $1.Details; //描述",
+"	string RightInfo = $1.RightInfo; //权限设置",
+"}"
+]
+},
+"查询某个后台管理员角色,并赋值": {
+"prefix": "ym-db-SysAdminRole-Update",
+"body": [
+"SysAdminRole $1 = db.SysAdminRole.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	$1.Name = $2; //名称",
+"	$1.Details = $3; //描述",
+"	$1.RightInfo = $4; //权限设置",
+"}"
+]
+},
+"获取后台管理员角色数量": {
+"prefix": "ym-db-SysAdminRole-FindAndCount",
+"body": [
+"int $1 = db.SysAdminRole.Count(m => $2);",
+]
+},
+"添加后台管理员角色": {
+"prefix": "ym-db-SysAdminRole-Create",
+"body": [
+"db.SysAdminRole.Add(new SysAdminRole()",
+"{",
+"	CreateDate = DateTime.Now,",
+"	UpdateDate = DateTime.Now,",
+"	Name = $1, //名称",
+"	Details = $2, //描述",
+"	RightInfo = $3, //权限设置",
+"});"
+]
+},"删除某个后台管理员角色": {
+"prefix": "ym-db-SysAdminRole-Delete",
+"body": [
+"SysAdminRole $1 = db.SysAdminRole.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	db.SysAdminRole.Remove($1);",
+"}"
+]
+},
+"查询系统设置列表": {
+"prefix": "ym-db-SystemSet-Find",
+"body": [
+"List<SystemSet> $1 = db.SystemSet.Where(m => $2).OrderByDescending(m => m.Id).ToList();",
+"foreach (SystemSet $3 in $1)",
+"{",
+"}"
+]
+},
+"查询系统设置列表,并取值": {
+"prefix": "ym-db-SystemSet-FindWithData",
+"body": [
+"List<SystemSet> $1 = db.SystemSet.Where(m => $2).OrderByDescending(m => m.Id).ToList();",
+"foreach (SystemSet $3 in $1)",
+"{",
+"	string WebUrl = $3.WebUrl; //网站地址",
+"	string WebName = $3.WebName; //网站名称",
+"	string IndexKeyword = $3.IndexKeyword; //首页关键词",
+"	string IndexDescription = $3.IndexDescription; //首页简介",
+"	string UploadExt = $3.UploadExt; //允许上传类型",
+"	int UploadMaxSize = $3.UploadMaxSize; //允许最大上传",
+"	ulong UploadAutoZoom = $3.UploadAutoZoom; //自动缩略图",
+"	int UploadAutoZoomWidth = $3.UploadAutoZoomWidth; //自动缩略图宽",
+"	int UploadAutoZoomHeight = $3.UploadAutoZoomHeight; //自动缩略图高",
+"	ulong UploadAutoWater = $3.UploadAutoWater; //自动水印",
+"	string UploadWaterPosition = $3.UploadWaterPosition; //水印位置",
+"	string UploadWaterPath = $3.UploadWaterPath; //水印图片",
+"	string RightInfo = $3.RightInfo; //版权信息",
+"	string Address = $3.Address; //企业地址",
+"	string Phone = $3.Phone; //联系电话",
+"	string WebStatCode = $3.WebStatCode; //网站统计代码",
+"	string Logo = $3.Logo; //Logo图片",
+"}"
+]
+},
+"查询系统设置": {
+"prefix": "ym-db-SystemSet-Exist",
+"body": [
+"bool $1 = db.SystemSet.Any(m => m.Id == $2);",
+]
+},
+"查询某个系统设置,并取值": {
+"prefix": "ym-db-SystemSet-FindByPrimaryKey",
+"body": [
+"SystemSet $1 = db.SystemSet.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	string WebUrl = $1.WebUrl; //网站地址",
+"	string WebName = $1.WebName; //网站名称",
+"	string IndexKeyword = $1.IndexKeyword; //首页关键词",
+"	string IndexDescription = $1.IndexDescription; //首页简介",
+"	string UploadExt = $1.UploadExt; //允许上传类型",
+"	int UploadMaxSize = $1.UploadMaxSize; //允许最大上传",
+"	ulong UploadAutoZoom = $1.UploadAutoZoom; //自动缩略图",
+"	int UploadAutoZoomWidth = $1.UploadAutoZoomWidth; //自动缩略图宽",
+"	int UploadAutoZoomHeight = $1.UploadAutoZoomHeight; //自动缩略图高",
+"	ulong UploadAutoWater = $1.UploadAutoWater; //自动水印",
+"	string UploadWaterPosition = $1.UploadWaterPosition; //水印位置",
+"	string UploadWaterPath = $1.UploadWaterPath; //水印图片",
+"	string RightInfo = $1.RightInfo; //版权信息",
+"	string Address = $1.Address; //企业地址",
+"	string Phone = $1.Phone; //联系电话",
+"	string WebStatCode = $1.WebStatCode; //网站统计代码",
+"	string Logo = $1.Logo; //Logo图片",
+"}"
+]
+},
+"查询某个系统设置,并赋值": {
+"prefix": "ym-db-SystemSet-Update",
+"body": [
+"SystemSet $1 = db.SystemSet.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	$1.WebUrl = $2; //网站地址",
+"	$1.WebName = $3; //网站名称",
+"	$1.IndexKeyword = $4; //首页关键词",
+"	$1.IndexDescription = $5; //首页简介",
+"	$1.UploadExt = $6; //允许上传类型",
+"	$1.UploadMaxSize = $7; //允许最大上传",
+"	$1.UploadAutoZoom = $8; //自动缩略图",
+"	$1.UploadAutoZoomWidth = $9; //自动缩略图宽",
+"	$1.UploadAutoZoomHeight = $10; //自动缩略图高",
+"	$1.UploadAutoWater = $11; //自动水印",
+"	$1.UploadWaterPosition = $12; //水印位置",
+"	$1.UploadWaterPath = $13; //水印图片",
+"	$1.RightInfo = $14; //版权信息",
+"	$1.Address = $15; //企业地址",
+"	$1.Phone = $16; //联系电话",
+"	$1.WebStatCode = $17; //网站统计代码",
+"	$1.Logo = $18; //Logo图片",
+"}"
+]
+},
+"获取系统设置数量": {
+"prefix": "ym-db-SystemSet-FindAndCount",
+"body": [
+"int $1 = db.SystemSet.Count(m => $2);",
+]
+},
+"添加系统设置": {
+"prefix": "ym-db-SystemSet-Create",
+"body": [
+"db.SystemSet.Add(new SystemSet()",
+"{",
+"	CreateDate = DateTime.Now,",
+"	UpdateDate = DateTime.Now,",
+"	WebUrl = $1, //网站地址",
+"	WebName = $2, //网站名称",
+"	IndexKeyword = $3, //首页关键词",
+"	IndexDescription = $4, //首页简介",
+"	UploadExt = $5, //允许上传类型",
+"	UploadMaxSize = $6, //允许最大上传",
+"	UploadAutoZoom = $7, //自动缩略图",
+"	UploadAutoZoomWidth = $8, //自动缩略图宽",
+"	UploadAutoZoomHeight = $9, //自动缩略图高",
+"	UploadAutoWater = $10, //自动水印",
+"	UploadWaterPosition = $11, //水印位置",
+"	UploadWaterPath = $12, //水印图片",
+"	RightInfo = $13, //版权信息",
+"	Address = $14, //企业地址",
+"	Phone = $15, //联系电话",
+"	WebStatCode = $16, //网站统计代码",
+"	Logo = $17, //Logo图片",
+"});"
+]
+},"删除某个系统设置": {
+"prefix": "ym-db-SystemSet-Delete",
+"body": [
+"SystemSet $1 = db.SystemSet.FirstOrDefault(m => m.Id == $2);",
+"if ($1 != null)",
+"{",
+"	db.SystemSet.Remove($1);",
+"}"
+]
+},
+}

+ 53 - 0
.vscode/launch.json

@@ -0,0 +1,53 @@
+{
+    // 使用 IntelliSense 了解相关属性。 
+    // 悬停以查看现有属性的描述。
+    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
+    "version": "0.2.0",
+    "configurations": [{
+            "name": ".NET Core Launch (web)",
+            "type": "coreclr",
+            "request": "launch",
+            "preLaunchTask": "build",
+            "program": "${workspaceFolder}/bin/Debug/netcoreapp3.1/MySystem.dll",
+            "args": [],
+            "cwd": "${workspaceFolder}",
+            "stopAtEntry": false,
+            "serverReadyAction": {
+                "action": "openExternally",
+                "pattern": "^\\s*Now listening on:\\s+(https?://\\S+)"
+            },
+            "env": {
+                "ASPNETCORE_ENVIRONMENT": "Development"
+            },
+            "sourceFileMap": {
+                "/Views": "${workspaceFolder}/Views"
+            }
+        },
+        {
+            "name": ".NET Core Launch (pro)",
+            "type": "coreclr",
+            "request": "launch",
+            "preLaunchTask": "build",
+            "program": "${workspaceFolder}/bin/Debug/netcoreapp3.1/MySystem.dll",
+            "args": [],
+            "cwd": "${workspaceFolder}",
+            "stopAtEntry": false,
+            "serverReadyAction": {
+                "action": "openExternally",
+                "pattern": "^\\s*Now listening on:\\s+(https?://\\S+)"
+            },
+            "env": {
+                "ASPNETCORE_ENVIRONMENT": "Production"
+            },
+            "sourceFileMap": {
+                "/Views": "${workspaceFolder}/Views"
+            }
+        },
+        {
+            "name": ".NET Core Attach",
+            "type": "coreclr",
+            "request": "attach",
+            "processId": "${command:pickProcess}"
+        }
+    ]
+}

+ 55 - 0
.vscode/public.code-snippets

@@ -0,0 +1,55 @@
+{
+	// Place your 全局 snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and 
+	// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope 
+	// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is 
+	// used to trigger the snippet and the body will be expanded and inserted. Possible variables are: 
+	// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. 
+	// Placeholders with the same ids are connected.
+	// Example:
+	// "Print to console": {
+	// 	"scope": "javascript,typescript",
+	// 	"prefix": "log",
+	// 	"body": [
+	// 		"console.log('$1');",
+	// 		"$2"
+	// 	],
+	// 	"description": "Log output to console"
+	// }
+
+	"定义字符字典变量": {
+		"prefix": "dic-string",
+		"body": [
+			"Dictionary<string, string> $1 = new Dictionary<string, string>();",
+		]
+	},
+	"定义对象字典变量": {
+		"prefix": "dic-object",
+		"body": [
+			"Dictionary<string, object> $1 = new Dictionary<string, object>();",
+		]
+	},
+	"定义字符数组": {
+		"prefix": "list-string",
+		"body": [
+			"List<string> $1 = new List<string>();",
+		]
+	},
+	"定义整形数组": {
+		"prefix": "list-int",
+		"body": [
+			"List<int> $1 = new List<int>();",
+		]
+	},
+	"定义字符字典数组": {
+		"prefix": "ld-string",
+		"body": [
+			"List<Dictionary<string, string>> $1 = new List<Dictionary<string, string>>();",
+		]
+	},
+	"定义对象字典数组": {
+		"prefix": "ld-object",
+		"body": [
+			"List<Dictionary<string, object>> $1 = new List<Dictionary<string, object>>();",
+		]
+	}
+}

+ 42 - 0
.vscode/tasks.json

@@ -0,0 +1,42 @@
+{
+    "version": "2.0.0",
+    "tasks": [
+        {
+            "label": "build",
+            "command": "dotnet",
+            "type": "process",
+            "args": [
+                "build",
+                "${workspaceFolder}/MySystem.csproj",
+                "/property:GenerateFullPaths=true",
+                "/consoleloggerparameters:NoSummary"
+            ],
+            "problemMatcher": "$msCompile"
+        },
+        {
+            "label": "publish",
+            "command": "dotnet",
+            "type": "process",
+            "args": [
+                "publish",
+                "${workspaceFolder}/MySystem.csproj",
+                "/property:GenerateFullPaths=true",
+                "/consoleloggerparameters:NoSummary"
+            ],
+            "problemMatcher": "$msCompile"
+        },
+        {
+            "label": "watch",
+            "command": "dotnet",
+            "type": "process",
+            "args": [
+                "watch",
+                "run",
+                "${workspaceFolder}/MySystem.csproj",
+                "/property:GenerateFullPaths=true",
+                "/consoleloggerparameters:NoSummary"
+            ],
+            "problemMatcher": "$msCompile"
+        }
+    ]
+}

+ 35 - 0
AppStart/StartHelper.cs

@@ -0,0 +1,35 @@
+namespace MySystem
+{
+    public class StartHelper
+    {
+        public readonly static StartHelper Instance = new StartHelper();
+        private StartHelper()
+        {
+        }
+
+        public void Start()//启动
+        {
+            int Environment = Library.ConfigurationManager.EnvironmentFlag; //运行环境(1-开发环境,2-生产环境)
+            if(Environment == 2)
+            {
+                SourceHelper.Instance.Start(); //获取原始数据队列
+                PushHelper.Instance.Start(); //推送队列
+                RePushHelper.Instance.Start(); //重新推送队列
+                AliyunPushHelper.Instance.Start(); //阿里云消息推送
+                PosPushHelper.Instance.Start(); //推送机具数据
+                PosPushHelper.Instance.StartSaveToDb(); //保存推送结果
+                PosRePushHelper.Instance.Start(); //重推送机具数据
+
+                // DefaultHelper.Instance.Start(); //队列程序
+                // ......其他队列程序
+            }
+            else
+            {
+                PosPushHelper.Instance.Start(); //推送机具数据
+                // PosPushHelper.Instance.StartTest(); //推送机具数据
+                // SourceHelper.Instance.Start(); //获取原始数据队列
+                // PushHelper.Instance.Start(); //推送队列
+            }
+        }
+    }
+}

+ 28 - 0
AppStart/TemplateViewLocationExpander.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Microsoft.AspNetCore.Mvc.Razor;
+
+namespace MySystem
+{
+    public class TemplateViewLocationExpander : IViewLocationExpander
+    {
+        public IEnumerable<string> ExpandViewLocations(ViewLocationExpanderContext context, IEnumerable<string> viewLocations)
+        {
+            /// <summary>
+            /// view文件路径
+            /// </summary>
+            /// <value></value>
+            string[] locations = {
+                "/Areas/Admin/Views/Admin/{1}/{0}.cshtml",
+                "/Areas/Admin/Views/Base/{1}/{0}.cshtml",
+            };
+            return locations.Union(viewLocations);
+        }
+
+        public void PopulateValues(ViewLocationExpanderContext context)
+        {
+            context.Values["template"] = context.ActionContext.RouteData.Values["Template"]?.ToString() ?? "Default";
+        }
+    }
+}

+ 25 - 0
Config/Base.cs

@@ -0,0 +1,25 @@
+using System.Collections.Generic;
+using Library;
+
+namespace AppConfig
+{
+    public class Base
+    {
+        public static string ApiKey = "G6H7@J8%";
+        public static string SqlConnStr = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        public static string SourceSqlConnStr = ConfigurationManager.AppSettings["SourceSqlConnStr"].ToString();
+        public static string RmSourceSqlConnStr = ConfigurationManager.AppSettings["RmSourceSqlConnStr"].ToString();
+        public static string JavaStatSqlConnStr = ConfigurationManager.AppSettings["JavaStatSqlConnStr"].ToString();
+        public static string Host = Library.ConfigurationManager.AppSettings["Host"].ToString();
+        public static string SourceHost = Library.ConfigurationManager.AppSettings["SourceHost"].ToString();
+        public static string JavaPushHost = Library.ConfigurationManager.AppSettings["JavaPushHost"].ToString();
+        public static string Database = Library.ConfigurationManager.AppSettings["Database"].ToString();
+        public static string defaultImage = Library.ConfigurationManager.AppSettings["Host"].ToString() + "/skin/app/default/static/images/default.jpg";
+        #region 数据库结构
+        public static Dictionary<string, Dictionary<string, string>> dbTables = new Dictionary<string, Dictionary<string, string>>();
+        public static Dictionary<string, Dictionary<string, string>> mainTables = new Dictionary<string, Dictionary<string, string>>();
+        public static Dictionary<string, Dictionary<string, string>> opTables = new Dictionary<string, Dictionary<string, string>>();
+
+        #endregion
+    }
+}

+ 15 - 0
Config/JwtConfig.cs

@@ -0,0 +1,15 @@
+using Library;
+
+/// <summary>
+/// MySql链接
+/// </summary>
+namespace MySystem
+{
+    public class JwtConfig
+    {
+        public static string JwtSecret = ConfigurationManager.AppSettings["JwtSecret"].ToString();
+        public static string JwtIss = ConfigurationManager.AppSettings["JwtIss"].ToString();
+        public static string JwtAud = ConfigurationManager.AppSettings["JwtAud"].ToString();
+
+    }
+}

+ 12 - 0
Config/LoginSession.cs

@@ -0,0 +1,12 @@
+using System.Collections.Generic;
+using Library;
+
+namespace AppConfig
+{
+    public class LoginSession
+    {
+        public static int sysId;
+        public static string sysAdminName;
+        public static string sysRealName;
+    }
+}

+ 22 - 0
Config/Oss.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Threading;
+using System.Linq;
+using System.IO;
+using Aliyun.OSS;
+using Aliyun.OSS.Common;
+using Library;
+using System.Text.RegularExpressions;
+
+namespace AppConfig
+{
+    public class Oss
+    {
+        public static string key = ConfigurationManager.AppSettings["OSSKey"].ToString(); //阿里云AccessKey ID
+        public static string secret = ConfigurationManager.AppSettings["OSSSecret"].ToString();  //阿里云Access Key Secret
+        public static string PathName = ConfigurationManager.AppSettings["Database"].ToString();
+        public static string endpoint = ConfigurationManager.AppSettings["OSSEndpoint"].ToString();  //endpoint
+        public static string bucketName = ConfigurationManager.AppSettings["OSSBucketName"].ToString();
+        public static string SourceHost = "";
+        public static bool OssStatus = true;
+    }
+}

+ 241 - 0
Controllers/HomeController.cs

@@ -0,0 +1,241 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Logging;
+using Library;
+using LitJson;
+
+namespace MySystem.Controllers
+{
+    public class HomeController : Controller
+    {
+        private readonly ILogger<HomeController> _logger;
+
+        public HomeController(ILogger<HomeController> logger)
+        {
+            _logger = logger;
+        }
+
+        public IActionResult Index()
+        {
+            return View();
+        }
+
+        public string test()
+        {
+            // testReq("http://idc.pay-api.top/idc-push-api/third/1050056/1560192687980675072/1", "bind_merchant");
+            // testReq("http://idc.pay-api.top/idc-push-api/third/1050056/1560192687980675072/8", "un_bind_merchant");
+            // testReq("http://idc.pay-api.top/idc-push-api/third/1050056/1560192687980675072/236", "change_bind_merchant");
+            // testReq("http://idc.pay-api.top/idc-push-api/third/1050056/1560192687980675072/4", "sim_charge");
+            testReq("http://idc.pay-api.top/idc-push-api/third/1050056/1560192687980675072/3", "service_fee");
+            testReq("http://idc.pay-api.top/idc-push-api/third/1050056/1560192687980675072/2", "trade");
+            return "ok";
+        }
+
+        public string testReq(string requrl, string reqkind)
+        {
+            SortedList<string, string> obj = new SortedList<string, string>();
+            if(reqkind == "bind_merchant") obj = bind_merchant();
+            if(reqkind == "un_bind_merchant") obj = un_bind_merchant();
+            if(reqkind == "change_bind_merchant") obj = change_bind_merchant();
+            if(reqkind == "sim_charge") obj = sim_charge();
+            if(reqkind == "service_fee") obj = service_fee();
+            if(reqkind == "trade") obj = trade();
+            string content = EncryptHelper.Encrypt1(obj, "57yJ3T1Btz7LytyL");
+            obj = new SortedList<string, string>();
+            obj.Add("type", reqkind);
+            obj.Add("app_id", "KXS000001");
+            obj.Add("notice_id", Guid.NewGuid().ToString());
+            obj.Add("timestamp", DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8));
+            obj.Add("content", content);
+            string requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(obj);
+            Utils.WriteLog("请求地址:" + requrl);
+            Utils.WriteLog("请求参数:" + requestJson);
+            string result = function.PostWebRequest(requrl, requestJson, "application/json");
+            Utils.WriteLog("返回:" + result);
+            Utils.WriteLog("\n\n\n");
+            return result;
+        }
+
+        private SortedList<string, string> bind_merchant()
+        {
+            SortedList<string, string> obj = new SortedList<string, string>();
+            obj.Add("phone", "**********");
+            obj.Add("name", "杨洪江");
+            obj.Add("supplement_info", "533022********2015");
+            obj.Add("agent_id", "039034");
+            obj.Add("merch_no", "039331007177057");
+            obj.Add("pos_sn", "00005702280118855803");
+            obj.Add("device_model", "盒易付H版");
+            obj.Add("term_to", "00005702280118855803");
+            obj.Add("bind_time", "2023-12-14 16:32:38");
+            return obj;
+        }
+
+        private SortedList<string, string> un_bind_merchant()
+        {
+            SortedList<string, string> obj = new SortedList<string, string>();
+            obj.Add("name", "张**");
+            obj.Add("supplement_info", "4307************48");
+            obj.Add("agent_id", "88880019");
+            obj.Add("merch_no", "LKB50009993529999");
+            obj.Add("pos_sn", "LKB1888888");
+            obj.Add("device_model", "N101");
+            obj.Add("bind_time", "2019-03-12 22:21:50");
+            return obj;
+        }
+
+        private SortedList<string, string> change_bind_merchant()
+        {
+            SortedList<string, string> obj = new SortedList<string, string>();
+            obj.Add("name", "张**");
+            obj.Add("supplement_info", "4307************48");
+            obj.Add("agent_id", "88880019");
+            obj.Add("merch_no", "LKB50009993529999");
+            obj.Add("before_pos_sn", "LKB1888888");
+            obj.Add("after_pos_sn", "LKB1888888");
+            obj.Add("before_device_model", "N101");
+            obj.Add("after_device_model", "N102");
+            obj.Add("bind_time", "2019-03-12 22:21:50");
+            return obj;
+        }
+
+        private SortedList<string, string> sim_charge()
+        {
+            SortedList<string, string> obj = new SortedList<string, string>();
+            obj.Add("merch_no", "LKB50009993529999");
+            obj.Add("agent_id", "88880019");
+            obj.Add("pos_sn", "LKB188FBMS78888");
+            obj.Add("amount", "9900");
+            obj.Add("order_id", "2004190320190312222130116680");
+            obj.Add("trans_time", "2019-03-12 22:23:02");
+            return obj;
+        }
+
+        private SortedList<string, string> service_fee()
+        {
+            SortedList<string, string> obj = new SortedList<string, string>();
+            obj.Add("merch_no", "039331007177057");
+            obj.Add("agent_id", "039034");
+            obj.Add("pos_sn", "00005702280118855803");
+            obj.Add("order_id", "20231214H00040601976Y");
+            obj.Add("amount", "29900");
+            obj.Add("trans_time", "2023-12-14 16:39:43");
+            return obj;
+        }
+
+        private SortedList<string, string> trade()
+        {
+            SortedList<string, string> obj = new SortedList<string, string>();
+            obj.Add("agent_id", "039034");
+            obj.Add("order_id", "20231214H00040608996Y");
+            obj.Add("trans_id", "20231214H00040608996Y");
+            obj.Add("merch_no", "039331007177057");
+            obj.Add("term_no", "00005702280118855803");
+            obj.Add("pos_sn", "00005702280118855803");
+            obj.Add("amount", "102500");
+            obj.Add("trans_time", "2023-12-14 16:54:17");
+            obj.Add("ret_code", "00");
+            obj.Add("ret_msg", "交易成功");
+            obj.Add("fee_amount", "615");
+            obj.Add("pay_type", "0");
+            obj.Add("card_type", "C");
+            obj.Add("trans_type", "31");
+            return obj;
+        }
+
+        public string push()
+        {
+            // AliyunPushHelper.Instance.DoSomeThing("{\"Account\":\"14726006947\",\"Device\":\"ANDROID\",\"Title\":\"测试推送\",\"Body\":\"客小爽推送功能即将上线\"}");
+            // AliyunPushHelper.Instance.DoSomeThing("{\"Account\":\"14726006947\",\"Device\":\"IOS\",\"Title\":\"测试推送\",\"Body\":\"客小爽推送功能即将上线\"}");
+            // string content = "{\"data_type\":\"bind\",\"data_content\":{\"pos_sn\":\"1014BS0023511\",\"mer_no\":\"15608798003\",\"id_card\":null,\"mer_name\":\"15608798003\",\"mer_mobile\":\"15608798003\",\"request_id\":\"2024102310381200098289115\",\"bind_time\":\"2024-10-23 10:38:12\",\"brand\":\"23\"}}";
+            // PosPushHelper.Instance.DoSomeThing(content);
+            SortedList<string, string> obj = new SortedList<string, string>();
+            obj.Add("pos_sn", "LDN7HDQM024111927716");
+            obj.Add("merch_no", "015110108481518");
+            obj.Add("agent_id", "0000001");
+            obj.Add("supplement_info", "");
+            obj.Add("name", "中投国信(北京)科技发展有限公司");
+            obj.Add("phone", "");
+            obj.Add("request_id", DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8));
+            obj.Add("device_model", "好哒扫码通M837");
+            obj.Add("term_to", "好哒扫码通M837");
+            obj.Add("bind_time", "2025-01-15 20:02:00");
+            obj.Add("credit_code", "91110108756029022Y"); //统一社会信用代码
+            jm(obj, "bind");
+
+            // SortedList<string, string> obj = new SortedList<string, string>();
+            // obj.Add("agent_id","0000001");
+            // obj.Add("busi_type","");
+            // obj.Add("busi_sub_type","");
+            // obj.Add("order_id","G1241227C03142143729");
+            // obj.Add("trans_id","G1241227C03142143729");
+            // obj.Add("merch_no","015330849562900");
+            // obj.Add("term_no","");
+            // obj.Add("pos_sn","LDN7HDQM365548961135");
+            // obj.Add("refer_no","");
+            // obj.Add("card_no","");
+            // obj.Add("amount","48.00");
+            // obj.Add("trans_time","2024-12-27 00:00:27");
+            // obj.Add("longitude","0");
+            // obj.Add("latitude","0");
+            // obj.Add("ret_code","00");
+            // obj.Add("ret_msg","交易成功");
+            // obj.Add("area_code","");
+            // obj.Add("fee_amount","0");
+            // obj.Add("pay_type","");
+            // jm(obj, "trade");
+
+            return "ok";
+        }
+
+        public string jm(SortedList<string, string> obj, string type)
+        {
+            // string NoticeUrl = "https://sy.sic-credit.com:9091/prod-api/space/open/api/commerce/offline/business/data"; //测试
+            string NoticeUrl = "https://cxsls.cniot-credit.com:9091/prod-api/space/open/api/commerce/offline/business/data"; //正式
+            string PushData = Newtonsoft.Json.JsonConvert.SerializeObject(obj);
+            LogHelper.Instance.WriteLog("原始数据:" + PushData, "推送数据日志");
+            string content = EncryptHelper.Encrypt1(obj, "KTVpzn70n3Bv7w04");
+            LogHelper.Instance.WriteLog("加密数据:" + content, "推送数据日志");
+            obj = new SortedList<string, string>();
+            obj.Add("type", type);
+            obj.Add("notice_id", Guid.NewGuid().ToString());
+            obj.Add("timestamp", function.getTimeStamp());
+            obj.Add("content", content);
+            string requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(obj);
+            string PushDataEncrypt = requestJson;
+            LogHelper.Instance.WriteLog("请求参数:" + PushDataEncrypt, "推送数据日志");
+            LogHelper.Instance.WriteLog("请求地址:" + NoticeUrl, "推送数据日志");
+            string result = function.PostWebRequest(NoticeUrl, requestJson, "application/json");
+            LogHelper.Instance.WriteLog("返回报文:" + result + "\n\n", "推送数据日志");
+            
+            return result;
+        }
+
+        public string push3()
+        {
+            string[] list = function.ReadInstance("9.txt").Split('\n');
+            foreach(string sub in list)
+            {
+                PosPushHelper.Instance.DoSomeThing(sub);
+            }
+            return "ok";
+        }
+
+        public string push2()
+        {
+            // List<string> list = new List<string>();
+            string[] list = function.ReadInstance("9.txt").Split('\n');
+            string result = ",";
+            foreach(string sub in list)
+            {
+                Utils.WriteLog(sub);
+                result += function.GetWebRequest("https://logic-executor-api.kexiaoshuang.com/noauth/prize/pushbyone?n=QUEUE_KXS_PRIZE_MALL_CONFIG_DIVISION&m=" + sub + "&ids=14");
+            }
+            return result;
+        }
+    }
+}

BIN
DLL/Aliyun.OSS.dll


BIN
DLL/LitJSON.dll


BIN
DLL/MySystemLib.dll


BIN
DLL/Newtonsoft.Json.dll


BIN
DLL/ThoughtWorks.QRCode.dll


BIN
DLL/aliyun-net-sdk-core.dll


+ 21 - 0
Entity/AdminRightListItem.cs

@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+namespace MySystem
+{
+    public class AdminRightListItem
+    {
+        public string path { get; set; }
+        public string name { get; set; }
+        public string component { get; set; }
+        public AdminRightListItemMeta meta { get; set; }
+        public List<AdminRightListItem> children { get; set; }
+    }
+
+    public class AdminRightListItemMeta
+    {
+        public string title { get; set; }
+        public string icon { get; set; }
+        public List<string> roles { get; set; }
+        public List<string> auths { get; set; }
+    }
+}

+ 12 - 0
Entity/AppResultJson.cs

@@ -0,0 +1,12 @@
+using System;
+namespace MySystem
+{
+    public class AppResultJson
+    {
+        public string Info { get; set; }
+        public object Data { get; set; }
+        public object Other { get; set; }
+        public string Status { get; set; }
+        public int Timestamp { get; set; }
+    }
+}

+ 41 - 0
Entity/DbScheme.cs

@@ -0,0 +1,41 @@
+using System;
+using System.Collections.Generic;
+namespace MySystem
+{
+    public class DbScheme
+    {
+        public int TableId { get; set; }
+        public string TableEnName { get; set; }
+        public string TableName { get; set; }
+        public ulong IsTask { get; set; }
+        public List<DbColumn> Columns { get; set; }
+    }
+
+    public class DbColumn
+    {
+        public int Id { get; set; }
+        public int DatabaseId { get; set; }
+        public int TableId { get; set; }
+        public string ColumnName { get; set; }
+        public string ColumnEnName { get; set; }
+        public string ColumnType { get; set; }
+        public string ColumnLength { get; set; }
+        public string Control { get; set; }
+        public string Col { get; set; }
+        public string ColList { get; set; }
+        public ulong ShowTitle { get; set; }
+        public ulong ShowQuery { get; set; }
+        public ulong ShowEdit { get; set; }
+        public string DataRule { get; set; }
+        public string TabName { get; set; }
+        public string PicRuleNote { get; set; }
+        public ulong IsPrimaryKey { get; set; }
+        public ulong IsExcel { get; set; }
+        public ulong CheckRepeat { get; set; }
+        public string RelationData { get; set; }
+        public int Status { get; set; }
+        public int LinkTableId { get; set; }
+        public int LinkColumnId { get; set; }
+        public ulong IsTask { get; set; }
+    }
+}

+ 12 - 0
Entity/RedisTables/AccountTable.cs

@@ -0,0 +1,12 @@
+using System;
+namespace MySystem
+{
+    public class AccountTable
+    {
+        public int Id { get; set; }
+        public string Detail { get; set; }
+        public DateTime CreateDate { get; set; }
+        public decimal DoMoney { get; set; }
+        public int BrandKind { get; set; }
+    }
+}

+ 9 - 0
Entity/RedisTables/AdminIpList.cs

@@ -0,0 +1,9 @@
+using System;
+namespace MySystem
+{
+    public class AdminIpList
+    {
+        public string Province { get; set; } //省份
+        public int IpCount { get; set; } //ip数
+    }
+}

+ 18 - 0
Entity/RedisTables/UData.cs

@@ -0,0 +1,18 @@
+using System;
+namespace MySystem
+{
+    public class UData
+    {
+        public int TeamActiveCount { get; set; } //团队激活数
+        public int TeamTransactionCount { get; set; } //团队交易笔数
+        public decimal TeamTransactionMoney { get; set; } //团队交易额
+
+
+
+
+        public decimal ProfitMoney { get; set; } //交易分润/分润
+        public decimal ReturnMoney { get; set; } //激活奖励/返现
+        public decimal OtherMoney { get; set; } //活动奖励/其他
+        public decimal TotalMoney { get; set; } //累计分润/累计
+    }
+}

+ 18 - 0
Entity/Setting.cs

@@ -0,0 +1,18 @@
+using System;
+namespace MySystem
+{
+    public class Setting
+    {
+        public string AppKey { get; set; }
+        public string AppId { get; set; }
+        public string CheckUrl { get; set; }
+        public string WebServiceUrl { get; set; }
+        public string ConnectionStrings { get; set; }
+        public string Host { get; set; }
+        public string Database { get; set; }
+        public string OSSKey { get; set; }
+        public string OSSSecret { get; set; }
+        public string OSSEndpoint { get; set; }
+        public string OSSBucketName { get; set; }
+    }
+}

+ 25 - 0
Filter/AuthorizeFilter.cs

@@ -0,0 +1,25 @@
+using System;
+using Library;
+using Microsoft.AspNetCore.Mvc.Filters;
+
+namespace MySystem
+{
+    public class AuthorizeFilter : IAuthorizationFilter
+    {
+        /// <summary>
+        /// 请求验证,当前验证部分不要抛出异常,ExceptionFilter不会处理
+        /// </summary>
+        /// <param name="context"></param>
+        public void OnAuthorization(AuthorizationFilterContext context)
+        {
+        //这里可以做复杂的权限控制操作
+        //if (context.HttpContext.User.Identity.Name != "1") //简单的做一个示范
+        //{
+        // //未通过验证则跳转到无权限提示页
+        // RedirectToActionResult content = new RedirectToActionResult("NoAuth", "Exception", null);
+        // context.Result = content;
+        //
+
+        }
+    }
+}

+ 19 - 0
Filter/GlobalActionFilter.cs

@@ -0,0 +1,19 @@
+using System;
+using Library;
+using Microsoft.AspNetCore.Mvc.Filters;
+
+namespace MySystem
+{
+    public class GlobalActionFilter : IActionFilter
+    {
+        public void OnActionExecuted(ActionExecutedContext context)
+        {
+            //执行方法后执行这
+        }
+
+        public void OnActionExecuting(ActionExecutingContext context)
+        {
+            //执行方法前先执行这
+        }
+    }
+}

+ 19 - 0
Filter/GlobalExceptionsFilter.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Net;
+using Library;
+using Microsoft.AspNetCore.Mvc.Filters;
+
+namespace MySystem
+{
+    public class GlobalExceptionsFilter : IExceptionFilter
+    {
+        public void OnException(ExceptionContext context)
+        {
+            string Message = context.Exception.Message;
+            string StackTrace = context.Exception.StackTrace;
+            Utils.WriteLog(DateTime.Now.ToString() + "\r\n" + Message + "\r\n" + StackTrace, "Global全局异常处理日志");
+            context.HttpContext.Response.StatusCode = (int)HttpStatusCode.InternalServerError;
+            context.ExceptionHandled = true;
+        }
+    }
+}

+ 19 - 0
Filter/ResourceFilter.cs

@@ -0,0 +1,19 @@
+using System;
+using Library;
+using Microsoft.AspNetCore.Mvc.Filters;
+
+namespace MySystem
+{
+    public class ResourceFilter : Attribute,IResourceFilter
+    {
+        public void OnResourceExecuted(ResourceExecutedContext context)
+        {
+            // 执行完后的操作
+        }
+
+        public void OnResourceExecuting(ResourceExecutingContext context)
+        {
+            // 执行中的过滤器管道
+        }
+    }
+}

+ 19 - 0
Filter/ResultFilter.cs

@@ -0,0 +1,19 @@
+using System;
+using Library;
+using Microsoft.AspNetCore.Mvc.Filters;
+
+namespace MySystem
+{
+    public class ResultFilter : Attribute, IResultFilter
+    {
+        public void OnResultExecuted(ResultExecutedContext context)
+        { 
+            // 在结果执行之后调用的操作...
+        }
+
+        public void OnResultExecuting(ResultExecutingContext context)
+        {
+            // 在结果执行之前调用的一系列操作
+        }
+    }
+}

+ 20 - 0
Models/Push/Merchant.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Push
+{
+    public partial class Merchant
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string RsaPubKey { get; set; }
+        public string RsaPriKey { get; set; }
+        public string AesSecret { get; set; }
+        public string MerchantNo { get; set; }
+        public string MerchantName { get; set; }
+    }
+}

+ 22 - 0
Models/Push/PushObj.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Push
+{
+    public partial class PushObj
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string FieldList { get; set; }
+        public string TableName { get; set; }
+        public int EncryptMode { get; set; }
+        public string NoticeUrl { get; set; }
+        public string Title { get; set; }
+        public int MerchantId { get; set; }
+        public int QueryId { get; set; }
+    }
+}

+ 25 - 0
Models/Push/PushObjCondition.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Push
+{
+    public partial class PushObjCondition
+    {
+        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 QueryCondition { get; set; }
+        public string QueryVal { get; set; }
+        public string QueryField { get; set; }
+        public int PushObjId { get; set; }
+    }
+}

+ 16 - 0
Models/Push/PushPosRecord.cs

@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Push
+{
+    public partial class PushPosRecord
+    {
+        public int Id { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public string Content { get; set; }
+        public string DataType { get; set; }
+        public string EncryptContent { get; set; }
+        public int Status { get; set; }
+        public string BackContent { get; set; }
+    }
+}

+ 19 - 0
Models/Push/PushRecord.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Push
+{
+    public partial class PushRecord
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string PushData { get; set; }
+        public string PushDataEncrypt { get; set; }
+        public int PushObjId { get; set; }
+        public int MerchantId { get; set; }
+    }
+}

+ 23 - 0
Models/Push/RePushQueue.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Push
+{
+    public partial class RePushQueue
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string RePushUrl { get; set; }
+        public DateTime? RePushDate { get; set; }
+        public int Times { get; set; }
+        public string PushData { get; set; }
+        public string PushDataEncrypt { get; set; }
+        public int PushObjId { get; set; }
+        public int MerchantId { get; set; }
+        public int PushRecordId { get; set; }
+    }
+}

+ 19 - 0
Models/Push/SourceCondition.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Push
+{
+    public partial class SourceCondition
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public int QueryCondition { get; set; }
+        public string QueryVal { get; set; }
+        public string QueryField { get; set; }
+        public int SourceId { get; set; }
+    }
+}

+ 21 - 0
Models/Push/SourceData.cs

@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Push
+{
+    public partial class SourceData
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string FieldList { get; set; }
+        public string TableName { get; set; }
+        public string Title { get; set; }
+        public string TargetFieldList { get; set; }
+        public int QueryId { get; set; }
+        public string Month { get; set; }
+    }
+}

+ 19 - 0
Models/Push/SourceDataSubTable.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Push
+{
+    public partial class SourceDataSubTable
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string ReturnField { get; set; }
+        public string QueryField { get; set; }
+        public int SourceId { get; set; }
+        public string TableName { get; set; }
+    }
+}

+ 18 - 0
Models/Push/UMerchantDepositRecord.cs

@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Push
+{
+    public partial class UMerchantDepositRecord
+    {
+        public int Id { get; set; }
+        public int Status { get; set; }
+        public int UserId { get; set; }
+        public string MerchNo { get; set; }
+        public string AgentId { get; set; }
+        public string PosSn { get; set; }
+        public string OrderId { get; set; }
+        public decimal Amount { get; set; }
+        public DateTime? TransTime { get; set; }
+    }
+}

+ 21 - 0
Models/Push/UPosMerchantInfo.cs

@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Push
+{
+    public partial class UPosMerchantInfo
+    {
+        public int Id { get; set; }
+        public int Status { get; set; }
+        public int UserId { get; set; }
+        public string Phone { get; set; }
+        public string Name { get; set; }
+        public string SupplementInfo { get; set; }
+        public string AgentId { get; set; }
+        public string MerchNo { get; set; }
+        public string PosSn { get; set; }
+        public string DeviceModel { get; set; }
+        public string TermTo { get; set; }
+        public DateTime? BindTime { get; set; }
+    }
+}

+ 26 - 0
Models/Push/UTradeRecord.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Push
+{
+    public partial class UTradeRecord
+    {
+        public int Id { get; set; }
+        public int Status { get; set; }
+        public int UserId { get; set; }
+        public string AgentId { get; set; }
+        public string OrderId { get; set; }
+        public string TransId { get; set; }
+        public string MerchNo { get; set; }
+        public string TermNo { get; set; }
+        public string PosSn { get; set; }
+        public decimal Amount { get; set; }
+        public DateTime? TransTime { get; set; }
+        public string RetCode { get; set; }
+        public string RetMsg { get; set; }
+        public int FeeAmount { get; set; }
+        public string PayType { get; set; }
+        public string CardType { get; set; }
+        public string TransType { get; set; }
+    }
+}

+ 925 - 0
Models/Push/WebCMSEntities.cs

@@ -0,0 +1,925 @@
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata;
+
+namespace MySystem.Models.Push
+{
+    public partial class WebCMSEntities : DbContext
+    {
+        public WebCMSEntities()
+        {
+        }
+
+        public WebCMSEntities(DbContextOptions<WebCMSEntities> options)
+            : base(options)
+        {
+        }
+
+        public virtual DbSet<Merchant> Merchant { get; set; }
+        public virtual DbSet<PushObj> PushObj { get; set; }
+        public virtual DbSet<PushObjCondition> PushObjCondition { get; set; }
+        public virtual DbSet<PushPosRecord> PushPosRecord { get; set; }
+        public virtual DbSet<PushRecord> PushRecord { get; set; }
+        public virtual DbSet<RePushQueue> RePushQueue { get; set; }
+        public virtual DbSet<SourceCondition> SourceCondition { get; set; }
+        public virtual DbSet<SourceData> SourceData { get; set; }
+        public virtual DbSet<SourceDataSubTable> SourceDataSubTable { get; set; }
+        public virtual DbSet<UMerchantDepositRecord> UMerchantDepositRecord { get; set; }
+        public virtual DbSet<UPosMerchantInfo> UPosMerchantInfo { get; set; }
+        public virtual DbSet<UTradeRecord> UTradeRecord { get; set; }
+
+        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
+        {
+            if (!optionsBuilder.IsConfigured)
+            {
+                optionsBuilder.UseMySql(Library.ConfigurationManager.AppSettings["SqlConnStr"].ToString(), x => x.ServerVersion("5.7.17-mysql"));
+            }
+        }
+
+        protected override void OnModelCreating(ModelBuilder modelBuilder)
+        {
+            modelBuilder.Entity<Merchant>(entity =>
+            {
+                entity.ToTable("merchant");
+
+                entity.HasComment("商户表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasColumnType("int(11)");
+
+                entity.Property(e => e.AesSecret)
+                    .HasColumnName("aes_secret")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("AES密钥")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnName("create_date")
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.MerchantName)
+                    .HasColumnName("merchant_name")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("商户名称")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerchantNo)
+                    .HasColumnName("merchant_no")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("商户号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.RsaPriKey)
+                    .HasColumnName("rsa_pri_key")
+                    .HasColumnType("mediumtext")
+                    .HasComment("RSA私钥")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.RsaPubKey)
+                    .HasColumnName("rsa_pub_key")
+                    .HasColumnType("mediumtext")
+                    .HasComment("RSA公钥")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort)
+                    .HasColumnName("sort")
+                    .HasColumnType("int(11)")
+                    .HasComment("排序序号");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+
+                entity.Property(e => e.UpdateDate)
+                    .HasColumnName("update_date")
+                    .HasColumnType("datetime")
+                    .HasComment("修改时间");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasColumnType("int(11)")
+                    .HasComment("版本号");
+            });
+
+            modelBuilder.Entity<PushObj>(entity =>
+            {
+                entity.ToTable("push_obj");
+
+                entity.HasComment("推送项目");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnName("create_date")
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.EncryptMode)
+                    .HasColumnName("encrypt_mode")
+                    .HasColumnType("int(11)")
+                    .HasComment("加密方式");
+
+                entity.Property(e => e.FieldList)
+                    .HasColumnName("field_list")
+                    .HasColumnType("mediumtext")
+                    .HasComment("数据字段")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerchantId)
+                    .HasColumnName("merchant_id")
+                    .HasColumnType("int(11)")
+                    .HasComment("商户");
+
+                entity.Property(e => e.NoticeUrl)
+                    .HasColumnName("notice_url")
+                    .HasColumnType("varchar(500)")
+                    .HasComment("推送地址")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryId)
+                    .HasColumnType("int(11)")
+                    .HasComment("查询表Id");
+
+                entity.Property(e => e.Sort)
+                    .HasColumnName("sort")
+                    .HasColumnType("int(11)")
+                    .HasComment("排序序号");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+
+                entity.Property(e => e.TableName)
+                    .HasColumnName("table_name")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("数据表名")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Title)
+                    .HasColumnName("title")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("标题说明")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate)
+                    .HasColumnName("update_date")
+                    .HasColumnType("datetime")
+                    .HasComment("修改时间");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasColumnType("int(11)")
+                    .HasComment("版本号");
+            });
+
+            modelBuilder.Entity<PushObjCondition>(entity =>
+            {
+                entity.ToTable("push_obj_condition");
+
+                entity.HasComment("推送数据抓取条件");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("创建人")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PushObjId)
+                    .HasColumnName("push_obj_id")
+                    .HasColumnType("int(11)")
+                    .HasComment("推送项目");
+
+                entity.Property(e => e.QueryCondition)
+                    .HasColumnName("query_condition")
+                    .HasColumnType("int(11)")
+                    .HasComment("查询条件");
+
+                entity.Property(e => e.QueryCount)
+                    .HasColumnType("int(11)")
+                    .HasComment("点击量");
+
+                entity.Property(e => e.QueryField)
+                    .HasColumnName("query_field")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("查询字段")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryVal)
+                    .HasColumnName("query_val")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("查询值")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort)
+                    .HasColumnType("int(11)")
+                    .HasComment("排序序号");
+
+                entity.Property(e => e.Status)
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+
+                entity.Property(e => e.UpdateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("更新人")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version)
+                    .HasColumnType("int(11)")
+                    .HasComment("版本号");
+            });
+
+            modelBuilder.Entity<PushPosRecord>(entity =>
+            {
+                entity.ToTable("push_pos_record");
+
+                entity.HasComment("推送项目");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasColumnType("int(11)");
+
+                entity.Property(e => e.BackContent)
+                    .HasColumnName("back_content")
+                    .HasColumnType("mediumtext")
+                    .HasComment("数据内容")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Content)
+                    .HasColumnName("content")
+                    .HasColumnType("mediumtext")
+                    .HasComment("数据内容")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnName("create_date")
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.DataType)
+                    .HasColumnName("data_type")
+                    .HasColumnType("varchar(20)")
+                    .HasComment("数据类型")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.EncryptContent)
+                    .HasColumnName("encrypt_content")
+                    .HasColumnType("mediumtext")
+                    .HasComment("数据内容")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+            });
+
+            modelBuilder.Entity<PushRecord>(entity =>
+            {
+                entity.ToTable("push_record");
+
+                entity.HasComment("推送记录");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnName("create_date")
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.MerchantId)
+                    .HasColumnName("merchant_id")
+                    .HasColumnType("int(11)")
+                    .HasComment("商户");
+
+                entity.Property(e => e.PushData)
+                    .HasColumnName("push_data")
+                    .HasColumnType("mediumtext")
+                    .HasComment("推送数据")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PushDataEncrypt)
+                    .HasColumnName("push_data_encrypt")
+                    .HasColumnType("mediumtext")
+                    .HasComment("推送数据加密")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PushObjId)
+                    .HasColumnName("push_obj_id")
+                    .HasColumnType("int(11)")
+                    .HasComment("推送项目");
+
+                entity.Property(e => e.Sort)
+                    .HasColumnName("sort")
+                    .HasColumnType("int(11)")
+                    .HasComment("排序序号");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+
+                entity.Property(e => e.UpdateDate)
+                    .HasColumnName("update_date")
+                    .HasColumnType("datetime")
+                    .HasComment("修改时间");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasColumnType("int(11)")
+                    .HasComment("版本号");
+            });
+
+            modelBuilder.Entity<RePushQueue>(entity =>
+            {
+                entity.ToTable("re_push_queue");
+
+                entity.HasComment("重推队列");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnName("create_date")
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.MerchantId)
+                    .HasColumnName("merchant_id")
+                    .HasColumnType("int(11)")
+                    .HasComment("商户");
+
+                entity.Property(e => e.PushData)
+                    .HasColumnName("push_data")
+                    .HasColumnType("mediumtext")
+                    .HasComment("推送数据")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PushDataEncrypt)
+                    .HasColumnName("push_data_encrypt")
+                    .HasColumnType("mediumtext")
+                    .HasComment("推送数据加密")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PushObjId)
+                    .HasColumnName("push_obj_id")
+                    .HasColumnType("int(11)")
+                    .HasComment("推送项目");
+
+                entity.Property(e => e.PushRecordId)
+                    .HasColumnType("int(11)")
+                    .HasComment("推送记录");
+
+                entity.Property(e => e.RePushDate)
+                    .HasColumnName("re_push_date")
+                    .HasColumnType("datetime")
+                    .HasComment("再次重推时间");
+
+                entity.Property(e => e.RePushUrl)
+                    .HasColumnName("re_push_url")
+                    .HasColumnType("varchar(500)")
+                    .HasComment("重推地址")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort)
+                    .HasColumnName("sort")
+                    .HasColumnType("int(11)")
+                    .HasComment("排序序号");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+
+                entity.Property(e => e.Times)
+                    .HasColumnName("times")
+                    .HasColumnType("int(11)")
+                    .HasComment("次数");
+
+                entity.Property(e => e.UpdateDate)
+                    .HasColumnName("update_date")
+                    .HasColumnType("datetime")
+                    .HasComment("修改时间");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasColumnType("int(11)")
+                    .HasComment("版本号");
+            });
+
+            modelBuilder.Entity<SourceCondition>(entity =>
+            {
+                entity.ToTable("source_condition");
+
+                entity.HasComment("原始数据抓取条件");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnName("create_date")
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.QueryCondition)
+                    .HasColumnName("query_condition")
+                    .HasColumnType("int(11)")
+                    .HasComment("查询条件");
+
+                entity.Property(e => e.QueryField)
+                    .HasColumnName("query_field")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("查询字段")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryVal)
+                    .HasColumnName("query_val")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("查询值")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort)
+                    .HasColumnName("sort")
+                    .HasColumnType("int(11)")
+                    .HasComment("排序序号");
+
+                entity.Property(e => e.SourceId)
+                    .HasColumnName("source_id")
+                    .HasColumnType("int(11)")
+                    .HasComment("原始数据");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+
+                entity.Property(e => e.UpdateDate)
+                    .HasColumnName("update_date")
+                    .HasColumnType("datetime")
+                    .HasComment("修改时间");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasColumnType("int(11)")
+                    .HasComment("版本号");
+            });
+
+            modelBuilder.Entity<SourceData>(entity =>
+            {
+                entity.ToTable("source_data");
+
+                entity.HasComment("原始数据配置");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnName("create_date")
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.FieldList)
+                    .HasColumnName("field_list")
+                    .HasColumnType("mediumtext")
+                    .HasComment("查询数据字段")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Month)
+                    .HasColumnName("month")
+                    .HasColumnType("varchar(6)")
+                    .HasComment("标题说明")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryId)
+                    .HasColumnType("int(11)")
+                    .HasComment("查询数据表Id");
+
+                entity.Property(e => e.Sort)
+                    .HasColumnName("sort")
+                    .HasColumnType("int(11)")
+                    .HasComment("排序序号");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+
+                entity.Property(e => e.TableName)
+                    .HasColumnName("table_name")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("数据表名")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TargetFieldList)
+                    .HasColumnName("target_field_list")
+                    .HasColumnType("mediumtext")
+                    .HasComment("目标表字段")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Title)
+                    .HasColumnName("title")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("标题说明")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate)
+                    .HasColumnName("update_date")
+                    .HasColumnType("datetime")
+                    .HasComment("修改时间");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasColumnType("int(11)")
+                    .HasComment("版本号");
+            });
+
+            modelBuilder.Entity<SourceDataSubTable>(entity =>
+            {
+                entity.ToTable("source_data_sub_table");
+
+                entity.HasComment("原始数据关联表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnName("create_date")
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.QueryField)
+                    .HasColumnName("query_field")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("查询字段")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ReturnField)
+                    .HasColumnName("return_field")
+                    .HasColumnType("varchar(500)")
+                    .HasComment("返回字段")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort)
+                    .HasColumnName("sort")
+                    .HasColumnType("int(11)")
+                    .HasComment("排序序号");
+
+                entity.Property(e => e.SourceId)
+                    .HasColumnName("source_id")
+                    .HasColumnType("int(11)")
+                    .HasComment("原始数据");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+
+                entity.Property(e => e.TableName)
+                    .HasColumnName("table_name")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("表名")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate)
+                    .HasColumnName("update_date")
+                    .HasColumnType("datetime")
+                    .HasComment("修改时间");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasColumnType("int(11)")
+                    .HasComment("版本号");
+            });
+
+            modelBuilder.Entity<UMerchantDepositRecord>(entity =>
+            {
+                entity.ToTable("u_MerchantDepositRecord");
+
+                entity.HasComment("商户服务费信息");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasColumnType("int(11)")
+                    .HasComment("ID");
+
+                entity.Property(e => e.AgentId)
+                    .HasColumnName("agent_id")
+                    .HasColumnType("varchar(30)")
+                    .HasComment("代理商编号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Amount)
+                    .HasColumnName("amount")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("金额");
+
+                entity.Property(e => e.MerchNo)
+                    .HasColumnName("merch_no")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("商户号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OrderId)
+                    .HasColumnName("order_id")
+                    .HasColumnType("varchar(30)")
+                    .HasComment("订单流水")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PosSn)
+                    .HasColumnName("pos_sn")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("机具号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+
+                entity.Property(e => e.TransTime)
+                    .HasColumnName("trans_time")
+                    .HasColumnType("datetime")
+                    .HasComment("时间");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnName("user_id")
+                    .HasColumnType("int(11)")
+                    .HasComment("创客所属人");
+            });
+
+            modelBuilder.Entity<UPosMerchantInfo>(entity =>
+            {
+                entity.ToTable("u_PosMerchantInfo");
+
+                entity.HasComment("商户绑定信息");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasColumnType("int(11)")
+                    .HasComment("ID");
+
+                entity.Property(e => e.AgentId)
+                    .HasColumnName("agent_id")
+                    .HasColumnType("varchar(30)")
+                    .HasComment("代理商编号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.BindTime)
+                    .HasColumnName("bind_time")
+                    .HasColumnType("datetime")
+                    .HasComment("绑定时间");
+
+                entity.Property(e => e.DeviceModel)
+                    .HasColumnName("device_model")
+                    .HasColumnType("varchar(30)")
+                    .HasComment("设备类型")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerchNo)
+                    .HasColumnName("merch_no")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("商户号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Name)
+                    .HasColumnName("name")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("商户名称")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Phone)
+                    .HasColumnName("phone")
+                    .HasColumnType("varchar(30)")
+                    .HasComment("手机号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PosSn)
+                    .HasColumnName("pos_sn")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("机具号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+
+                entity.Property(e => e.SupplementInfo)
+                    .HasColumnName("supplement_info")
+                    .HasColumnType("varchar(30)")
+                    .HasComment("身份证号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TermTo)
+                    .HasColumnName("term_to")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("终端号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnName("user_id")
+                    .HasColumnType("int(11)")
+                    .HasComment("创客所属人");
+            });
+
+            modelBuilder.Entity<UTradeRecord>(entity =>
+            {
+                entity.ToTable("u_TradeRecord");
+
+                entity.HasComment("商户交易信息");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasColumnType("int(11)")
+                    .HasComment("ID");
+
+                entity.Property(e => e.AgentId)
+                    .IsRequired()
+                    .HasColumnName("agent_id")
+                    .HasColumnType("varchar(30)")
+                    .HasDefaultValueSql("'0'")
+                    .HasComment("代理商编号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Amount)
+                    .HasColumnName("amount")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("交易金额");
+
+                entity.Property(e => e.CardType)
+                    .HasColumnName("card_type")
+                    .HasColumnType("varchar(10)")
+                    .HasComment("卡类型")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.FeeAmount)
+                    .HasColumnName("fee_amount")
+                    .HasColumnType("int(11)")
+                    .HasComment("手续费");
+
+                entity.Property(e => e.MerchNo)
+                    .HasColumnName("merch_no")
+                    .HasColumnType("varchar(30)")
+                    .HasComment("商户号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OrderId)
+                    .HasColumnName("order_id")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("订单流水")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PayType)
+                    .HasColumnName("pay_type")
+                    .HasColumnType("varchar(10)")
+                    .HasComment("支付方式")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PosSn)
+                    .HasColumnName("pos_sn")
+                    .HasColumnType("varchar(30)")
+                    .HasComment("机具号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.RetCode)
+                    .HasColumnName("ret_code")
+                    .HasColumnType("varchar(10)")
+                    .HasComment("交易状态")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.RetMsg)
+                    .HasColumnName("ret_msg")
+                    .HasColumnType("varchar(10)")
+                    .HasComment("交易描述")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+
+                entity.Property(e => e.TermNo)
+                    .HasColumnName("term_no")
+                    .HasColumnType("varchar(30)")
+                    .HasComment("终端号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TransId)
+                    .HasColumnName("trans_id")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("交易流水")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TransTime)
+                    .HasColumnName("trans_time")
+                    .HasColumnType("datetime")
+                    .HasComment("交易时间");
+
+                entity.Property(e => e.TransType)
+                    .HasColumnName("trans_type")
+                    .HasColumnType("varchar(10)")
+                    .HasComment("交易类型")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnName("user_id")
+                    .HasColumnType("int(11)")
+                    .HasComment("创客所属人");
+            });
+
+            OnModelCreatingPartial(modelBuilder);
+        }
+
+        partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
+    }
+}

+ 76 - 0
MySystem.csproj

@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<Project Sdk="Microsoft.NET.Sdk.Web">
+  <PropertyGroup>
+    <TargetFramework>netcoreapp3.1</TargetFramework>
+  </PropertyGroup>
+  <ItemGroup>
+    <DotNetCliToolReference Include="dotnet-svcutil" Version="1.0.*" />
+  </ItemGroup>
+  <ItemGroup>
+    <Folder Include="Areas\" />
+    <Folder Include="Areas\Admin\" />
+    <Folder Include="Areas\Api\" />
+    <Folder Include="Areas\Web\" />
+    <Folder Include="Areas\Admin\Controllers\" />
+    <Folder Include="Areas\Admin\Views\" />
+    <Folder Include="Areas\Web\Controllers\" />
+    <Folder Include="Areas\Web\Views\" />
+    <Folder Include="Areas\Api\Controllers\" />
+    <Folder Include="PublicClass\" />
+    <Folder Include="AppStart\" />
+    <Folder Include="Views\Home\" />
+    <Folder Include="Areas\Admin\Views\Home\" />
+    <Folder Include="Areas\Web\Views\Article\" />
+    <Folder Include="PublicClass\GraphQL\" />
+    <Folder Include="PublicClass\GraphQL\Types\" />
+    <Folder Include="Areas\Web\Views\Page\" />
+    <Folder Include="Areas\Web\Views\Pay\" />
+    <Folder Include="AppStart\Helper\" />
+    <Folder Include="Areas\Api\Controllers\activity\" />
+    <Folder Include="AppStart\Activity\" />
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Include="AopSdk">
+      <HintPath>DLL\AopSdk.dll</HintPath>
+    </Reference>
+    <Reference Include="LitJSON">
+      <HintPath>DLL\LitJSON.dll</HintPath>
+    </Reference>
+    <Reference Include="Newtonsoft.Json">
+      <HintPath>DLL\Newtonsoft.Json.dll</HintPath>
+    </Reference>
+    <Reference Include="ThoughtWorks.QRCode">
+      <HintPath>DLL\ThoughtWorks.QRCode.dll</HintPath>
+    </Reference>
+    <Reference Include="Aliyun.OSS">
+      <HintPath>DLL\Aliyun.OSS.dll</HintPath>
+    </Reference>
+    <Reference Include="MySystemLib">
+      <HintPath>DLL\MySystemLib.dll</HintPath>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <PackageReference Include="AlibabaCloud.SDK.Push20160801" Version="1.0.9" />
+    <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.0.0" />
+    <PackageReference Include="RabbitMQ.Client" Version="6.2.2" />
+    <PackageReference Include="System.ServiceModel.Duplex" Version="4.4.*" />
+    <PackageReference Include="System.ServiceModel.Http" Version="4.4.*" />
+    <PackageReference Include="System.ServiceModel.NetTcp" Version="4.4.*" />
+    <PackageReference Include="System.ServiceModel.Security" Version="4.4.*" />
+    <PackageReference Include="ZKWeb.System.Drawing" Version="4.0.1" />
+    <PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.0.1" />
+    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.0" />
+    <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.0" />
+    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.0">
+      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
+      <PrivateAssets>all</PrivateAssets>
+    </PackageReference>
+    <PackageReference Include="GraphQL" Version="2.4.0" />
+    <PackageReference Include="System.Drawing.Common" Version="4.7.0" />
+    <PackageReference Include="MySql.Data" Version="9.1.0" />
+    <PackageReference Include="CSRedisCore" Version="3.6.5" />
+  </ItemGroup>
+  <ItemGroup>
+    <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.3" />
+  </ItemGroup>
+</Project>

+ 32 - 0
Program.cs

@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Logging;
+
+namespace MySystem
+{
+    public class Program
+    {
+        public static void Main(string[] args)
+        {
+            CreateHostBuilder(args).Build().Run();
+        }
+
+        public static IHostBuilder CreateHostBuilder(string[] args) =>
+            Host.CreateDefaultBuilder(args)
+                .ConfigureWebHostDefaults(webBuilder =>
+                {
+                    webBuilder
+                    .UseUrls("http://*:5554")
+                    .UseKestrel()
+                    .UseContentRoot(Directory.GetCurrentDirectory())
+                    .UseIISIntegration()
+                    .UseStartup<Startup>();
+                });
+    }
+}

+ 13 - 0
Properties/PublishProfiles/FolderProfile 1.pubxml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <WebPublishMethod>FileSystem</WebPublishMethod>
+    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
+    <LastUsedPlatform>AnyCPU</LastUsedPlatform>
+    <publishUrl>bin/Release/netcoreapp3.1/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.1</TargetFramework>
+    <SelfContained>false</SelfContained>
+    <_IsPortable>true</_IsPortable>
+  </PropertyGroup>
+</Project>

+ 13 - 0
Properties/PublishProfiles/FolderProfile 10.pubxml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <WebPublishMethod>FileSystem</WebPublishMethod>
+    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
+    <LastUsedPlatform>AnyCPU</LastUsedPlatform>
+    <publishUrl>bin/Release/netcoreapp3.1/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.1</TargetFramework>
+    <SelfContained>false</SelfContained>
+    <_IsPortable>true</_IsPortable>
+  </PropertyGroup>
+</Project>

+ 13 - 0
Properties/PublishProfiles/FolderProfile 11.pubxml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <WebPublishMethod>FileSystem</WebPublishMethod>
+    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
+    <LastUsedPlatform>AnyCPU</LastUsedPlatform>
+    <publishUrl>bin/Release/netcoreapp3.1/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.1</TargetFramework>
+    <SelfContained>false</SelfContained>
+    <_IsPortable>true</_IsPortable>
+  </PropertyGroup>
+</Project>

+ 13 - 0
Properties/PublishProfiles/FolderProfile 12.pubxml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <WebPublishMethod>FileSystem</WebPublishMethod>
+    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
+    <LastUsedPlatform>AnyCPU</LastUsedPlatform>
+    <publishUrl>bin/Release/netcoreapp3.1/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.1</TargetFramework>
+    <SelfContained>false</SelfContained>
+    <_IsPortable>true</_IsPortable>
+  </PropertyGroup>
+</Project>

+ 13 - 0
Properties/PublishProfiles/FolderProfile 13.pubxml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <WebPublishMethod>FileSystem</WebPublishMethod>
+    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
+    <LastUsedPlatform>AnyCPU</LastUsedPlatform>
+    <publishUrl>bin/Release/netcoreapp3.1/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.1</TargetFramework>
+    <SelfContained>false</SelfContained>
+    <_IsPortable>true</_IsPortable>
+  </PropertyGroup>
+</Project>

+ 13 - 0
Properties/PublishProfiles/FolderProfile 14.pubxml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <WebPublishMethod>FileSystem</WebPublishMethod>
+    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
+    <LastUsedPlatform>AnyCPU</LastUsedPlatform>
+    <publishUrl>bin/Release/netcoreapp3.1/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.1</TargetFramework>
+    <SelfContained>false</SelfContained>
+    <_IsPortable>true</_IsPortable>
+  </PropertyGroup>
+</Project>

+ 13 - 0
Properties/PublishProfiles/FolderProfile 15.pubxml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <WebPublishMethod>FileSystem</WebPublishMethod>
+    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
+    <LastUsedPlatform>AnyCPU</LastUsedPlatform>
+    <publishUrl>bin/Release/netcoreapp3.1/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.1</TargetFramework>
+    <SelfContained>false</SelfContained>
+    <_IsPortable>true</_IsPortable>
+  </PropertyGroup>
+</Project>

+ 13 - 0
Properties/PublishProfiles/FolderProfile 16.pubxml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <WebPublishMethod>FileSystem</WebPublishMethod>
+    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
+    <LastUsedPlatform>AnyCPU</LastUsedPlatform>
+    <publishUrl>bin/Release/netcoreapp3.1/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.1</TargetFramework>
+    <SelfContained>false</SelfContained>
+    <_IsPortable>true</_IsPortable>
+  </PropertyGroup>
+</Project>

+ 13 - 0
Properties/PublishProfiles/FolderProfile 17.pubxml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <WebPublishMethod>FileSystem</WebPublishMethod>
+    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
+    <LastUsedPlatform>AnyCPU</LastUsedPlatform>
+    <publishUrl>bin/Release/netcoreapp3.1/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.1</TargetFramework>
+    <SelfContained>false</SelfContained>
+    <_IsPortable>true</_IsPortable>
+  </PropertyGroup>
+</Project>

+ 13 - 0
Properties/PublishProfiles/FolderProfile 2.pubxml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <WebPublishMethod>FileSystem</WebPublishMethod>
+    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
+    <LastUsedPlatform>AnyCPU</LastUsedPlatform>
+    <publishUrl>bin/Release/netcoreapp3.1/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.1</TargetFramework>
+    <SelfContained>false</SelfContained>
+    <_IsPortable>true</_IsPortable>
+  </PropertyGroup>
+</Project>

+ 13 - 0
Properties/PublishProfiles/FolderProfile 3.pubxml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <WebPublishMethod>FileSystem</WebPublishMethod>
+    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
+    <LastUsedPlatform>AnyCPU</LastUsedPlatform>
+    <publishUrl>bin/Release/netcoreapp3.1/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.1</TargetFramework>
+    <SelfContained>false</SelfContained>
+    <_IsPortable>true</_IsPortable>
+  </PropertyGroup>
+</Project>

+ 13 - 0
Properties/PublishProfiles/FolderProfile 4.pubxml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <WebPublishMethod>FileSystem</WebPublishMethod>
+    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
+    <LastUsedPlatform>AnyCPU</LastUsedPlatform>
+    <publishUrl>bin/Release/netcoreapp3.1/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.1</TargetFramework>
+    <SelfContained>false</SelfContained>
+    <_IsPortable>true</_IsPortable>
+  </PropertyGroup>
+</Project>

+ 13 - 0
Properties/PublishProfiles/FolderProfile 5.pubxml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <WebPublishMethod>FileSystem</WebPublishMethod>
+    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
+    <LastUsedPlatform>AnyCPU</LastUsedPlatform>
+    <publishUrl>bin/Release/netcoreapp3.1/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.1</TargetFramework>
+    <SelfContained>false</SelfContained>
+    <_IsPortable>true</_IsPortable>
+  </PropertyGroup>
+</Project>

+ 13 - 0
Properties/PublishProfiles/FolderProfile 6.pubxml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <WebPublishMethod>FileSystem</WebPublishMethod>
+    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
+    <LastUsedPlatform>AnyCPU</LastUsedPlatform>
+    <publishUrl>bin/Release/netcoreapp3.1/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.1</TargetFramework>
+    <SelfContained>false</SelfContained>
+    <_IsPortable>true</_IsPortable>
+  </PropertyGroup>
+</Project>

+ 13 - 0
Properties/PublishProfiles/FolderProfile 7.pubxml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <WebPublishMethod>FileSystem</WebPublishMethod>
+    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
+    <LastUsedPlatform>AnyCPU</LastUsedPlatform>
+    <publishUrl>bin/Release/netcoreapp3.1/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.1</TargetFramework>
+    <SelfContained>false</SelfContained>
+    <_IsPortable>true</_IsPortable>
+  </PropertyGroup>
+</Project>

+ 13 - 0
Properties/PublishProfiles/FolderProfile 8.pubxml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <WebPublishMethod>FileSystem</WebPublishMethod>
+    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
+    <LastUsedPlatform>AnyCPU</LastUsedPlatform>
+    <publishUrl>bin/Release/netcoreapp3.1/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.1</TargetFramework>
+    <SelfContained>false</SelfContained>
+    <_IsPortable>true</_IsPortable>
+  </PropertyGroup>
+</Project>

+ 13 - 0
Properties/PublishProfiles/FolderProfile 9.pubxml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <WebPublishMethod>FileSystem</WebPublishMethod>
+    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
+    <LastUsedPlatform>AnyCPU</LastUsedPlatform>
+    <publishUrl>bin/Release/netcoreapp3.1/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.1</TargetFramework>
+    <SelfContained>false</SelfContained>
+    <_IsPortable>true</_IsPortable>
+  </PropertyGroup>
+</Project>

+ 13 - 0
Properties/PublishProfiles/FolderProfile.pubxml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <WebPublishMethod>FileSystem</WebPublishMethod>
+    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
+    <LastUsedPlatform>AnyCPU</LastUsedPlatform>
+    <publishUrl>bin/Release/netcoreapp3.1/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.1</TargetFramework>
+    <SelfContained>false</SelfContained>
+    <_IsPortable>true</_IsPortable>
+  </PropertyGroup>
+</Project>

+ 27 - 0
Properties/launchSettings.json

@@ -0,0 +1,27 @@
+{
+  "iisSettings": {
+    "windowsAuthentication": false,
+    "anonymousAuthentication": true,
+    "iisExpress": {
+      "applicationUrl": "http://127.0.0.1:7790",
+      "sslPort": 44360
+    }
+  },
+  "profiles": {
+    "IIS Express": {
+      "commandName": "IISExpress",
+      "launchBrowser": true,
+      "environmentVariables": {
+        "ASPNETCORE_ENVIRONMENT": "Development"
+      }
+    },
+    "MySystem": {
+      "commandName": "Project",
+      "launchBrowser": true,
+      "environmentVariables": {
+        "ASPNETCORE_ENVIRONMENT": "Development"
+      },
+      "applicationUrl": "http://127.0.0.1:5554"
+    }
+  }
+}

+ 301 - 0
ServiceReference1/Reference.cs

@@ -0,0 +1,301 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+[assembly: System.Runtime.Serialization.ContractNamespaceAttribute("http://tempuri.org/", ClrNamespace="tempuri.org")]
+
+namespace tempuri.org
+{
+    using System.Runtime.Serialization;
+    
+    
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.4")]
+    [System.Runtime.Serialization.DataContractAttribute(Name="CustomerTables", Namespace="http://tempuri.org/")]
+    public partial class CustomerTables : object
+    {
+        
+        private string TableNameField;
+        
+        private tempuri.org.CustomerColumns[] ColumnsField;
+        
+        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false)]
+        public string TableName
+        {
+            get
+            {
+                return this.TableNameField;
+            }
+            set
+            {
+                this.TableNameField = value;
+            }
+        }
+        
+        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=1)]
+        public tempuri.org.CustomerColumns[] Columns
+        {
+            get
+            {
+                return this.ColumnsField;
+            }
+            set
+            {
+                this.ColumnsField = value;
+            }
+        }
+    }
+    
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.4")]
+    [System.Runtime.Serialization.DataContractAttribute(Name="CustomerColumns", Namespace="http://tempuri.org/")]
+    public partial class CustomerColumns : object
+    {
+        
+        private string FieldNameField;
+        
+        private string FieldTypeField;
+        
+        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false)]
+        public string FieldName
+        {
+            get
+            {
+                return this.FieldNameField;
+            }
+            set
+            {
+                this.FieldNameField = value;
+            }
+        }
+        
+        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false)]
+        public string FieldType
+        {
+            get
+            {
+                return this.FieldTypeField;
+            }
+            set
+            {
+                this.FieldTypeField = value;
+            }
+        }
+    }
+}
+
+
+[System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.4")]
+[System.ServiceModel.ServiceContractAttribute(ConfigurationName="GetDataBaseSoap")]
+public interface GetDataBaseSoap
+{
+    
+    [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/DataBase", ReplyAction="*")]
+    System.Threading.Tasks.Task<DataBaseResponse> DataBaseAsync(DataBaseRequest request);
+}
+
+[System.Diagnostics.DebuggerStepThroughAttribute()]
+[System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.4")]
+[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+[System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
+public partial class DataBaseRequest
+{
+    
+    [System.ServiceModel.MessageBodyMemberAttribute(Name="DataBase", Namespace="http://tempuri.org/", Order=0)]
+    public DataBaseRequestBody Body;
+    
+    public DataBaseRequest()
+    {
+    }
+    
+    public DataBaseRequest(DataBaseRequestBody Body)
+    {
+        this.Body = Body;
+    }
+}
+
+[System.Diagnostics.DebuggerStepThroughAttribute()]
+[System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.4")]
+[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+[System.Runtime.Serialization.DataContractAttribute(Namespace="http://tempuri.org/")]
+public partial class DataBaseRequestBody
+{
+    
+    [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
+    public string appid;
+    
+    [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=1)]
+    public string appkey;
+    
+    public DataBaseRequestBody()
+    {
+    }
+    
+    public DataBaseRequestBody(string appid, string appkey)
+    {
+        this.appid = appid;
+        this.appkey = appkey;
+    }
+}
+
+[System.Diagnostics.DebuggerStepThroughAttribute()]
+[System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.4")]
+[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+[System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
+public partial class DataBaseResponse
+{
+    
+    [System.ServiceModel.MessageBodyMemberAttribute(Name="DataBaseResponse", Namespace="http://tempuri.org/", Order=0)]
+    public DataBaseResponseBody Body;
+    
+    public DataBaseResponse()
+    {
+    }
+    
+    public DataBaseResponse(DataBaseResponseBody Body)
+    {
+        this.Body = Body;
+    }
+}
+
+[System.Diagnostics.DebuggerStepThroughAttribute()]
+[System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.4")]
+[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+[System.Runtime.Serialization.DataContractAttribute(Namespace="http://tempuri.org/")]
+public partial class DataBaseResponseBody
+{
+    
+    [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
+    public tempuri.org.CustomerTables[] DataBaseResult;
+    
+    public DataBaseResponseBody()
+    {
+    }
+    
+    public DataBaseResponseBody(tempuri.org.CustomerTables[] DataBaseResult)
+    {
+        this.DataBaseResult = DataBaseResult;
+    }
+}
+
+[System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.4")]
+public interface GetDataBaseSoapChannel : GetDataBaseSoap, System.ServiceModel.IClientChannel
+{
+}
+
+[System.Diagnostics.DebuggerStepThroughAttribute()]
+[System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.4")]
+public partial class GetDataBaseSoapClient : System.ServiceModel.ClientBase<GetDataBaseSoap>, GetDataBaseSoap
+{
+    
+    /// <summary>
+    /// Implement this partial method to configure the service endpoint.
+    /// </summary>
+    /// <param name="serviceEndpoint">The endpoint to configure</param>
+    /// <param name="clientCredentials">The client credentials</param>
+    static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials);
+    
+    public GetDataBaseSoapClient(EndpointConfiguration endpointConfiguration) : 
+            base(GetDataBaseSoapClient.GetBindingForEndpoint(endpointConfiguration), GetDataBaseSoapClient.GetEndpointAddress(endpointConfiguration))
+    {
+        this.Endpoint.Name = endpointConfiguration.ToString();
+        ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
+    }
+    
+    public GetDataBaseSoapClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : 
+            base(GetDataBaseSoapClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress))
+    {
+        this.Endpoint.Name = endpointConfiguration.ToString();
+        ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
+    }
+    
+    public GetDataBaseSoapClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : 
+            base(GetDataBaseSoapClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
+    {
+        this.Endpoint.Name = endpointConfiguration.ToString();
+        ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
+    }
+    
+    public GetDataBaseSoapClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
+            base(binding, remoteAddress)
+    {
+    }
+    
+    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+    System.Threading.Tasks.Task<DataBaseResponse> GetDataBaseSoap.DataBaseAsync(DataBaseRequest request)
+    {
+        return base.Channel.DataBaseAsync(request);
+    }
+    
+    public System.Threading.Tasks.Task<DataBaseResponse> DataBaseAsync(string appid, string appkey)
+    {
+        DataBaseRequest inValue = new DataBaseRequest();
+        inValue.Body = new DataBaseRequestBody();
+        inValue.Body.appid = appid;
+        inValue.Body.appkey = appkey;
+        return ((GetDataBaseSoap)(this)).DataBaseAsync(inValue);
+    }
+    
+    public virtual System.Threading.Tasks.Task OpenAsync()
+    {
+        return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
+    }
+    
+    public virtual System.Threading.Tasks.Task CloseAsync()
+    {
+        return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndClose));
+    }
+    
+    private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
+    {
+        if ((endpointConfiguration == EndpointConfiguration.GetDataBaseSoap))
+        {
+            System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding();
+            result.MaxBufferSize = int.MaxValue;
+            result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
+            result.MaxReceivedMessageSize = int.MaxValue;
+            result.AllowCookies = true;
+            return result;
+        }
+        if ((endpointConfiguration == EndpointConfiguration.GetDataBaseSoap12))
+        {
+            System.ServiceModel.Channels.CustomBinding result = new System.ServiceModel.Channels.CustomBinding();
+            System.ServiceModel.Channels.TextMessageEncodingBindingElement textBindingElement = new System.ServiceModel.Channels.TextMessageEncodingBindingElement();
+            textBindingElement.MessageVersion = System.ServiceModel.Channels.MessageVersion.CreateVersion(System.ServiceModel.EnvelopeVersion.Soap12, System.ServiceModel.Channels.AddressingVersion.None);
+            result.Elements.Add(textBindingElement);
+            System.ServiceModel.Channels.HttpTransportBindingElement httpBindingElement = new System.ServiceModel.Channels.HttpTransportBindingElement();
+            httpBindingElement.AllowCookies = true;
+            httpBindingElement.MaxBufferSize = int.MaxValue;
+            httpBindingElement.MaxReceivedMessageSize = int.MaxValue;
+            result.Elements.Add(httpBindingElement);
+            return result;
+        }
+        throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
+    }
+    
+    private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration)
+    {
+        if ((endpointConfiguration == EndpointConfiguration.GetDataBaseSoap))
+        {
+            return new System.ServiceModel.EndpointAddress("http://public.yunmuit.com/Areas/Api/WebService/GetDataBase.asmx");
+        }
+        if ((endpointConfiguration == EndpointConfiguration.GetDataBaseSoap12))
+        {
+            return new System.ServiceModel.EndpointAddress("http://public.yunmuit.com/Areas/Api/WebService/GetDataBase.asmx");
+        }
+        throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
+    }
+    
+    public enum EndpointConfiguration
+    {
+        
+        GetDataBaseSoap,
+        
+        GetDataBaseSoap12,
+    }
+}

+ 110 - 0
Startup.cs

@@ -0,0 +1,110 @@
+using System;
+using System.Collections.Generic;
+using System.ServiceModel;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Http.Features;
+using Microsoft.AspNetCore.Rewrite;
+using Microsoft.AspNetCore.StaticFiles;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.FileProviders;
+using Microsoft.Extensions.Hosting;
+using System.Text;
+using System.Linq;
+using Microsoft.AspNetCore.Mvc.Razor;
+
+namespace MySystem
+{
+    public class Startup
+    {
+        public Startup(IConfiguration configuration)
+        {
+            Configuration = configuration;
+
+        }
+
+        public IConfiguration Configuration { get; }
+
+        // This method gets called by the runtime. Use this method to add services to the container.
+        public void ConfigureServices(IServiceCollection services)
+        {
+            services.AddControllersWithViews();
+            services.AddRouting(options =>
+            {
+                options.LowercaseUrls = true;
+            });
+            services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
+            // services.AddCors(option => option.AddPolicy("cors", policy => policy.AllowAnyHeader().AllowAnyMethod().AllowCredentials().SetIsOriginAllowed(_ => true)));
+            services.AddMvc(options =>
+            {
+                options.EnableEndpointRouting = false;
+                options.Filters.Add(typeof(GlobalExceptionsFilter));
+            });
+            //配置模版视图路径
+            services.Configure<RazorViewEngineOptions>(options =>
+            {
+                options.ViewLocationExpanders.Add(new TemplateViewLocationExpander());
+            });
+            services.AddSession(options =>
+            {
+                // 设置 Session 过期时间
+                options.IdleTimeout = TimeSpan.FromHours(1);
+                options.Cookie.HttpOnly = true;
+            });
+            services.Configure<FormOptions>(x =>
+            {
+                x.MultipartBodyLengthLimit = 50 * 1024 * 1024;//不到300M
+            });
+            //生成密钥
+
+            MySystemLib.SystemPublicFuction.appcheck = "success";
+            RedisDbconn.csredis = new CSRedis.CSRedisClient(Configuration["Setting:RedisConnStr"]);
+            // RedisDbconnTest.csredis = new CSRedis.CSRedisClient(Configuration["Setting:RedisConnStrTest"]);
+        }
+
+        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
+        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
+        {
+            if (env.IsDevelopment())
+            {
+                app.UseDeveloperExceptionPage();
+                Library.ConfigurationManager.EnvironmentFlag = 1;
+            }
+            else
+            {
+                app.UseExceptionHandler("/Home/Error");
+                app.UseHsts();
+                Library.ConfigurationManager.EnvironmentFlag = 2;
+            }
+            Library.function.WritePage("/", "WebRootPath.txt", env.WebRootPath);
+
+            app.UseStaticFiles();
+            app.UseStaticFiles(new StaticFileOptions
+            {
+                ContentTypeProvider = new FileExtensionContentTypeProvider(new Dictionary<string, string>
+                {
+                      { ".apk", "application/vnd.android.package-archive" }
+                })
+            });
+
+            app.UseCors("cors");
+            app.UseAuthentication();
+            app.UseRouting();
+            app.UseAuthorization();
+            app.UseSession();
+
+            app.UseEndpoints(endpoints =>
+            {
+                endpoints.MapControllerRoute(
+                    name: "default",
+                    pattern: "{controller=Home}/{action=Index}/{Id?}");
+            });
+
+            StartHelper.Instance.Start(); //开启线程
+            // TestHelper.Instance.Start();
+        }
+        
+    }
+}

+ 88 - 0
Util/Aliyun/AliyunPush.cs

@@ -0,0 +1,88 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using Library;
+using Tea;
+using Tea.Utils;
+
+namespace MySystem
+{
+    public class AliyunPush
+    {
+        private static string AccessKeyID = "LTAI5tGH621tQ3FVd3jXYUEx";
+        private static string AccessKeySecret = "SDjL74Lk9FUp8VPKl4YYcsbY7MIkRr";
+
+        /**
+         * 使用AK&SK初始化账号Client
+         * @return Client
+         * @throws Exception
+         */
+        public static AlibabaCloud.SDK.Push20160801.Client CreateClient()
+        {
+            // 工程代码泄露可能会导致 AccessKey 泄露,并威胁账号下所有资源的安全性。以下代码示例仅供参考。
+            // 建议使用更安全的 STS 方式,更多鉴权访问方式请参见:https://help.aliyun.com/document_detail/378671.html。
+            AlibabaCloud.OpenApiClient.Models.Config config = new AlibabaCloud.OpenApiClient.Models.Config
+            {
+                // 必填,请确保代码运行环境设置了环境变量 ALIBABA_CLOUD_ACCESS_KEY_ID。
+                AccessKeyId = AccessKeyID, //Environment.GetEnvironmentVariable(AccessKeyID),
+                // 必填,请确保代码运行环境设置了环境变量 ALIBABA_CLOUD_ACCESS_KEY_SECRET。
+                AccessKeySecret = AccessKeySecret, //Environment.GetEnvironmentVariable(AccessKeySecret),
+            };
+            // Endpoint 请参考 https://api.aliyun.com/product/Push
+            config.Endpoint = "cloudpush.aliyuncs.com";
+            return new AlibabaCloud.SDK.Push20160801.Client(config);
+        }
+
+        public static string Push(string Account, string Title, string Body)
+        {
+            AlibabaCloud.SDK.Push20160801.Client client = CreateClient();
+            AlibabaCloud.SDK.Push20160801.Models.PushRequest request = new AlibabaCloud.SDK.Push20160801.Models.PushRequest
+            {
+                AppKey = 333673923,
+                PushType = "NOTICE",
+                DeviceType = "ANDROID",
+                StoreOffline = false,
+                IOSRemind = true,
+                AndroidRemind = true,
+                Target = "ACCOUNT",
+                TargetValue = Account,
+                Title = Title,
+                Body = Body,
+                IOSRemindBody = Body,
+                AndroidPopupTitle = Title,
+                AndroidPopupBody = Body,
+                AndroidNotifyType = "BOTH",
+                AndroidOpenType = "NONE",
+                AndroidExtParameters = "{\"Url\":\"user-payment-list\",\"Jump\":\"1\"}",
+                AndroidNotificationChannel = "1",
+            };
+            AlibabaCloud.SDK.Push20160801.Models.PushResponse response = client.Push(request);
+            return AlibabaCloud.TeaUtil.Common.ToJSONString(response.Body.ToMap());
+        }
+
+        public static string PushForIos(string Account, string Title, string Body)
+        {
+            AlibabaCloud.SDK.Push20160801.Client client = CreateClient();
+            AlibabaCloud.SDK.Push20160801.Models.PushRequest request = new AlibabaCloud.SDK.Push20160801.Models.PushRequest
+            {
+                AppKey = 333673916,
+                PushType = "NOTICE",
+                DeviceType = "iOS",
+                StoreOffline = false,
+                IOSRemind = true,
+                Target = "ACCOUNT",
+                TargetValue = Account,
+                Title = Title,
+                Body = Body,
+                IOSRemindBody = Body,
+                IOSMutableContent = true,
+                IOSMusic = "pushSound.mp3",
+                IOSApnsEnv = Library.ConfigurationManager.EnvironmentFlag == 1 ? "DEV" : "PRODUCT",
+                IOSExtParameters = "{\"Url\":\"user-payment-list\"}",
+            };
+            AlibabaCloud.SDK.Push20160801.Models.PushResponse response = client.Push(request);
+            return AlibabaCloud.TeaUtil.Common.ToJSONString(response.Body.ToMap());
+        }
+    }
+}

+ 12 - 0
Util/Base/BaseClass.cs

@@ -0,0 +1,12 @@
+
+namespace MySystem
+{
+    /// <summary>
+    /// 基础功能方法
+    /// </summary>
+    public class BaseClass
+    {
+
+        
+    }
+}

+ 8 - 0
Util/Base/Func.cs

@@ -0,0 +1,8 @@
+
+namespace MySystem
+{
+    public class Func
+    {
+
+    }
+}

+ 44 - 0
Util/DictionaryClass.cs

@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace MySystem
+{
+    public sealed class DictionaryClass
+    {
+        #region 根据字典key获取字典值
+
+        public string getDictionaryNameByKey(Dictionary<string, string> data, string key)
+        {
+            if (data.ContainsKey(key))
+            {
+                return data[key];
+            }
+            return "";
+        }
+        public string getDictionaryNameById(Dictionary<int, string> data, int key)
+        {
+            if (data.ContainsKey(key))
+            {
+                return data[key];
+            }
+            return "";
+        }
+        public string getDictionaryNamesByKeys(Dictionary<string, string> data, string keys)
+        {
+            string result = "";
+            string[] keylist = keys.Split(',');
+            foreach (string subkey in keylist)
+            {
+                if (data.ContainsKey(subkey))
+                {
+                    result += data[subkey] + ",";
+                }
+            }
+            return result.TrimEnd(',');
+        }
+
+        #endregion
+    }
+}

+ 43 - 0
Util/EncryptHelper.cs

@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using Library;
+using System.Text;
+using System.Linq;
+
+namespace MySystem
+{
+    public class EncryptHelper
+    {
+
+        public static string Encrypt1(SortedList<string, string> obj, string key)
+        {
+            SortedList<string, string> objnew = new SortedList<string, string>();
+            foreach(string field in obj.Keys)
+            {
+                if(!string.IsNullOrEmpty(obj[field])) objnew.Add(field, obj[field]);
+            }
+            string signstr = function.BuildQueryString(objnew) + key;
+            string sign = function.MD532(signstr).ToUpper();
+            obj.Add("sign", sign);
+            return AesEncrypt(Newtonsoft.Json.JsonConvert.SerializeObject(obj), key);
+        }
+
+        public static string AesEncrypt(string str, string key)
+        {
+            if (string.IsNullOrEmpty(str)) return null;
+            Byte[] toEncryptArray = Encoding.UTF8.GetBytes(str);
+
+            System.Security.Cryptography.RijndaelManaged rm = new System.Security.Cryptography.RijndaelManaged
+            {
+                Key = Encoding.UTF8.GetBytes(key),
+                Mode = System.Security.Cryptography.CipherMode.ECB,
+                Padding = System.Security.Cryptography.PaddingMode.PKCS7
+            };
+            System.Security.Cryptography.ICryptoTransform cTransform = rm.CreateEncryptor();
+            Byte[] resultArray = cTransform.TransformFinalBlock(toEncryptArray, 0, toEncryptArray.Length);
+            return Convert.ToBase64String(resultArray, 0, resultArray.Length);
+        }
+
+        
+    }
+}

+ 22 - 0
Util/Extension/JsonDataExtension.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using LitJson;
+
+namespace MySystem
+{
+    public static class JsonDataExtension
+    {
+        
+        #region 获取是否存在Key, isFlag判断是抛出异常还是返回""
+        public static object getItem(this JsonData input, string key) 
+        {
+            string jsonString = input.ToJson();
+            if(jsonString.Contains("\"" + key + "\""))
+            {
+                return input[key];
+            }
+            return "";
+        }
+        #endregion
+    }
+}

+ 17 - 0
Util/Extension/StringExtension.cs

@@ -0,0 +1,17 @@
+
+namespace MySystem
+{
+    public static class StringExtension
+    {
+        #region sql条件拼装
+        public static string Like(this string input, string Field, string Value) 
+        {
+            if (!string.IsNullOrEmpty(Value))
+            {
+                input += " and " + Field + " like '%" + Value + "%'";
+            }
+            return input;
+        }
+        #endregion
+    }
+}

+ 66 - 0
Util/LogHelper.cs

@@ -0,0 +1,66 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Threading;
+using Library;
+using LitJson;
+using MySystem;
+
+public class LogHelper
+{
+    public readonly static LogHelper Instance = new LogHelper();
+    private LogHelper()
+    { }
+
+    public void WriteLog(string Content, string FileName, string BrandId = "0")
+    {
+        Utils.WriteLog(Content, FileName);
+        // Dictionary<string, string> dic = new Dictionary<string, string>();
+        // dic.Add("Topic", FileName);
+        // dic.Add("Content", Content);
+        // dic.Add("BrandId", BrandId);
+        // RedisDbconn.Instance.AddList("LogQueue", Newtonsoft.Json.JsonConvert.SerializeObject(dic));
+    }
+
+    public void Start()
+    {
+        Thread th = new Thread(DoWorks);
+        th.IsBackground = true;
+        th.Start();
+    }
+
+    public void DoWorks()
+    {
+        while (true)
+        {
+            string content = RedisDbconn.Instance.RPop<string>("LogQueue");
+            if (!string.IsNullOrEmpty(content))
+            {
+                try
+                {
+                    DoQueue(content);
+                }
+                catch (Exception ex)
+                {
+                    LogHelper.Instance.WriteLog(DateTime.Now.ToString() + "\n" + content + "\n" + ex, "SLS日志异常");
+                }
+            }
+            else
+            {
+                Thread.Sleep(5000);
+            }
+        }
+    }
+
+    public void DoQueue(string content)
+    { 
+        JsonData JsonObj = JsonMapper.ToObject(content);
+        string Topic = JsonObj["Topic"].ToString();
+        string Cont = JsonObj["Content"].ToString();
+        string BrandId = JsonObj["BrandId"].ToString();
+        // SLS.WriteLog(DateTime.Now, Topic, Cont, new Dictionary<string, string>()
+        // {
+        //     {"BrandId", BrandId}
+        // });
+    }
+}

+ 131 - 0
Util/OssHelper.cs

@@ -0,0 +1,131 @@
+using System;
+using System.Threading;
+using System.IO;
+using Aliyun.OSS;
+using Library;
+using System.Text.RegularExpressions;
+
+namespace MySystem
+{   
+    public class OssHelper
+    {
+        public readonly static OssHelper Instance = new OssHelper();
+        private OssHelper()
+        {
+        }
+
+        public void Start()//启动
+        {
+            Thread thread = new Thread(threadStart);
+            thread.IsBackground = true;
+            thread.Start();
+        }
+
+        public void Add(string data)
+        {
+            function.WritePage("/OSSTempFiles/", function.MD532(Guid.NewGuid().ToString()) + ".txt", data);
+        }
+
+        private void threadStart()
+        {
+            var client = new OssClient(AppConfig.Oss.endpoint, AppConfig.Oss.key, AppConfig.Oss.secret);
+            while (true)
+            {
+                string dataFilePath = function.getPath("/OSSTempFiles/");
+                DirectoryInfo TheFolder = new DirectoryInfo(dataFilePath);
+                if (TheFolder.Exists)
+                {
+                    //遍历文件
+                    if (TheFolder.GetFiles().Length > 0)
+                    {
+                        try
+                        {
+                            foreach (FileInfo NextFile in TheFolder.GetFiles())
+                            {
+                                string FileFullName = dataFilePath + NextFile.Name;
+                                string data = function.ReadInstance("/OSSTempFiles/" + NextFile.Name);
+                                ScanQueue(data, FileFullName, client);
+                            }
+                        }
+                        catch (Exception ex)
+                        {
+                            Utils.WriteLog(ex.ToString(), "OSS上传队列异常");
+                        }
+                    }
+                }
+                //没有任务,休息1秒钟
+                Thread.Sleep(1000);
+            }
+        }
+
+        //要执行的方法
+        public void ScanQueue(string data, string FileFullName)
+        {
+            var client = new OssClient(AppConfig.Oss.endpoint, AppConfig.Oss.key, AppConfig.Oss.secret);
+            ScanQueue(data, FileFullName, client);
+        }
+        private void ScanQueue(string data, string FileFullName, OssClient client)
+        {
+            // 上传文件。
+            string localFile = function.getPath(data);
+            string filePath = data.TrimStart('/');
+            if (!data.StartsWith(AppConfig.Oss.PathName))
+            {
+                filePath = AppConfig.Oss.PathName + data;
+            }
+            var result = client.PutObject(AppConfig.Oss.bucketName, filePath, localFile, new ObjectMetadata()
+            {
+                ExpirationTime = DateTime.Parse("2050-12-31 23:59:59")
+            });
+            if (!string.IsNullOrEmpty(result.ETag))
+            {
+                if (result.ETag.Length == 32)
+                {
+                    if (File.Exists(localFile))
+                    {
+                        File.Delete(localFile);
+                    }
+                }
+            }
+
+            if (File.Exists(FileFullName))
+            {
+                File.Delete(FileFullName);
+            }
+        }
+
+
+
+
+        /// <summary>
+        /// 解析编辑器中的图片(oss)
+        /// </summary>
+        /// <param name="content"></param>
+        /// <returns></returns>
+        public string CheckOSSPic(string content)
+        {
+            if (string.IsNullOrEmpty(content))
+            {
+                content = "";
+            }
+            if (AppConfig.Oss.OssStatus)
+            {
+                MatchCollection MC = Regex.Matches(content, "<img.*?>");
+                foreach (Match match in MC)
+                {
+                    string imgstr = match.Value;
+                    Match submatch = Regex.Match(imgstr, "src=\".*?\"");
+                    if (submatch.Success)
+                    {
+                        string src = submatch.Value.Replace("src=\"", "").Replace("\"", "");
+                        if (!src.StartsWith("http"))
+                        {
+                            content = content.Replace(src, AppConfig.Oss.SourceHost + src);
+                        }
+                    }
+                }
+            }
+            return content;
+        }
+    }
+}

+ 191 - 0
Util/PublicFunction.cs

@@ -0,0 +1,191 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using System.Text.RegularExpressions;
+using Library;
+using System.IO;
+using System.Web;
+using System.Security.Claims;
+using System.Text;
+
+namespace MySystem
+{
+    public class PublicFunction
+    {
+
+        #region 中译英
+
+        public string TranslateZHToEn(string Source)
+        {
+            string result = function.GetWebRequest("http://fanyi.youdao.com/translate?&doctype=json&type=ZH_CN2EN&i=" + Source);
+            //{"type":"ZH_CN2EN","errorCode":0,"elapsedTime":2,"translateResult":[[{"src":"大事件","tgt":"The big event"}]]}
+            Match match = Regex.Match(result, "\"tgt\":\".*?\"");
+            if (match.Success)
+            {
+                return match.Value.Replace("\"tgt\":", "").Trim('"');
+            }
+            return "";
+        }
+
+        #endregion
+
+        #region 解析编辑器里的视频代码
+        public string CheckMediaFromHtml(string content)
+        {
+            if (string.IsNullOrEmpty(content))
+            {
+                return "";
+            }
+            string result = content;
+            MatchCollection mc = Regex.Matches(content, "<embed.*?/>");
+            foreach (Match submc in mc)
+            {
+                string info = submc.Value;
+                Match match = Regex.Match(info, "src=\".*?\"");
+                if (match.Success)
+                {
+                    string path = match.Value;
+                    path = path.Replace("src=\"", "");
+                    path = path.TrimEnd(new char[] { '"' });
+                    string html = "";
+                    string width = "600";
+                    string height = "300";
+                    Match width_match = Regex.Match(info, "width=\".*?\"");
+                    if (width_match.Success)
+                    {
+                        width = width_match.Value.Replace("width=", "").Trim('"');
+                    }
+                    Match height_match = Regex.Match(info, "height=\".*?\"");
+                    if (height_match.Success)
+                    {
+                        height = height_match.Value.Replace("height=", "").Trim('"');
+                    }
+                    if (path.EndsWith(".mp4"))
+                    {
+                        if (string.IsNullOrEmpty(html))
+                        {
+                            html = "<video controls=\"controls\" autoplay=\"autoplay\" poster=\"\" onplay=\"true\" width=\"" + width + "\" height=\"" + height + "\" onclick=\"this.play();\">" +
+                                                "<source src=\"" + path + "\">" +
+                                                "<source src=\"" + path + "\" type=\"video/mp4\">" +
+                                                "<source src=\"" + path + "\" type=\"video/webm\">" +
+                                                "<source src=\"" + path + "\" type=\"video/ogg\">" +
+                                            "</video>";
+                        }
+                    }
+                    else if (path.EndsWith(".mp3"))
+                    {
+                        html = "<audio controls=\"controls\" width=\"" + width + "\" height=\"" + height + "\" onclick=\"this.play();\">" +
+                                        "<source src=\"" + path + "\" type=\"audio/mp3\" />" +
+                                        "<embed src=\"" + path + "\" height=\"100\" width=\"100\" />" +
+                                    "</audio>";
+                    }
+                    result = result.Replace(info, html);
+                }
+            }
+            return result;
+        }
+        #endregion
+
+        #region 对象转Json字符串
+
+        public static string ObjectToJsonString(object obj)
+        {
+            return Newtonsoft.Json.JsonConvert.SerializeObject(obj);
+        }
+
+        #endregion
+
+        #region Json字符串转对象
+
+        public static T DeserializeJSON<T>(string json)
+        {
+            return Newtonsoft.Json.JsonConvert.DeserializeObject<T>(json);
+        }
+
+        #endregion
+
+        #region 删除文件
+
+        public static bool DeleteFile(string VirtualPath)
+        {
+            string FilePath = function.getPath(VirtualPath);
+            if (System.IO.File.Exists(FilePath))
+            {
+                System.IO.File.Delete(FilePath);
+                return true;
+            }
+            return false;
+        }
+
+        #endregion
+
+        #region 两点距离
+
+        public static double GetDistanceNumber(string start, string end)
+        {
+            if (!string.IsNullOrEmpty(start) && !string.IsNullOrEmpty(end))
+            {
+                string[] startpos = start.Split(',');
+                string[] endpos = end.Split(',');
+                double lng1 = double.Parse(startpos[0]);
+                double lat1 = double.Parse(startpos[1]);
+                double lng2 = double.Parse(endpos[0]);
+                double lat2 = double.Parse(endpos[1]);
+                double radLat1 = rad(lat1);
+                double radLat2 = rad(lat2);
+                double a = radLat1 - radLat2;
+                double b = rad(lng1) - rad(lng2);
+                double s = 2 * Math.Asin(Math.Sqrt(Math.Pow(Math.Sin(a / 2), 2) + Math.Cos(radLat1) * Math.Cos(radLat2) * Math.Pow(Math.Sin(b / 2), 2)));
+                s = s * EARTH_RADIUS;
+                s = Math.Round(s * 10000) / 10000;
+                return s;
+            }
+            return 10000000;
+        }
+        private static double rad(double d)
+        {
+            return d * Math.PI / 180.0;
+        }
+        private static double EARTH_RADIUS = 6378.137;
+
+        #endregion
+    
+        #region 获取OSS开关
+        public string GetOssStatus()
+        { 
+            return "-oss";
+        }
+        #endregion
+
+
+        #region 通过表名、文本、值获得字典数据
+
+        public Dictionary<string, string> GetDictionaryByTableName(string tableEnName, string Text, string Value)
+        {
+            Text = Text.Split('_')[0];
+            Value = Value.Split('_')[0];
+            Dictionary<string, string> dic = new Dictionary<string, string>();
+            DataTable dt = dbconn.dtable("select " + Text + "," + Value + " from " + tableEnName + " order by Sort desc,Id asc");
+            foreach (DataRow dr in dt.Rows)
+            {
+                dic.Add(dr[1].ToString(), dr[0].ToString());
+            }
+            return dic;
+        }
+
+        #endregion
+
+        #region 接口通用DES解密
+
+        public static string DesDecrypt(string content)
+        {
+            content = HttpUtility.UrlDecode(content);
+            return dbconn.DesDecrypt(content, "*ga34|^7");
+        }
+
+        #endregion
+
+        
+    }
+}

+ 72 - 0
Util/Queue/AliyunPushHelper.cs

@@ -0,0 +1,72 @@
+using System;
+using System.Linq;
+using System.Data;
+using System.Threading;
+using Library;
+using LitJson;
+using MySystem.Models.Push;
+using System.Collections.Generic;
+
+namespace MySystem
+{   
+    public class AliyunPushHelper
+    {
+        public readonly static AliyunPushHelper Instance = new AliyunPushHelper();
+        private AliyunPushHelper()
+        {
+        }
+
+        public void Start()//启动
+        {
+            Thread thread = new Thread(threadStart);
+            thread.IsBackground = true;
+            thread.Start();
+        }
+
+        private void threadStart()
+        {
+            while (true)
+            {
+                string content = RedisDbconn.Instance.RPop<string>("AliyunPushQueue");
+                if (!string.IsNullOrEmpty(content))
+                {
+                    try
+                    {
+                        DoSomeThing(content);
+                    }
+                    catch (Exception ex)
+                    {
+                        LogHelper.Instance.WriteLog(DateTime.Now.ToString() + "\n" + content + "\n" + ex, "SLS日志异常");
+                    }
+                }
+                else
+                {
+                    Thread.Sleep(5000);
+                }
+            }
+        }
+
+        //要执行的方法
+        public void DoSomeThing(string content)
+        {
+            JsonData data = JsonMapper.ToObject(content);
+            string Account = data["Account"].ToString();
+            if(Account == "14781419364")
+            {
+                return;
+            }
+            string Device = data["Device"].ToString();
+            string Title = data["Title"].ToString();
+            string Body = data["Body"].ToString();
+            if(Device == "IOS")
+            {
+                AliyunPush.PushForIos(Account, Title, Body);
+            }
+            else
+            {
+                AliyunPush.Push(Account, Title, Body);
+            }
+        }
+        
+    }
+}

+ 217 - 0
Util/Queue/PosPushHelper.cs

@@ -0,0 +1,217 @@
+using System;
+using System.Linq;
+using System.Data;
+using System.Threading;
+using Library;
+using LitJson;
+using MySystem.Models.Push;
+using System.Collections.Generic;
+using System.Text;
+using System.IO;
+using System.Net;
+
+namespace MySystem
+{
+    public class PosPushHelper
+    {
+        public readonly static PosPushHelper Instance = new PosPushHelper();
+        private PosPushHelper()
+        {
+        }
+
+        public void Start()//启动
+        {
+            Thread thread = new Thread(threadStart);
+            thread.IsBackground = true;
+            thread.Start();
+        }
+
+        private void threadStart()
+        {
+            while (true)
+            {
+                string content = RedisDbconn.Instance.RPop<string>("KxsPosDataQueue");
+                if (!string.IsNullOrEmpty(content))
+                {
+                    try
+                    {
+                        DoSomeThing(content);
+                    }
+                    catch (Exception ex)
+                    {
+                        LogHelper.Instance.WriteLog(DateTime.Now.ToString() + "\n" + content + "\n" + ex, "推送机具数据异常");
+                    }
+                }
+                else
+                {
+                    Thread.Sleep(5000);
+                }
+            }
+        }
+
+        public void StartSaveToDb()//启动
+        {
+            Thread thread = new Thread(threadStartSaveToDb);
+            thread.IsBackground = true;
+            thread.Start();
+        }
+
+        private void threadStartSaveToDb()
+        {
+            while (true)
+            {
+                string content = RedisDbconn.Instance.RPop<string>("KxsPosDataSaveToDbQueue");
+                if (!string.IsNullOrEmpty(content))
+                {
+                    try
+                    {
+                        DoSomeThing2(content);
+                    }
+                    catch (Exception ex)
+                    {
+                        LogHelper.Instance.WriteLog(DateTime.Now.ToString() + "\n" + content + "\n" + ex, "保存推送结果");
+                    }
+                }
+                else
+                {
+                    Thread.Sleep(5000);
+                }
+            }
+        }
+
+        //要执行的方法
+        public void DoSomeThing(string content)
+        {
+            string url = "";
+            Utils.WriteLog(DateTime.Now.ToString() + "\n" + content, "统一推送日志");
+            content = content.Replace("null", "\"\"");
+            JsonData jsonObj = JsonMapper.ToObject(content);
+            string dataType = jsonObj["data_type"].ToString();
+            string dataContent = jsonObj["data_content"].ToJson();
+            if(dataType == "bind") url = AppConfig.Base.JavaPushHost + "v1/kxs/statServer/sp/binding";
+            if(dataType == "un_bind") url = AppConfig.Base.JavaPushHost + "v1/kxs/statServer/sp/unbind";
+            if(dataType == "trade") url = AppConfig.Base.JavaPushHost + "v1/kxs/statServer/sp/trade";
+            if(dataType == "deposit") url = AppConfig.Base.JavaPushHost + "v1/kxs/statServer/sp/cash";
+            if(dataType == "active") url = AppConfig.Base.JavaPushHost + "v1/kxs/statServer/sp/extActData";
+            if(dataType == "qr_bind") url = AppConfig.Base.JavaPushHost + "v1/kxs/statServer/sp/saveHaoDaQrCodeMchInfo";
+            if(dataType == "lkb_trade") url = AppConfig.Base.JavaPushHost + "v1/kxs/statServer/sp/lkbTrade";
+            Utils.WriteLog("url:" + url, "统一推送日志");
+            string encryptContent = AesEncrypt(dataContent);
+            encryptContent = Convert.ToBase64String(Encoding.UTF8.GetBytes(encryptContent));
+            Utils.WriteLog("encryptContent:" + encryptContent, "统一推送日志");
+            string res = PostWebRequest(url, encryptContent, new Dictionary<string, string>());
+            Utils.WriteLog("res:" + res + "\n\n\n", "统一推送日志");
+            RedisDbconn.Instance.AddList("KxsPosDataSaveToDbQueue", dataContent + "#cut#" + encryptContent + "#cut#" + dataType + "#cut#" + res);
+        }
+
+        public void DoSomeThing2(string content)
+        {
+            string[] data = content.Split(new string[]{ "#cut#" }, StringSplitOptions.None);
+            string dataContent = data[0];
+            string encryptContent = data[1];
+            string dataType = data[2];
+            string res = data[3];
+            if(!res.Contains("\"status\""))
+            {
+                SaveToDb(dataContent, encryptContent, dataType, res);
+                return;
+            }
+            JsonData backObj = JsonMapper.ToObject(res);
+            if(backObj["status"].ToString() != "1")
+            {
+                SaveToDb(dataContent, encryptContent, dataType, res);
+                return;
+            }
+            SaveToDb(dataContent, encryptContent, dataType, res, 1);
+        }
+
+        public void SaveToDb(string content, string encryptContent, string dataType, string backContent, int status = 0)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            db.PushPosRecord.Add(new PushPosRecord()
+            {
+                CreateDate = DateTime.Now,
+                Content = content,
+                DataType = dataType,
+                EncryptContent = encryptContent,
+                BackContent = backContent,
+                Status = status,
+            });
+            db.SaveChanges();
+            db.Dispose();
+        }
+
+        public string AesEncrypt(string str)
+        {
+            if (string.IsNullOrEmpty(str)) return null;
+            Byte[] toEncryptArray = Encoding.UTF8.GetBytes(str);
+            string key = "CBTU1dD4Kd5pyiGWTsI10jRQ3SvKusSV";
+            string iv = "DYgjCEIMVrj2W9xN";
+
+            System.Security.Cryptography.RijndaelManaged rm = new System.Security.Cryptography.RijndaelManaged
+            {
+                Key = Encoding.UTF8.GetBytes(key),
+                IV = Encoding.UTF8.GetBytes(iv),
+                Mode = System.Security.Cryptography.CipherMode.CBC,
+                Padding = System.Security.Cryptography.PaddingMode.PKCS7
+            };
+            System.Security.Cryptography.ICryptoTransform cTransform = rm.CreateEncryptor();
+            Byte[] resultArray = cTransform.TransformFinalBlock(toEncryptArray, 0, toEncryptArray.Length);
+            return Convert.ToBase64String(resultArray, 0, resultArray.Length);
+        }
+
+        public string PostWebRequest(string postUrl, string paramData, Dictionary<string, string> headers)
+        {
+            string ret = string.Empty;
+            try
+            {
+                byte[] postData = System.Text.Encoding.UTF8.GetBytes(paramData);
+                // 设置提交的相关参数 
+                HttpWebRequest request = WebRequest.Create(postUrl) as HttpWebRequest;
+                System.Text.Encoding myEncoding = System.Text.Encoding.UTF8;
+                request.Method = "POST";
+                request.KeepAlive = false;
+                request.AllowAutoRedirect = true;
+                request.ContentType = "application/json";
+                foreach (string key in headers.Keys)
+                {
+                    request.Headers.Add(key, headers[key]);
+                }
+                request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR  3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)";
+
+                request.ContentLength = postData.Length;
+
+                // 提交请求数据 
+                Stream outputStream = request.GetRequestStream();
+                outputStream.Write(postData, 0, postData.Length);
+                outputStream.Close();
+                HttpWebResponse response;
+                Stream responseStream;
+                StreamReader reader;
+                string srcString;
+                response = request.GetResponse() as HttpWebResponse;
+                responseStream = response.GetResponseStream();
+                reader = new StreamReader(responseStream, System.Text.Encoding.UTF8);
+                srcString = reader.ReadToEnd();
+                ret = srcString;   //返回值赋值
+                reader.Close();
+            }
+            catch (WebException ex)
+            {
+                HttpWebResponse response = (HttpWebResponse)ex.Response;
+                Stream myResponseStream = response.GetResponseStream();
+                //获取响应内容
+                StreamReader myStreamReader = new StreamReader(myResponseStream);
+                ret = myStreamReader.ReadToEnd();
+                myResponseStream.Close();
+            }
+            catch (Exception ex)
+            {
+                ret = "fail";
+                Utils.WriteLog(DateTime.Now.ToString() + "\r\n" + ex.ToString(), "POST请求异常");
+            }
+            return ret;
+        }
+        
+    }
+}

+ 186 - 0
Util/Queue/PosRePushHelper.cs

@@ -0,0 +1,186 @@
+using System;
+using System.Linq;
+using System.Data;
+using System.Threading;
+using Library;
+using LitJson;
+using MySystem.Models.Push;
+using System.Collections.Generic;
+using System.Text;
+using System.IO;
+using System.Net;
+
+namespace MySystem
+{
+    public class PosRePushHelper
+    {
+        public readonly static PosRePushHelper Instance = new PosRePushHelper();
+        private PosRePushHelper()
+        {
+        }
+
+        public void Start()//启动
+        {
+            Thread thread = new Thread(threadStart);
+            thread.IsBackground = true;
+            thread.Start();
+        }
+
+        private void threadStart()
+        {
+            while (true)
+            {
+                try
+                {
+                    DoSomeThing();
+                }
+                catch (Exception ex)
+                {
+                    LogHelper.Instance.WriteLog(DateTime.Now.ToString() + "\n" + ex.ToString(), "重推机具数据异常");
+                }
+                Thread.Sleep(3600000);
+            }
+        }
+
+        //要执行的方法
+        public void DoSomeThing()
+        {
+            string url = "";
+            WebCMSEntities db = new WebCMSEntities();
+            DateTime check = DateTime.Now.AddMinutes(-3);
+            List<PushPosRecord> list = db.PushPosRecord.Where(m => m.CreateDate >= check && m.Status < 1).OrderBy(m => m.Id).Take(200).ToList();
+            foreach(PushPosRecord sub in list)
+            {
+                string dataType = sub.DataType;
+                if(dataType == "bind") url = AppConfig.Base.JavaPushHost + "v1/kxs/statServer/sp/binding";
+                if(dataType == "un_bind") url = AppConfig.Base.JavaPushHost + "v1/kxs/statServer/sp/unbind";
+                if(dataType == "trade") url = AppConfig.Base.JavaPushHost + "v1/kxs/statServer/sp/trade";
+                if(dataType == "deposit") url = AppConfig.Base.JavaPushHost + "v1/kxs/statServer/sp/cash";
+                if(dataType == "active") url = AppConfig.Base.JavaPushHost + "v1/kxs/statServer/sp/extActData";
+                if(dataType == "qr_bind") url = AppConfig.Base.JavaPushHost + "v1/kxs/statServer/sp/saveHaoDaQrCodeMchInfo";
+                if(dataType == "lkb_trade") url = AppConfig.Base.JavaPushHost + "v1/kxs/statServer/sp/lkbTrade";
+                string res = PostWebRequest(url, sub.EncryptContent, new Dictionary<string, string>());
+                if(res.Contains("\"status\""))
+                {
+                    JsonData backObj = JsonMapper.ToObject(res);
+                    if(backObj["status"].ToString() == "1")
+                    {
+                        PushPosRecord edit = db.PushPosRecord.FirstOrDefault(m => m.Id == sub.Id);
+                        if(edit != null)
+                        {
+                            edit.Status = 1;
+                            edit.BackContent = res;
+                        }
+                    }
+                    else
+                    {
+                        PushPosRecord edit = db.PushPosRecord.FirstOrDefault(m => m.Id == sub.Id);
+                        if(edit != null)
+                        {
+                            edit.Status = 2;
+                            edit.BackContent = res;
+                        }
+                    }
+                }
+                else
+                {
+                    PushPosRecord edit = db.PushPosRecord.FirstOrDefault(m => m.Id == sub.Id);
+                    if(edit != null)
+                    {
+                        edit.Status = 3;
+                        edit.BackContent = res;
+                    }
+                }
+            }
+            db.SaveChanges();
+            db.Dispose();
+        }
+
+        public void SaveToDb(string content, string encryptContent, string dataType)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            db.PushPosRecord.Add(new PushPosRecord()
+            {
+                CreateDate = DateTime.Now,
+                Content = content,
+                DataType = dataType,
+                EncryptContent = encryptContent,
+            });
+            db.SaveChanges();
+            db.Dispose();
+        }
+
+        public string AesEncrypt(string str)
+        {
+            if (string.IsNullOrEmpty(str)) return null;
+            Byte[] toEncryptArray = Encoding.UTF8.GetBytes(str);
+            string key = "CBTU1dD4Kd5pyiGWTsI10jRQ3SvKusSV";
+            string iv = "DYgjCEIMVrj2W9xN";
+
+            System.Security.Cryptography.RijndaelManaged rm = new System.Security.Cryptography.RijndaelManaged
+            {
+                Key = Encoding.UTF8.GetBytes(key),
+                IV = Encoding.UTF8.GetBytes(iv),
+                Mode = System.Security.Cryptography.CipherMode.CBC,
+                Padding = System.Security.Cryptography.PaddingMode.PKCS7
+            };
+            System.Security.Cryptography.ICryptoTransform cTransform = rm.CreateEncryptor();
+            Byte[] resultArray = cTransform.TransformFinalBlock(toEncryptArray, 0, toEncryptArray.Length);
+            return Convert.ToBase64String(resultArray, 0, resultArray.Length);
+        }
+
+        public string PostWebRequest(string postUrl, string paramData, Dictionary<string, string> headers)
+        {
+            string ret = string.Empty;
+            try
+            {
+                byte[] postData = System.Text.Encoding.UTF8.GetBytes(paramData);
+                // 设置提交的相关参数 
+                HttpWebRequest request = WebRequest.Create(postUrl) as HttpWebRequest;
+                System.Text.Encoding myEncoding = System.Text.Encoding.UTF8;
+                request.Method = "POST";
+                request.KeepAlive = false;
+                request.AllowAutoRedirect = true;
+                request.ContentType = "application/json";
+                foreach (string key in headers.Keys)
+                {
+                    request.Headers.Add(key, headers[key]);
+                }
+                request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR  3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)";
+
+                request.ContentLength = postData.Length;
+
+                // 提交请求数据 
+                Stream outputStream = request.GetRequestStream();
+                outputStream.Write(postData, 0, postData.Length);
+                outputStream.Close();
+                HttpWebResponse response;
+                Stream responseStream;
+                StreamReader reader;
+                string srcString;
+                response = request.GetResponse() as HttpWebResponse;
+                responseStream = response.GetResponseStream();
+                reader = new StreamReader(responseStream, System.Text.Encoding.UTF8);
+                srcString = reader.ReadToEnd();
+                ret = srcString;   //返回值赋值
+                reader.Close();
+            }
+            catch (WebException ex)
+            {
+                HttpWebResponse response = (HttpWebResponse)ex.Response;
+                Stream myResponseStream = response.GetResponseStream();
+                //获取响应内容
+                StreamReader myStreamReader = new StreamReader(myResponseStream);
+                ret = myStreamReader.ReadToEnd();
+                myResponseStream.Close();
+            }
+            catch (Exception ex)
+            {
+                ret = "fail";
+                Utils.WriteLog(DateTime.Now.ToString() + "\r\n" + ex.ToString(), "POST请求异常");
+            }
+            return ret;
+        }
+        
+    }
+}

+ 248 - 0
Util/Queue/PushHelper.cs

@@ -0,0 +1,248 @@
+using System;
+using System.Linq;
+using System.Data;
+using System.Threading;
+using Library;
+using LitJson;
+using MySystem.Models.Push;
+using System.Collections.Generic;
+
+namespace MySystem
+{   
+    public class PushHelper
+    {
+        public readonly static PushHelper Instance = new PushHelper();
+        private PushHelper()
+        {
+        }
+
+        public void Start()//启动
+        {
+            Thread thread = new Thread(threadStart);
+            thread.IsBackground = true;
+            thread.Start();
+        }
+
+        private void threadStart()
+        {
+            while (true)
+            {
+                try
+                {
+                    DoSomeThing();
+                }
+                catch(Exception ex)
+                {
+                    Utils.WriteLog(DateTime.Now.ToString() + "\n" + ex.ToString(), "通用推送日志异常");
+                }
+                Thread.Sleep(120000);
+            }
+        }
+
+        //要执行的方法
+        public void DoSomeThing()
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            //查找开通推送的商户
+            var merchants = db.Merchant.Where(m => m.Status == 1).ToList();
+            foreach(var merchant in merchants)
+            {
+                string RsaPubKey = merchant.RsaPubKey;
+                string RsaPriKey = merchant.RsaPriKey;
+                string AesSecret = merchant.AesSecret;
+                string MerchantNo = merchant.MerchantNo;
+                string MerchantName = merchant.MerchantName;
+
+                //查找商户开通的推送项目
+                var pushObj = db.PushObj.Where(m => m.Status == 1 && m.MerchantId == merchant.Id).ToList();
+                foreach(var pushItem in pushObj)
+                {
+                    string FieldList = pushItem.FieldList;
+                    string TableName = pushItem.TableName;
+                    TableName = SourceHelper.Instance.MatchExpressionVal(TableName);
+                    int EncryptMode = pushItem.EncryptMode;
+                    string NoticeUrl = pushItem.NoticeUrl;
+                    string Title = pushItem.Title;
+                    int MerchantId = pushItem.MerchantId;
+
+                    string QueryField = "";
+                    List<string> PushField = new List<string>();
+                    Dictionary<string, string> Trans = new Dictionary<string, string>();
+                    JsonData fieldJson = JsonMapper.ToObject(FieldList);
+                    for (int i = 0; i < fieldJson.Count; i++)
+                    {
+                        JsonData item = fieldJson[i];
+                        if(!string.IsNullOrEmpty(item["name"].ToString())) QueryField += item["name"].ToString() + ",";
+                        if(item["push"].ToString() == "1")
+                        {
+                            PushField.Add(item["name"].ToString());
+                            Trans.Add(item["name"].ToString(), item["trans"].ToString());
+                        }
+                    }
+
+                    //构造抓取数据sql
+                    string sql = "select " + QueryField.TrimEnd(',') + " from u_" + TableName + " where 1=1";
+                    var condiList = db.PushObjCondition.Where(m => m.PushObjId == pushItem.Id).ToList();
+                    foreach(var condi in condiList)
+                    {
+                        int QueryCondition = condi.QueryCondition;
+                        if(QueryCondition == 1)
+                        {
+                            sql += " and " + condi.QueryField + "='" + condi.QueryVal + "'";
+                        }
+                        else if(QueryCondition == 2)
+                        {
+                            sql += " and " + condi.QueryField + " like '%" + condi.QueryVal + "%'";
+                        }
+                        else if(QueryCondition == 3)
+                        {
+                            sql += " and " + condi.QueryField + ">" + condi.QueryVal + "";
+                        }
+                        else if(QueryCondition == 4)
+                        {
+                            sql += " and " + condi.QueryField + "<" + condi.QueryVal + "";
+                        }
+                        else if(QueryCondition == 5)
+                        {
+                            string[] QueryValList = condi.QueryVal.Split('|');
+                            sql += " and " + condi.QueryField + ">=" + QueryValList[0] + " and " + condi.QueryField + "<=" + QueryValList[1] + "";
+                        }
+                        else if(QueryCondition == 6)
+                        {
+                            string[] QueryValList = condi.QueryVal.Split('|');
+                            sql += " and " + condi.QueryField + ">='" + QueryValList[0] + "' and " + condi.QueryField + "<='" + QueryValList[1] + "'";
+                        }
+                        else if(QueryCondition == 7)
+                        {
+                            sql += " and " + condi.QueryField + " in (" + condi.QueryVal + ")";
+                        }
+                        else if(QueryCondition == 8)
+                        {
+                            sql += " and " + condi.QueryField + " in ('" + condi.QueryVal.Replace(",", "','") + "')";
+                        }
+                        else if(QueryCondition == 9)
+                        {
+                            string[] QueryValList = condi.QueryVal.Split(',');
+                            sql += " and (";
+                            int index = 0;
+                            foreach(string QueryVal in QueryValList)
+                            {
+                                index += 1;
+                                sql += condi.QueryField + "=" + QueryVal;
+                                if(index < QueryValList.Length)
+                                {
+                                    sql += " or ";
+                                }
+                            }
+                            sql += ")";
+                        }
+                        else
+                        {
+                            sql += " and " + condi.QueryField + "='" + condi.QueryVal + "'";
+                        }
+                    }
+
+                    //抓取数据开始post数据
+                    int StartId = pushItem.QueryId;
+                    sql = sql.Replace("${QueryId}$", StartId.ToString());
+                    sql += " order by id limit 10";
+                    DataTable dt = CustomerSqlConn.dtable(sql, AppConfig.Base.SqlConnStr);
+                    foreach(DataRow dr in dt.Rows)
+                    {
+                        SortedList<string, string> obj = new SortedList<string, string>();
+                        foreach(DataColumn dc in dt.Columns)
+                        {
+                            if(PushField.Contains(dc.ColumnName))
+                            {
+                                string val = dr[dc.ColumnName].ToString();
+                                string tran = Trans[dc.ColumnName];
+                                if(!string.IsNullOrEmpty(val))
+                                {
+                                    if(!string.IsNullOrEmpty(tran))
+                                    {
+                                        if(tran.StartsWith("*"))
+                                        {
+                                            decimal num = decimal.Parse(val) * int.Parse(tran.Substring(1));
+                                            val = num.ToString("f0");
+                                        }
+                                    }
+                                    if(dc.DataType == typeof(DateTime))
+                                    {
+                                        val = DateTime.Parse(val).ToString("yyyy-MM-dd HH:mm:ss");
+                                    }
+                                    obj.Add(dc.ColumnName, val);
+                                }
+                            }
+                        }
+                        int Status = 0;
+                        string PushData = "";
+                        string PushDataEncrypt = "";
+                        if(EncryptMode == 1)
+                        {
+                            string noticeId = Guid.NewGuid().ToString();
+                            if(obj.ContainsKey("order_id"))
+                            {
+                                noticeId = obj["order_id"];
+                            }
+                            PushData = Newtonsoft.Json.JsonConvert.SerializeObject(obj);
+                            LogHelper.Instance.WriteLog("原始数据:" + PushData, "推送数据日志");
+                            string content = EncryptHelper.Encrypt1(obj, AesSecret);
+                            LogHelper.Instance.WriteLog("加密数据:" + content, "推送数据日志");
+                            obj = new SortedList<string, string>();
+                            obj.Add("type", Title);
+                            obj.Add("notice_id", noticeId);
+                            obj.Add("timestamp", DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8));
+                            obj.Add("content", content);
+                            string requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(obj);
+                            PushDataEncrypt = requestJson;
+                            LogHelper.Instance.WriteLog("请求参数:" + PushDataEncrypt, "推送数据日志");
+                            LogHelper.Instance.WriteLog("请求地址:" + NoticeUrl, "推送数据日志");
+                            string result = function.PostWebRequest(NoticeUrl, requestJson, "application/json");
+                            LogHelper.Instance.WriteLog("返回报文:" + result + "\n\n", "推送数据日志");
+                            if(result.Replace(" ", "").Contains("\"code\":\"200\""))
+                            {
+                                Status = 1;
+                            }
+                        }
+                        PushRecord rec = db.PushRecord.Add(new PushRecord()
+                        {
+                            CreateDate = DateTime.Now,
+                            UpdateDate = DateTime.Now,
+                            Status = Status,
+                            PushData = PushData,
+                            PushDataEncrypt = PushDataEncrypt,
+                            PushObjId = pushItem.Id,
+                            MerchantId = merchant.Id
+                        }).Entity;
+                        db.SaveChanges();
+                        if(Status != 1)
+                        {
+                            db.RePushQueue.Add(new RePushQueue()
+                            {
+                                CreateDate = DateTime.Now,
+                                RePushUrl = NoticeUrl,
+                                RePushDate = RePushHelper.Instance.GetNextTime(1),
+                                Times = 1,
+                                PushData = PushData,
+                                PushDataEncrypt = PushDataEncrypt,
+                                PushObjId = pushItem.Id,
+                                MerchantId = merchant.Id,
+                                PushRecordId = rec.Id,
+                            });
+                        }
+                        db.SaveChanges();
+                        StartId = int.Parse(dr["id"].ToString());
+                    }
+                    var edit = db.PushObj.FirstOrDefault(m => m.Id == pushItem.Id);
+                    if(edit != null)
+                    {
+                        edit.QueryId = StartId;
+                        db.SaveChanges();
+                    }
+                }
+            }
+            db.Dispose();
+        }
+        
+    }
+}

+ 107 - 0
Util/Queue/RePushHelper.cs

@@ -0,0 +1,107 @@
+using System;
+using System.Linq;
+using System.Data;
+using System.Threading;
+using Library;
+using LitJson;
+using MySystem.Models.Push;
+using System.Collections.Generic;
+
+namespace MySystem
+{   
+    public class RePushHelper
+    {
+        public readonly static RePushHelper Instance = new RePushHelper();
+        private RePushHelper()
+        {
+        }
+
+        public void Start()//启动
+        {
+            Thread thread = new Thread(threadStart);
+            thread.IsBackground = true;
+            thread.Start();
+        }
+
+        private void threadStart()
+        {
+            while (true)
+            {
+                DoSomeThing();
+                Thread.Sleep(120000);
+            }
+        }
+
+        //要执行的方法
+        public void DoSomeThing()
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            //查找开通推送的商户
+            DateTime now = DateTime.Now;
+            var pushs = db.RePushQueue.Select(m => new { m.Id, m.Times, m.RePushUrl, m.PushDataEncrypt, m.RePushDate }).Where(m => m.Times <= 15 && m.RePushDate <= now).ToList();
+            foreach(var push in pushs)
+            {
+                string NoticeUrl = push.RePushUrl;
+                string PushDataEncrypt = push.PushDataEncrypt;
+                int Status = 0;
+                // string result = function.PostWebRequest(NoticeUrl, PushDataEncrypt, "application/json");
+                // if(result.Contains("\"code\":\"200\""))
+                // {
+                //     Status = 1;
+                // }
+                RePushQueue edit = db.RePushQueue.FirstOrDefault(m => m.Id == push.Id);
+                if(edit != null)
+                {
+                    if(Status == 1)
+                    {
+                        PushRecord record = db.PushRecord.FirstOrDefault(m => m.Id == edit.PushRecordId);
+                        if(record != null)
+                        {
+                            record.Status = 1;
+                        }
+                        db.RePushQueue.Remove(edit);
+                    }
+                    else
+                    {
+                        if(edit.Times >= 15)
+                        {
+                            PushRecord record = db.PushRecord.FirstOrDefault(m => m.Id == edit.PushRecordId);
+                            if(record != null)
+                            {
+                                record.Status = -1;
+                            }
+                        }
+                        else
+                        {
+                            edit.Times += 1;
+                            edit.RePushDate = GetNextTime(edit.Times);
+                        }
+                    }
+                    db.SaveChanges();
+                }
+            }
+            db.Dispose();
+        }
+
+        public DateTime GetNextTime(int num)
+        {
+            if(num == 1) return DateTime.Now.AddSeconds(15);
+            if(num == 2) return DateTime.Now.AddSeconds(15);
+            if(num == 3) return DateTime.Now.AddSeconds(30);
+            if(num == 4) return DateTime.Now.AddMinutes(3);
+            if(num == 5) return DateTime.Now.AddMinutes(10);
+            if(num == 6) return DateTime.Now.AddMinutes(20);
+            if(num == 7) return DateTime.Now.AddMinutes(30);
+            if(num == 8) return DateTime.Now.AddMinutes(30);
+            if(num == 9) return DateTime.Now.AddMinutes(30);
+            if(num == 10) return DateTime.Now.AddMinutes(60);
+            if(num == 11) return DateTime.Now.AddHours(3);
+            if(num == 12) return DateTime.Now.AddHours(3);
+            if(num == 13) return DateTime.Now.AddHours(3);
+            if(num == 14) return DateTime.Now.AddHours(6);
+            if(num == 15) return DateTime.Now.AddHours(6);
+            return DateTime.Now;
+        } 
+        
+    }
+}

+ 351 - 0
Util/Queue/SourceHelper.cs

@@ -0,0 +1,351 @@
+using System;
+using System.Data;
+using System.Linq;
+using System.Text.RegularExpressions;
+using System.Threading;
+using Library;
+using LitJson;
+using MySystem.Models.Push;
+
+namespace MySystem
+{   
+    public class SourceHelper
+    {
+        public readonly static SourceHelper Instance = new SourceHelper();
+        private SourceHelper()
+        {
+        }
+
+        public void Start()//启动
+        {
+            Thread thread = new Thread(threadStart);
+            thread.IsBackground = true;
+            thread.Start();
+        }
+
+        private void threadStart()
+        {
+            while (true)
+            {
+                DoSomeThing();
+                Thread.Sleep(120000);
+            }
+        }
+
+        //要执行的方法
+        public void DoSomeThing()
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            var sources = db.SourceData.Where(m => m.Status == 1).ToList();
+            foreach(var source in sources)
+            {
+                string Title = source.Title; //说明
+                string TableName = source.TableName; //数据表
+                TableName = MatchExpressionVal(TableName);
+                string FieldList = source.FieldList; //原始数据字段
+                string FlagField = source.TargetFieldList; //原始标记字段
+                int StartId = source.QueryId;
+                string Month = source.Month;
+                string QueryField = "";
+                JsonData fieldJson = JsonMapper.ToObject(FieldList);
+                for (int i = 0; i < fieldJson.Count; i++)
+                {
+                    JsonData item = fieldJson[i];
+                    string source_name = item["source_name"].ToString();
+                    if(source_name.StartsWith("v("))
+                    {
+                        if(source_name.Contains(" from "))
+                        {
+                            string sqlString = source_name.Replace("v(", "").Replace(")", "");
+                            Match m = Regex.Match(sqlString, "\\$\\{.*?\\}");
+                            if(m.Success)
+                            {
+                                QueryField += m.Value.Replace("${", "").Replace("}", "") + ",";
+                            }
+                        }
+                        else
+                        {
+                            QueryField += source_name.Replace("v(", "").Replace(")", "") + ",";
+                        }
+                    }
+                    else
+                    {
+                        QueryField += source_name + ",";
+                    }
+                }
+
+                //构造抓取数据
+                string sql = "select " + QueryField.TrimEnd(',') + " from " + TableName + " where 1=1";
+                var condiList = db.SourceCondition.Where(m => m.SourceId == source.Id && m.Status == 1).ToList();
+                foreach(var condi in condiList)
+                {
+                    int QueryCondition = condi.QueryCondition;
+                    if(QueryCondition == 1)
+                    {
+                        sql += " and " + condi.QueryField + "='" + condi.QueryVal + "'";
+                    }
+                    else if(QueryCondition == 2)
+                    {
+                        sql += " and " + condi.QueryField + " like '%" + condi.QueryVal + "%'";
+                    }
+                    else if(QueryCondition == 3)
+                    {
+                        sql += " and " + condi.QueryField + ">" + condi.QueryVal + "";
+                    }
+                    else if(QueryCondition == 4)
+                    {
+                        sql += " and " + condi.QueryField + "<" + condi.QueryVal + "";
+                    }
+                    else if(QueryCondition == 5)
+                    {
+                        string[] QueryValList = condi.QueryVal.Split('|');
+                        sql += " and " + condi.QueryField + ">=" + QueryValList[0] + " and " + condi.QueryField + "<=" + QueryValList[1] + "";
+                    }
+                    else if(QueryCondition == 6)
+                    {
+                        string[] QueryValList = condi.QueryVal.Split('|');
+                        sql += " and " + condi.QueryField + ">='" + QueryValList[0] + "' and " + condi.QueryField + "<='" + QueryValList[1] + "'";
+                    }
+                    else if(QueryCondition == 7)
+                    {
+                        sql += " and " + condi.QueryField + " in (" + condi.QueryVal + ")";
+                    }
+                    else if(QueryCondition == 8)
+                    {
+                        sql += " and " + condi.QueryField + " in ('" + condi.QueryVal.Replace(",", "','") + "')";
+                    }
+                    else if(QueryCondition == 9)
+                    {
+                        string[] QueryValList = condi.QueryVal.Split(',');
+                        sql += " and (";
+                        int index = 0;
+                        foreach(string QueryVal in QueryValList)
+                        {
+                            index += 1;
+                            sql += condi.QueryField + "=" + QueryVal;
+                            if(index < QueryValList.Length)
+                            {
+                                sql += " or ";
+                            }
+                        }
+                        sql += ")";
+                    }
+                    else
+                    {
+                        sql += " and " + condi.QueryField + "='" + condi.QueryVal + "'";
+                    }
+                }
+
+                //创建原始数据表
+                if(TableName.Contains(".")) TableName = TableName.Split('.')[1];
+                var sourceEdit = db.SourceData.FirstOrDefault(m => m.Id == source.Id && m.Version == 0);
+                if(sourceEdit != null)
+                {
+                    CreateTable(Title, TableName, FieldList);
+                    sourceEdit.Version = 1;
+                    db.SaveChanges();
+                }
+
+                //插入数据
+                string TargetQueryField = "";
+                JsonData TargetFieldJson = JsonMapper.ToObject(FieldList);
+                for (int i = 0; i < TargetFieldJson.Count; i++)
+                {
+                    JsonData item = TargetFieldJson[i];
+                    TargetQueryField += item["name"].ToString() + ",";
+                }
+                string insertSql = "";
+                sql = sql.Replace("${QueryId}$", StartId.ToString());
+                sql += " order by id limit 10";
+                DataTable dt = CustomerSqlConn.dtable(sql, AppConfig.Base.JavaStatSqlConnStr);
+                foreach(DataRow dr in dt.Rows)
+                {
+                    string values = "";
+                    for (int i = 0; i < fieldJson.Count; i++)
+                    {
+                        JsonData item = fieldJson[i];
+                        string source_name = item["source_name"].ToString();
+                        string field_type = item["field_type"].ToString();
+                        if(!string.IsNullOrEmpty(source_name))
+                        {
+                            if(source_name.StartsWith("v("))
+                            {
+                                if(source_name.Contains(" from "))
+                                {
+                                    string sqlString = source_name.Replace("v(", "").Replace(")", "").Trim('\'');
+                                    Match m = Regex.Match(sqlString, "\\$\\{.*?\\}");
+                                    if(m.Success)
+                                    {
+                                        string sourceVal = m.Value.Replace("${", "").Replace("}", "");
+                                        sqlString = sqlString.Replace(m.Value, dr[sourceVal].ToString());
+                                        DataTable dataTable = CustomerSqlConn.dtable(sqlString, AppConfig.Base.JavaStatSqlConnStr);
+                                        if(dataTable.Rows.Count > 0)
+                                        {
+                                            if(field_type == "int" || field_type == "numeric")
+                                            {
+                                                values += "" + dataTable.Rows[0][0].ToString() + ",";
+                                            }
+                                            else if(field_type == "datetime")
+                                            {
+                                                values += "'" + DateTime.Parse(dataTable.Rows[0][0].ToString()).ToString("yyyy-MM-dd HH:mm:ss") + "',";
+                                            }
+                                            else
+                                            {
+                                                values += "'" + dataTable.Rows[0][0].ToString() + "',";
+                                            }
+                                        }
+                                    }
+                                }
+                                else
+                                {
+                                    values += source_name.Replace("v(", "").Replace(")", "") + ",";
+                                }
+                            }
+                            else
+                            {
+                                if(field_type == "int" || field_type == "numeric")
+                                {
+                                    values += "" + dr[source_name].ToString() + ",";
+                                }
+                                else if(field_type == "datetime")
+                                {
+                                    values += "'" + DateTime.Parse(dr[source_name].ToString()).ToString("yyyy-MM-dd HH:mm:ss") + "',";
+                                }
+                                else
+                                {
+                                    values += "'" + dr[source_name].ToString() + "',";
+                                }
+                            }
+                        }
+                    }
+                    insertSql += "insert into u_" + TableName + " (" + TargetQueryField.TrimEnd(',') + ") values (" + values.TrimEnd(',') + ");";
+                    StartId = int.Parse(dr["id"].ToString());
+                    // CustomerSqlConn.op("update " + TableName + " set " + FlagField + "=1 where Id=" + StartId, AppConfig.Base.RmSourceSqlConnStr);
+                }
+                var edit = db.SourceData.FirstOrDefault(m => m.Id == source.Id);
+                if(edit != null)
+                {
+                    if(Month != DateTime.Now.ToString("yyyyMM"))
+                    {
+                        edit.Month = DateTime.Now.ToString("yyyyMM");
+                        edit.QueryId = 0;
+                    }
+                    else
+                    {
+                        edit.QueryId = StartId;
+                        if(edit.Month != Month) edit.Month = Month;
+                    }
+                    db.SaveChanges();
+                }
+                if(!string.IsNullOrEmpty(insertSql))
+                {
+                    CustomerSqlConn.op(insertSql, AppConfig.Base.SqlConnStr);
+                }
+            }
+            db.Dispose();
+        }
+        
+        //创建表
+        public void CreateTable(string Title, string tableName, string fieldList)
+        {
+            string sql = "CREATE TABLE `u_" + tableName + "` (\n";
+            JsonData fieldJson = JsonMapper.ToObject(fieldList);
+            string prikey = "";
+            for (int i = 0; i < fieldJson.Count; i++)
+            {
+                JsonData item = fieldJson[i];
+                string nullCondition = "";
+                string fieldType = item["field_type"].ToString();
+                string defaultValue = item["default"].ToString();
+                if(!string.IsNullOrEmpty(defaultValue))
+                {
+                    nullCondition = " NOT NULL DEFAULT " + defaultValue;
+                }
+                if(item["pri"].ToString() == "1" && item["name"].ToString() == "id")
+                {
+                    sql += "`" + item["name"].ToString() + "` int NOT NULL AUTO_INCREMENT COMMENT '" + item["title"].ToString() + "',\n";
+                }
+                else
+                {
+                    if(fieldType == "int")
+                    {
+                        sql += "`" + item["name"].ToString() + "` int NOT NULL DEFAULT " + defaultValue + " COMMENT '" + item["title"].ToString() + "',\n";
+                    }
+                    else if(fieldType == "numeric")
+                    {
+                        sql += "`" + item["name"].ToString() + "` numeric(18,2) NOT NULL DEFAULT " + defaultValue + " COMMENT '" + item["title"].ToString() + "',\n";
+                    }
+                    else if(fieldType == "datetime")
+                    {
+                        sql += "`" + item["name"].ToString() + "` datetime COMMENT '" + item["title"].ToString() + "',\n";
+                    }
+                    else
+                    {
+                        sql += "`" + item["name"].ToString() + "` " + fieldType + "(" + item["len"].ToString() + ")" + nullCondition + " COMMENT '" + item["title"].ToString() + "',\n";
+                    }
+                }
+                if(item["pri"].ToString() == "1")
+                {
+                    prikey = item["name"].ToString();
+                }
+            }
+            if(!string.IsNullOrEmpty(prikey))
+            {
+                sql += "PRIMARY KEY (`" + prikey + "`)\n";
+            }
+            sql += ") ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='" + Title + "';";
+            CustomerSqlConn.op(sql, AppConfig.Base.SqlConnStr);
+        }
+
+        public string GetExpressionVal(string str)
+        {
+            if(str == "#{now}#") return DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+            if(str == "#{today}#") return DateTime.Now.ToString("yyyy-MM-dd");
+            if(str == "#{this_month}#") return DateTime.Now.ToString("yyyy-MM");
+            if(str.StartsWith("#{now") && str.EndsWith("DAY}#")) return DateTime.Now.AddDays(int.Parse(str.Replace("#", "").Replace("{", "").Replace("}", "").Split(',')[1])).ToString("yyyy-MM-dd HH:mm:ss");
+            if(str.StartsWith("#{now") && str.EndsWith("MONTH}#")) return DateTime.Now.AddMonths(int.Parse(str.Replace("#", "").Replace("{", "").Replace("}", "").Split(',')[1])).ToString("yyyy-MM-dd HH:mm:ss");
+            if(str.StartsWith("#{today") && str.EndsWith("DAY}#")) return DateTime.Now.AddDays(int.Parse(str.Replace("#", "").Replace("{", "").Replace("}", "").Split(',')[1])).ToString("yyyy-MM-dd");
+            if(str.StartsWith("#{today") && str.EndsWith("MONTH}#")) return DateTime.Now.AddMonths(int.Parse(str.Replace("#", "").Replace("{", "").Replace("}", "").Split(',')[1])).ToString("yyyy-MM-dd");
+            if(str.StartsWith("#{this_month") && str.EndsWith("DAY}#")) return DateTime.Now.AddDays(int.Parse(str.Replace("#", "").Replace("{", "").Replace("}", "").Split(',')[1])).ToString("yyyy-MM");
+            if(str.StartsWith("#{this_month") && str.EndsWith("MONTH}#")) return DateTime.Now.AddMonths(int.Parse(str.Replace("#", "").Replace("{", "").Replace("}", "").Split(',')[1])).ToString("yyyy-MM");
+            if(str.StartsWith("#{") && str.EndsWith("DAY}#")) return DateTime.Parse(str.Replace("#", "").Replace("{", "").Replace("}", "").Split(',')[0]).AddDays(int.Parse(str.Replace("#", "").Replace("{", "").Replace("}", "").Split(',')[1])).ToString("yyyy-MM-dd HH:mm:ss");
+            if(str.StartsWith("#{") && str.EndsWith("MONTH}#")) return DateTime.Parse(str.Replace("#", "").Replace("{", "").Replace("}", "").Split(',')[0]).AddMonths(int.Parse(str.Replace("#", "").Replace("{", "").Replace("}", "").Split(',')[1])).ToString("yyyy-MM-dd HH:mm:ss");
+            if(str.StartsWith("#{split") && str.EndsWith("}#"))
+            {
+                string[] data = str.Replace("#{", "").Replace("}#", "").Split(',');
+                string text = data[1];
+                string splitTag = data[2];
+                string index = data[3];
+                return text.Split(new string[]{ splitTag }, StringSplitOptions.None)[int.Parse(index)];
+            }
+            else if(str.StartsWith("#{") && str.EndsWith("}#"))
+            {
+                string[] data = str.Replace("#{", "").Replace("}#", "").Split(',');
+                string tag = data[0];
+                string format = data[data.Length - 1];
+                if(tag == "now" && format.StartsWith("yyyy"))
+                {
+                    if(data.Length == 2)
+                    {
+                        return DateTime.Now.ToString(format);
+                    }
+                    else if(data.Length == 4)
+                    {
+                        if(data[2] == "DAY") return DateTime.Now.AddDays(int.Parse(data[1])).ToString(format);
+                        if(data[2] == "MONTH") return DateTime.Now.AddMonths(int.Parse(data[1])).ToString(format);
+                    }
+                }
+            }
+            return str;
+        }
+        public string MatchExpressionVal(string str)
+        {
+            MatchCollection mc = Regex.Matches(str, "#\\{.*?\\}#");
+            foreach(Match m in mc)
+            {
+                str = str.Replace(m.Value, GetExpressionVal(m.Value));
+            }
+            return str;
+        }
+    }
+}

+ 110 - 0
Util/RabbitMQClient.cs

@@ -0,0 +1,110 @@
+using System;
+using System.Text;
+using RabbitMQ.Client;
+using RabbitMQ.Client.Events;
+
+namespace MySystem
+{
+    public class RabbitMQClient
+    {
+        public readonly static RabbitMQClient Instance = new RabbitMQClient();
+        private RabbitMQClient()
+        {
+        }
+
+        #region 单对单发送
+        public void SendMsg(string content, string QueueName = "")
+        {
+            //创建连接对象工厂
+            var factory = new ConnectionFactory()
+            {
+                UserName = "guest",
+                Password = "123456",
+                HostName = "localhost",
+                Port = 5672,  //RabbitMQ默认的端口
+            };
+            var conn = factory.CreateConnection();
+            var channel = conn.CreateModel();
+            channel.QueueDeclare(QueueName, true, false, false);
+            channel.BasicPublish("", QueueName, null, Encoding.Default.GetBytes(content));
+            channel.Dispose();
+            conn.Dispose();
+        }
+        #endregion
+
+        #region 单对单接收
+        public void StartReceive(string QueueName)
+        {
+            var factory = new ConnectionFactory()
+            {
+                UserName = "guest",
+                Password = "123456",
+                HostName = "localhost",
+                Port = 5672,
+            };
+
+            var conn = factory.CreateConnection();
+            var channel = conn.CreateModel();
+            channel.QueueDeclare(QueueName, true, false, false);
+            EventingBasicConsumer consumer = new EventingBasicConsumer(channel);
+            consumer.Received += (a, e) =>
+            {
+                Utils.WriteLog(Encoding.Default.GetString(e.Body.ToArray()), "接收到的MQ消息");
+                channel.BasicAck(e.DeliveryTag, true); //收到回复后,RabbitMQ会直接在队列中删除这条消息
+            };
+            channel.BasicConsume(QueueName, false, consumer);
+        }
+        #endregion
+
+
+
+        #region 单对多发送
+        public void SendMsgToExchange(string content, string Exchange = "")
+        {
+            //创建连接对象工厂
+            var factory = new ConnectionFactory()
+            {
+                UserName = "guest",
+                Password = "123456",
+                HostName = "localhost",
+                Port = 5672,  //RabbitMQ默认的端口
+            };
+            var conn = factory.CreateConnection();
+            var channel = conn.CreateModel();
+            channel.ExchangeDeclare(Exchange, ExchangeType.Fanout, true, false);
+            channel.BasicPublish(Exchange, "", null, Encoding.Default.GetBytes(content));
+            channel.Dispose();
+            conn.Dispose();
+        }
+        #endregion
+
+        #region 单对多接收
+        public void StartReceiveFromExchange(string QueueName = "", string Exchange = "")
+        {
+            var factory = new ConnectionFactory()
+            {
+                UserName = "guest",
+                Password = "123456",
+                HostName = "localhost",
+                Port = 5672,
+            };
+
+            var conn = factory.CreateConnection();
+            var channel = conn.CreateModel();
+            //定义队列
+            channel.QueueDeclare(QueueName, true, false, false);
+            //定义交换机
+            channel.ExchangeDeclare(Exchange, ExchangeType.Fanout, true, false);
+            //绑定队列到交换机
+            channel.QueueBind(QueueName, Exchange, "");
+            var consumer = new EventingBasicConsumer(channel);
+            consumer.Received += (a, e) =>
+            {
+                Utils.WriteLog(Encoding.Default.GetString(e.Body.ToArray()), "接收到的MQ消息");
+                channel.BasicAck(e.DeliveryTag, true); //收到回复后,RabbitMQ会直接在队列中删除这条消息
+            };
+            channel.BasicConsume(QueueName, false, consumer);
+        }
+        #endregion
+    }
+}

+ 211 - 0
Util/RedisDbconn.cs

@@ -0,0 +1,211 @@
+using System.Collections.Generic;
+using Library;
+
+namespace MySystem
+{
+    public class RedisDbconn
+    {
+        public readonly static RedisDbconn Instance = new RedisDbconn();
+        public static CSRedis.CSRedisClient csredis;
+        private RedisDbconn()
+        {
+        }
+
+        #region 设置单个字段
+        public bool Set(string key, object value)
+        {
+            return csredis.Set(key, value);
+            // return false;
+        }
+        #endregion
+
+        #region 整数累加
+        public long AddInt(string key, long value = 1)
+        {
+            return csredis.IncrBy(key, value);
+            // return 0;
+        }
+        #endregion
+
+        #region 数字累加
+        public decimal AddNumber(string key, decimal value = 1)
+        {
+            return csredis.IncrByFloat(key, value);
+            // return 0;
+        }
+        #endregion
+
+        #region 获取单个字段
+        public T Get<T>(string key)
+        {
+            return csredis.Get<T>(key);
+        }
+        #endregion
+
+        #region 设置散列字段
+        public bool HSet(string key, string field, object value)
+        {
+            return csredis.HSet(key, field, value);
+            // return false;
+        }
+        #endregion
+
+        #region 散列整数累加
+        public long HAddInt(string key, string field, long value = 1)
+        {
+            return csredis.HIncrBy(key, field, value);
+            // return 0;
+        }
+        #endregion
+
+        #region 散列数字累加
+        public decimal HAddNumber(string key, string field, decimal value = 1)
+        {
+            return csredis.HIncrByFloat(key, field, value);
+            // return 0;
+        }
+        #endregion
+
+        #region 获取散列元素
+        public T HGet<T>(string key, string field)
+        {
+            return csredis.HGet<T>(key, field);
+        }
+        #endregion
+
+        #region 获取散列所有元素
+        public Dictionary<string, T> HGetAll<T>(string key)
+        {
+            return csredis.HGetAll<T>(key);
+        }
+        #endregion
+
+        #region 添加列表对象
+        public long AddList(string key, object value)
+        {
+            return csredis.LPush(key, value);
+            // return 0;
+        }
+        public long AddList(string key, object[] value)
+        {
+            return csredis.LPush(key, value);
+            // return 0;
+        }
+        public T RPop<T>(string key)
+        {
+            return csredis.RPop<T>(key);
+        }
+        #endregion
+
+        #region 添加集合对象
+        public long SAdd(string key, object value)
+        {
+            return csredis.SAdd(key, value);
+            // return 0;
+        }
+        public long SAdd(string key, object[] value)
+        {
+            return csredis.SAdd(key, value);
+            // return 0;
+        }
+        #endregion
+
+        #region 获取集合对象
+        public T[] SGetList<T>(string key)
+        {
+            return csredis.SMembers<T>(key);
+        }
+        #endregion
+
+        #region 修改列表对象
+        public bool SetList(string key, int index, object value)
+        {
+            long itemindex = csredis.LLen(key) - index - 1;
+            return csredis.LSet(key, itemindex, value);
+            // return false;
+        }
+        #endregion
+
+        #region 获取列表
+        public List<T> GetList<T>(string key, int pageNum = 1, int pageSize = 10)
+        {
+            int start = (pageNum - 1) * pageSize;
+            int end = start + pageSize - 1;
+            string[] list = csredis.LRange(key, start, end);
+            List<T> lists = new List<T>();
+            foreach (string record in list)
+            { 
+                lists.Add(Newtonsoft.Json.JsonConvert.DeserializeObject<T>(record));
+            }
+            return lists;
+        }
+        #endregion
+
+        #region 添加排序列表对象
+        public long AddSort(string key, object value, decimal score)
+        {
+            return csredis.ZAdd(key, (score, value));
+            // return 0;
+        }
+        #endregion
+
+        #region 获取排序列表
+        public List<T> GetSort<T>(string key, int pageNum = 1, int pageSize = 10)
+        {
+            int start = (pageNum - 1) * pageSize;
+            int end = start + pageSize;
+            string[] list = csredis.ZRangeByScore(key, start, end);
+            List<T> lists = new List<T>();
+            foreach (string record in list)
+            { 
+                lists.Add(Newtonsoft.Json.JsonConvert.DeserializeObject<T>(record));
+            }
+            return lists;
+        }
+        public List<T> GetSortDesc<T>(string key, int pageNum = 1, int pageSize = 10)
+        {
+            int start = (pageNum - 1) * pageSize;
+            int end = start + pageSize;
+            string[] list = csredis.ZRevRangeByScore(key, start, end);
+            List<T> lists = new List<T>();
+            foreach (string record in list)
+            { 
+                lists.Add(Newtonsoft.Json.JsonConvert.DeserializeObject<T>(record));
+            }
+            return lists;
+        }
+        #endregion
+
+        public bool Remove(string key, long start, long end)
+        {
+            return csredis.LTrim(key, start, end);
+        }
+
+        public bool RemoveTop(string key, long count)
+        {
+            return RedisDbconn.Instance.Remove(key, count, RedisDbconn.Instance.Count(key) - 1);;
+        }
+
+        public long Count(string key)
+        {
+            return csredis.LLen(key);
+        }
+
+        public void Clear(string pattern)
+        {
+            string[] keys = csredis.Keys(pattern);
+            csredis.Del(keys);
+        }
+
+        public string[] GetKeys(string pattern)
+        { 
+            string[] keys = csredis.Keys(pattern);
+            return keys;
+        }
+
+        public void SetExpire(string key, int expire)
+        { 
+            csredis.Expire(key, expire); //秒为单位
+        }
+    }
+}

+ 211 - 0
Util/RedisDbconnTest.cs

@@ -0,0 +1,211 @@
+using System.Collections.Generic;
+using Library;
+
+namespace MySystem
+{
+    public class RedisDbconnTest
+    {
+        public readonly static RedisDbconnTest Instance = new RedisDbconnTest();
+        public static CSRedis.CSRedisClient csredis;
+        private RedisDbconnTest()
+        {
+        }
+
+        #region 设置单个字段
+        public bool Set(string key, object value)
+        {
+            return csredis.Set(key, value);
+            // return false;
+        }
+        #endregion
+
+        #region 整数累加
+        public long AddInt(string key, long value = 1)
+        {
+            return csredis.IncrBy(key, value);
+            // return 0;
+        }
+        #endregion
+
+        #region 数字累加
+        public decimal AddNumber(string key, decimal value = 1)
+        {
+            return csredis.IncrByFloat(key, value);
+            // return 0;
+        }
+        #endregion
+
+        #region 获取单个字段
+        public T Get<T>(string key)
+        {
+            return csredis.Get<T>(key);
+        }
+        #endregion
+
+        #region 设置散列字段
+        public bool HSet(string key, string field, object value)
+        {
+            return csredis.HSet(key, field, value);
+            // return false;
+        }
+        #endregion
+
+        #region 散列整数累加
+        public long HAddInt(string key, string field, long value = 1)
+        {
+            return csredis.HIncrBy(key, field, value);
+            // return 0;
+        }
+        #endregion
+
+        #region 散列数字累加
+        public decimal HAddNumber(string key, string field, decimal value = 1)
+        {
+            return csredis.HIncrByFloat(key, field, value);
+            // return 0;
+        }
+        #endregion
+
+        #region 获取散列元素
+        public T HGet<T>(string key, string field)
+        {
+            return csredis.HGet<T>(key, field);
+        }
+        #endregion
+
+        #region 获取散列所有元素
+        public Dictionary<string, T> HGetAll<T>(string key)
+        {
+            return csredis.HGetAll<T>(key);
+        }
+        #endregion
+
+        #region 添加列表对象
+        public long AddList(string key, object value)
+        {
+            return csredis.LPush(key, value);
+            // return 0;
+        }
+        public long AddList(string key, object[] value)
+        {
+            return csredis.LPush(key, value);
+            // return 0;
+        }
+        public T RPop<T>(string key)
+        {
+            return csredis.RPop<T>(key);
+        }
+        #endregion
+
+        #region 添加集合对象
+        public long SAdd(string key, object value)
+        {
+            return csredis.SAdd(key, value);
+            // return 0;
+        }
+        public long SAdd(string key, object[] value)
+        {
+            return csredis.SAdd(key, value);
+            // return 0;
+        }
+        #endregion
+
+        #region 获取集合对象
+        public T[] SGetList<T>(string key)
+        {
+            return csredis.SMembers<T>(key);
+        }
+        #endregion
+
+        #region 修改列表对象
+        public bool SetList(string key, int index, object value)
+        {
+            long itemindex = csredis.LLen(key) - index - 1;
+            return csredis.LSet(key, itemindex, value);
+            // return false;
+        }
+        #endregion
+
+        #region 获取列表
+        public List<T> GetList<T>(string key, int pageNum = 1, int pageSize = 10)
+        {
+            int start = (pageNum - 1) * pageSize;
+            int end = start + pageSize - 1;
+            string[] list = csredis.LRange(key, start, end);
+            List<T> lists = new List<T>();
+            foreach (string record in list)
+            { 
+                lists.Add(Newtonsoft.Json.JsonConvert.DeserializeObject<T>(record));
+            }
+            return lists;
+        }
+        #endregion
+
+        #region 添加排序列表对象
+        public long AddSort(string key, object value, decimal score)
+        {
+            return csredis.ZAdd(key, (score, value));
+            // return 0;
+        }
+        #endregion
+
+        #region 获取排序列表
+        public List<T> GetSort<T>(string key, int pageNum = 1, int pageSize = 10)
+        {
+            int start = (pageNum - 1) * pageSize;
+            int end = start + pageSize;
+            string[] list = csredis.ZRangeByScore(key, start, end);
+            List<T> lists = new List<T>();
+            foreach (string record in list)
+            { 
+                lists.Add(Newtonsoft.Json.JsonConvert.DeserializeObject<T>(record));
+            }
+            return lists;
+        }
+        public List<T> GetSortDesc<T>(string key, int pageNum = 1, int pageSize = 10)
+        {
+            int start = (pageNum - 1) * pageSize;
+            int end = start + pageSize;
+            string[] list = csredis.ZRevRangeByScore(key, start, end);
+            List<T> lists = new List<T>();
+            foreach (string record in list)
+            { 
+                lists.Add(Newtonsoft.Json.JsonConvert.DeserializeObject<T>(record));
+            }
+            return lists;
+        }
+        #endregion
+
+        public bool Remove(string key, long start, long end)
+        {
+            return csredis.LTrim(key, start, end);
+        }
+
+        public bool RemoveTop(string key, long count)
+        {
+            return RedisDbconn.Instance.Remove(key, count, RedisDbconn.Instance.Count(key) - 1);;
+        }
+
+        public long Count(string key)
+        {
+            return csredis.LLen(key);
+        }
+
+        public void Clear(string pattern)
+        {
+            string[] keys = csredis.Keys(pattern);
+            csredis.Del(keys);
+        }
+
+        public string[] GetKeys(string pattern)
+        { 
+            string[] keys = csredis.Keys(pattern);
+            return keys;
+        }
+
+        public void SetExpire(string key, int expire)
+        { 
+            csredis.Expire(key, expire); //秒为单位
+        }
+    }
+}

+ 66 - 0
Util/TestHelper.cs

@@ -0,0 +1,66 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Threading;
+using Library;
+using LitJson;
+using MySystem;
+
+public class TestHelper
+{
+    public readonly static TestHelper Instance = new TestHelper();
+    private TestHelper()
+    { }
+
+    public void Start()
+    {
+        Thread th = new Thread(DoQueue);
+        th.IsBackground = true;
+        th.Start();
+    }
+
+    public void DoWorks()
+    {
+        while (true)
+        {
+            string content = RedisDbconn.Instance.RPop<string>("LogQueue");
+            if (!string.IsNullOrEmpty(content))
+            {
+                try
+                {
+                }
+                catch (Exception ex)
+                {
+                    LogHelper.Instance.WriteLog(DateTime.Now.ToString() + "\n" + content + "\n" + ex, "SLS日志异常");
+                }
+            }
+            else
+            {
+                Thread.Sleep(5000);
+            }
+        }
+    }
+
+    public void DoQueue()
+    { 
+        string check = function.ReadInstance("/chk.txt");
+        if(!string.IsNullOrEmpty(check))
+        {
+            return;
+        }
+        function.WritePage("/", "chk.txt", DateTime.Now.ToString());
+        string[] list = function.ReadInstance("9.txt").Split('\n');
+        foreach(string sub in list)
+        {
+            Utils.WriteLog(sub);
+            function.GetWebRequest("https://logic-executor-api.kexiaoshuang.com/noauth/prize/pushbyone?n=QUEUE_KXS_MACHINE_PRIZE_CONFIG_DIVISION&m=" + sub + "&ids=3");
+        }
+        // list = function.ReadInstance("10.txt").Split('\n');
+        // foreach(string sub in list)
+        // {
+        //     Utils.WriteLog(sub);
+        //     // function.GetWebRequest("https://logic-executor-api.kexiaoshuang.com/noauth/prize/pushbyone?n=" + data[1] + "&m=" + data[0] + "&ids=60,");
+        //     function.GetWebRequest("https://logic-executor-api.kexiaoshuang.com/noauth/prize/push?n=QUEUE_KXS_MACHINE_PRIZE_CONFIG_DIVISION&m=" + sub);
+        // }
+    }
+}

+ 16 - 0
Util/Utils.cs

@@ -0,0 +1,16 @@
+using System;
+
+public class Utils
+{
+    
+    #region 打控制台日志
+
+    public static void WriteLog(string msg, string filename = "message")
+    {
+        Console.WriteLine(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") + "--" + filename + "--" + msg);
+    }
+
+    #endregion
+
+
+}

+ 251 - 0
Util/VerifyCodeHelper.cs

@@ -0,0 +1,251 @@
+using System;
+using System.DrawingCore;
+using System.DrawingCore.Drawing2D;
+using System.DrawingCore.Imaging;
+using System.IO;
+namespace MySystem
+{
+    public class VerifyCodeHelper
+    {
+        #region 单例模式
+        //创建私有化静态obj锁  
+        private static readonly object _ObjLock = new object();
+        //创建私有静态字段,接收类的实例化对象  
+        private static VerifyCodeHelper _VerifyCodeHelper = null;
+        //构造函数私有化  
+        private VerifyCodeHelper() { }
+        //创建单利对象资源并返回  
+        public static VerifyCodeHelper GetSingleObj()
+        {
+            if (_VerifyCodeHelper == null)
+            {
+                lock (_ObjLock)
+                {
+                    if (_VerifyCodeHelper == null)
+                        _VerifyCodeHelper = new VerifyCodeHelper();
+                }
+            }
+            return _VerifyCodeHelper;
+        }
+        #endregion
+
+        #region 生产验证码
+        public enum VerifyCodeType { NumberVerifyCode, AbcVerifyCode, MixVerifyCode };
+
+        /// <summary>
+        /// 1.数字验证码
+        /// </summary>
+        /// <param name="length"></param>
+        /// <returns></returns>
+        private string CreateNumberVerifyCode(int length)
+        {
+            int[] randMembers = new int[length];
+            int[] validateNums = new int[length];
+            string validateNumberStr = "";
+            //生成起始序列值  
+            int seekSeek = unchecked((int)DateTime.Now.Ticks);
+            Random seekRand = new Random(seekSeek);
+            int beginSeek = seekRand.Next(0, Int32.MaxValue - length * 10000);
+            int[] seeks = new int[length];
+            for (int i = 0; i < length; i++)
+            {
+                beginSeek += 10000;
+                seeks[i] = beginSeek;
+            }
+            //生成随机数字  
+            for (int i = 0; i < length; i++)
+            {
+                Random rand = new Random(seeks[i]);
+                int pownum = 1 * (int)Math.Pow(10, length);
+                randMembers[i] = rand.Next(pownum, Int32.MaxValue);
+            }
+            //抽取随机数字  
+            for (int i = 0; i < length; i++)
+            {
+                string numStr = randMembers[i].ToString();
+                int numLength = numStr.Length;
+                Random rand = new Random();
+                int numPosition = rand.Next(0, numLength - 1);
+                validateNums[i] = Int32.Parse(numStr.Substring(numPosition, 1));
+            }
+            //生成验证码  
+            for (int i = 0; i < length; i++)
+            {
+                validateNumberStr += validateNums[i].ToString();
+            }
+            return validateNumberStr;
+        }
+
+        /// <summary>
+        /// 2.字母验证码
+        /// </summary>
+        /// <param name="length">字符长度</param>
+        /// <returns>验证码字符</returns>
+        private string CreateAbcVerifyCode(int length)
+        {
+            char[] verification = new char[length];
+            char[] dictionary = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
+                'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
+            };
+            Random random = new Random();
+            for (int i = 0; i < length; i++)
+            {
+                verification[i] = dictionary[random.Next(dictionary.Length - 1)];
+            }
+            return new string(verification);
+        }
+
+        /// <summary>
+        /// 3.混合验证码
+        /// </summary>
+        /// <param name="length">字符长度</param>
+        /// <returns>验证码字符</returns>
+        private string CreateMixVerifyCode(int length)
+        {
+            char[] verification = new char[length];
+            char[] dictionary = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
+                '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
+                'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
+            };
+            Random random = new Random();
+            for (int i = 0; i < length; i++)
+            {
+                verification[i] = dictionary[random.Next(dictionary.Length - 1)];
+            }
+            return new string(verification);
+        }
+
+        /// <summary>
+        /// 产生验证码(随机产生4-6位)
+        /// </summary>
+        /// <param name="type">验证码类型:数字,字符,符合</param>
+        /// <returns></returns>
+        public string CreateVerifyCode(VerifyCodeType type)
+        {
+            string verifyCode = string.Empty;
+            Random random = new Random();
+            int length = random.Next(4, 6);
+            switch (type)
+            {
+                case VerifyCodeType.NumberVerifyCode:
+                    verifyCode = GetSingleObj().CreateNumberVerifyCode(length);
+                    break;
+                case VerifyCodeType.AbcVerifyCode:
+                    verifyCode = GetSingleObj().CreateAbcVerifyCode(length);
+                    break;
+                case VerifyCodeType.MixVerifyCode:
+                    verifyCode = GetSingleObj().CreateMixVerifyCode(length);
+                    break;
+            }
+            return verifyCode;
+        }
+        #endregion
+
+        #region 验证码图片
+        /// <summary>
+        /// 验证码图片 => Bitmap
+        /// </summary>
+        /// <param name="verifyCode">验证码</param>
+        /// <param name="width">宽</param>
+        /// <param name="height">高</param>
+        /// <returns>Bitmap</returns>
+        public Bitmap CreateBitmapByImgVerifyCode(string verifyCode, int width, int height)
+        {
+            Font font = new Font("Arial", 18, (FontStyle.Bold | FontStyle.Italic));
+            Brush brush;
+            Bitmap bitmap = new Bitmap(width, height);
+            Graphics g = Graphics.FromImage(bitmap);
+            SizeF totalSizeF = g.MeasureString(verifyCode, font);
+            SizeF curCharSizeF;
+            PointF startPointF = new PointF(0, (height - totalSizeF.Height) / 2);
+            Random random = new Random(); //随机数产生器
+            g.Clear(Color.White); //清空图片背景色  
+            for (int i = 0; i < verifyCode.Length; i++)
+            {
+                brush = new LinearGradientBrush(new Point(0, 0), new Point(1, 1), Color.FromArgb(random.Next(255), random.Next(255), random.Next(255)), Color.FromArgb(random.Next(255), random.Next(255), random.Next(255)));
+                g.DrawString(verifyCode[i].ToString(), font, brush, startPointF);
+                curCharSizeF = g.MeasureString(verifyCode[i].ToString(), font);
+                startPointF.X += curCharSizeF.Width*1.5f;
+            }
+
+            //画图片的干扰线  
+            for (int i = 0; i < 10; i++)
+            {
+                int x1 = random.Next(bitmap.Width);
+                int x2 = random.Next(bitmap.Width);
+                int y1 = random.Next(bitmap.Height);
+                int y2 = random.Next(bitmap.Height);
+                g.DrawLine(new Pen(Color.Silver), x1, y1, x2, y2);
+            }
+
+            //画图片的前景干扰点  
+            for (int i = 0; i < 100; i++)
+            {
+                int x = random.Next(bitmap.Width);
+                int y = random.Next(bitmap.Height);
+                bitmap.SetPixel(x, y, Color.FromArgb(random.Next()));
+            }
+
+            g.DrawRectangle(new Pen(Color.Silver), 0, 0, bitmap.Width - 1, bitmap.Height - 1); //画图片的边框线  
+            g.Dispose();
+            return bitmap;
+        }
+
+        /// <summary>
+        /// 验证码图片 => byte[]
+        /// </summary>
+        /// <param name="verifyCode">验证码</param>
+        /// <param name="width">宽</param>
+        /// <param name="height">高</param>
+        /// <returns>byte[]</returns>
+        public byte[] CreateByteByImgVerifyCode(string verifyCode, int width, int height)
+        {
+            Font font = new Font("Arial", 14, (FontStyle.Bold | FontStyle.Italic));
+            Brush brush;
+            Bitmap bitmap = new Bitmap(width, height);
+            Graphics g = Graphics.FromImage(bitmap);
+            SizeF totalSizeF = g.MeasureString(verifyCode, font);
+            SizeF curCharSizeF;
+            PointF startPointF = new PointF(0, (height - totalSizeF.Height) / 2);
+            Random random = new Random(); //随机数产生器
+            g.Clear(Color.White); //清空图片背景色  
+            for (int i = 0; i < verifyCode.Length; i++)
+            {
+                brush = new LinearGradientBrush(new Point(0, 0), new Point(1, 1), Color.FromArgb(random.Next(255), random.Next(255), random.Next(255)), Color.FromArgb(random.Next(255), random.Next(255), random.Next(255)));
+                g.DrawString(verifyCode[i].ToString(), font, brush, startPointF);
+                curCharSizeF = g.MeasureString(verifyCode[i].ToString(), font);
+                startPointF.X += curCharSizeF.Width;
+            }
+
+            //画图片的干扰线  
+            for (int i = 0; i < 10; i++)
+            {
+                int x1 = random.Next(bitmap.Width);
+                int x2 = random.Next(bitmap.Width);
+                int y1 = random.Next(bitmap.Height);
+                int y2 = random.Next(bitmap.Height);
+                g.DrawLine(new Pen(Color.Silver), x1, y1, x2, y2);
+            }
+
+            //画图片的前景干扰点  
+            for (int i = 0; i < 100; i++)
+            {
+                int x = random.Next(bitmap.Width);
+                int y = random.Next(bitmap.Height);
+                bitmap.SetPixel(x, y, Color.FromArgb(random.Next()));
+            }
+
+            g.DrawRectangle(new Pen(Color.Silver), 0, 0, bitmap.Width - 1, bitmap.Height - 1); //画图片的边框线  
+            g.Dispose();
+
+            //保存图片数据  
+            MemoryStream stream = new MemoryStream();
+            bitmap.Save(stream, ImageFormat.Jpeg);
+            //输出图片流  
+            return stream.ToArray();
+
+        }
+        #endregion
+
+    }
+}

+ 1 - 0
Views/Home/Error.cshtml

@@ -0,0 +1 @@
+error,hehe

+ 1 - 0
Views/Home/Index.cshtml

@@ -0,0 +1 @@
+<h2>客小爽push</h2>

+ 32 - 0
appsettings.Development.json

@@ -0,0 +1,32 @@
+{
+  "Logging": {
+    "LogLevel": {
+      "Default": "Information",
+      "Microsoft": "Warning",
+      "Microsoft.Hosting.Lifetime": "Information"
+    }
+  },
+  "AllowedHosts": "*",
+  "Setting": {
+    "Host": "",
+    "OssHost": "",
+    "SourceHost": "",
+    "JavaPushHost": "http://gateway.kexiaoshuang.com/",
+    "Database": "KxsPushServer",
+    "SqlConnStr": "server=47.108.62.166;port=3306;user=KxsPushServer;password=0j3sEGdlvOsgGbat;database=KxsPushServer;charset=utf8;",
+    "SourceSqlConnStr": "server=47.108.62.166;port=3306;user=root;password=HDlNs1ZpG5iR9D9I;database=KxsMainServer;charset=utf8;",
+    "RmSourceSqlConnStr": "server=47.108.62.166;port=3306;user=root;password=HDlNs1ZpG5iR9D9I;database=KxsMainServer;charset=utf8;",
+    "JavaStatSqlConnStr": "server=47.109.61.191;port=3306;user=root;password=HDlNs1ZpG5iR9D9I;database=kxs_stat;charset=utf8mb4;",
+    "RedisConnStr": "47.108.62.166:6379,password=klm@redis,DefaultDatabase=1,poolsize=500,preheat=50,asyncPipeline=true",
+    "IOSAppVersion": "1.0.0",
+    "AndroidAppVersion": "1.0.0",
+    "OSSKey": "",
+    "OSSSecret": "",
+    "OSSEndpoint": "",
+    "OSSBucketName": "",
+    "AppSource": "/skin/app/default/",
+    "JwtSecret": "JvDHuowbOnWiyxMIFc9gG5rw1LSSc0xx68L31oRfxS0",
+    "JwtIss": "KxsPushServer",
+    "JwtAud": "api"
+  }
+}

+ 5 - 0
global.json

@@ -0,0 +1,5 @@
+{
+  "sdk": {
+    "version": "3.1.426"
+  }
+}