lichunlei 1 год назад
Сommit
c163bc4337
66 измененных файлов с 3520 добавлено и 0 удалено
  1. 5 0
      .gitignore
  2. 1 0
      .vscode/api.code-snippets
  3. 896 0
      .vscode/db.code-snippets
  4. 33 0
      .vscode/launch.json
  5. 55 0
      .vscode/public.code-snippets
  6. 42 0
      .vscode/tasks.json
  7. 20 0
      AppStart/StartHelper.cs
  8. 28 0
      AppStart/TemplateViewLocationExpander.cs
  9. 35 0
      Areas/Api/Controllers/BaseController.cs
  10. 250 0
      Areas/Api/Controllers/PublicMethodController.cs
  11. 21 0
      Config/Base.cs
  12. 15 0
      Config/JwtConfig.cs
  13. 12 0
      Config/LoginSession.cs
  14. 22 0
      Config/Oss.cs
  15. 27 0
      Controllers/HomeController.cs
  16. BIN
      DLL/Aliyun.OSS.dll
  17. BIN
      DLL/LitJSON.dll
  18. BIN
      DLL/MySystemLib.dll
  19. BIN
      DLL/Newtonsoft.Json.dll
  20. BIN
      DLL/ThoughtWorks.QRCode.dll
  21. BIN
      DLL/aliyun-net-sdk-core.dll
  22. 20 0
      Entity/AdminRightListItem.cs
  23. 12 0
      Entity/AppResultJson.cs
  24. 41 0
      Entity/DbScheme.cs
  25. 13 0
      Entity/RedisTables/MobileCodeCheck.cs
  26. 18 0
      Entity/Setting.cs
  27. 25 0
      Filter/AuthorizeFilter.cs
  28. 19 0
      Filter/GlobalActionFilter.cs
  29. 16 0
      Filter/GlobalExceptionsFilter.cs
  30. 19 0
      Filter/ResourceFilter.cs
  31. 19 0
      Filter/ResultFilter.cs
  32. 78 0
      MySystem.csproj
  33. 32 0
      Program.cs
  34. 13 0
      Properties/PublishProfiles/FolderProfile 1.pubxml
  35. 13 0
      Properties/PublishProfiles/FolderProfile 10.pubxml
  36. 13 0
      Properties/PublishProfiles/FolderProfile 11.pubxml
  37. 13 0
      Properties/PublishProfiles/FolderProfile 12.pubxml
  38. 13 0
      Properties/PublishProfiles/FolderProfile 13.pubxml
  39. 13 0
      Properties/PublishProfiles/FolderProfile 14.pubxml
  40. 13 0
      Properties/PublishProfiles/FolderProfile 15.pubxml
  41. 13 0
      Properties/PublishProfiles/FolderProfile 16.pubxml
  42. 13 0
      Properties/PublishProfiles/FolderProfile 17.pubxml
  43. 13 0
      Properties/PublishProfiles/FolderProfile 2.pubxml
  44. 13 0
      Properties/PublishProfiles/FolderProfile 3.pubxml
  45. 13 0
      Properties/PublishProfiles/FolderProfile 4.pubxml
  46. 13 0
      Properties/PublishProfiles/FolderProfile 5.pubxml
  47. 13 0
      Properties/PublishProfiles/FolderProfile 6.pubxml
  48. 13 0
      Properties/PublishProfiles/FolderProfile 7.pubxml
  49. 13 0
      Properties/PublishProfiles/FolderProfile 8.pubxml
  50. 13 0
      Properties/PublishProfiles/FolderProfile 9.pubxml
  51. 13 0
      Properties/PublishProfiles/FolderProfile.pubxml
  52. 27 0
      Properties/launchSettings.json
  53. 301 0
      ServiceReference1/Reference.cs
  54. 160 0
      Startup.cs
  55. 12 0
      Util/Base/BaseClass.cs
  56. 44 0
      Util/DictionaryClass.cs
  57. 17 0
      Util/Extension/StringExtension.cs
  58. 131 0
      Util/OssHelper.cs
  59. 217 0
      Util/PublicFunction.cs
  60. 110 0
      Util/RabbitMQClient.cs
  61. 213 0
      Util/RedisDbconn.cs
  62. 251 0
      Util/VerifyCodeHelper.cs
  63. 1 0
      Views/Home/Error.cshtml
  64. 1 0
      Views/Home/Index.cshtml
  65. 27 0
      appsettings.Development.json
  66. BIN
      wwwroot/favicon.ico

+ 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);",
+"}"
+]
+},
+}

+ 33 - 0
.vscode/launch.json

@@ -0,0 +1,33 @@
+{
+    // 使用 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.0/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 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"
+        }
+    ]
+}

+ 20 - 0
AppStart/StartHelper.cs

@@ -0,0 +1,20 @@
+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)
+            {
+                // DefaultHelper.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";
+        }
+    }
+}

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

@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Web;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Http;
+using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Options;
+using Library;
+
+namespace MySystem.Areas.Api.Controllers
+{
+    public class BaseController : Controller
+    {
+        public IHttpContextAccessor _accessor;
+
+        public BaseController(IHttpContextAccessor accessor)
+        {
+            _accessor = accessor;
+        }
+
+        #region 接口通用解密
+
+        public static string DesDecrypt(string content)
+        {
+            content = HttpUtility.UrlDecode(content);
+            return dbconn.DesDecrypt(content, "*ga34|^7");
+        }
+
+        #endregion
+    }
+}

+ 250 - 0
Areas/Api/Controllers/PublicMethodController.cs

@@ -0,0 +1,250 @@
+using System;
+using System.Collections.Generic;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Http;
+using System.DrawingCore.Imaging;
+using System.IO;
+using Library;
+using System.Collections;
+using LitJson;
+using System.Globalization;
+using System.Web;
+
+namespace MySystem.Areas.Api.Controllers
+{
+    [Area("Api")]
+    [Route("Api/[controller]/[action]")]
+    public class PublicMethodController : BaseController
+    {
+        public PublicMethodController(IHttpContextAccessor accessor) : base(accessor)
+        {
+        }
+        #region 图片验证码
+        public FileContentResult CheckCode()
+        {
+            string code = function.get_Random(4);
+            var bitmap = VerifyCodeHelper.GetSingleObj().CreateBitmapByImgVerifyCode(code, 120, 40);
+            MemoryStream stream = new MemoryStream();
+            bitmap.Save(stream, ImageFormat.Gif);
+            function.WriteCookie(_accessor.HttpContext, "checkcode", code);
+            return File(stream.ToArray(), "image/gif");
+        }
+        #endregion
+        
+        #region 图片验证码
+        public FileContentResult PictureCode(string Tag = "")
+        {
+            string code = function.get_Random(4);
+            var bitmap = VerifyCodeHelper.GetSingleObj().CreateBitmapByImgVerifyCode(code, 120, 40);
+            MemoryStream stream = new MemoryStream();
+            bitmap.Save(stream, ImageFormat.Gif);
+            RedisDbconn.Instance.Set(Tag, code);
+            RedisDbconn.Instance.SetExpire(Tag, 600);
+            return File(stream.ToArray(), "image/jpg");
+        }
+        #endregion
+
+
+
+        #region 编辑器上传图片
+
+        public object EditorUpload([FromForm] IFormCollection rf)
+        {
+            //文件保存目录路径
+            String savePath = "/up/v2/";
+
+            //文件保存目录URL
+            String saveUrl = "/up/v2/";
+
+            //定义允许上传的文件扩展名
+            Hashtable extTable = new Hashtable();
+            extTable.Add("image", "gif,jpg,jpeg,png,bmp");
+            extTable.Add("flash", "swf,flv");
+            extTable.Add("media", "swf,flv,mp3,wav,wma,wmv,mid,avi,mpg,asf,rm,rmvb,mp4");
+            extTable.Add("file", "doc,docx,xls,xlsx,ppt,htm,html,txt,zip,rar,gz,bz2");
+
+            //最大文件大小
+            long maxSize = 1073741824000;
+
+            IFormFile imgFile = rf.Files["imgFile"];
+            if (imgFile == null)
+            {
+                showError("请选择文件。");
+            }
+
+            String dirPath = function.getPath(AppConfig.Oss.PathName + savePath);
+            if (!Directory.Exists(dirPath))
+            {
+                //showError("上传目录不存在。");
+                Directory.CreateDirectory(dirPath);
+            }
+
+            String fileName = imgFile.FileName;
+            String dirName = "";
+            if (String.IsNullOrEmpty(dirName))
+            {
+                if (fileName.ToLower().EndsWith(".mp4") || fileName.ToLower().EndsWith(".mp3"))
+                {
+                    dirName = "media";
+                }
+                else
+                {
+                    dirName = "image";
+                }
+            }
+            if (!extTable.ContainsKey(dirName))
+            {
+                showError("目录名不正确。");
+            }
+
+            String fileExt = Path.GetExtension(fileName).ToLower();
+
+            if (imgFile.Length > maxSize)
+            {
+                showError("上传文件大小超过限制。");
+            }
+
+            if (String.IsNullOrEmpty(fileExt) || Array.IndexOf(((String)extTable[dirName]).Split(','), fileExt.Substring(1).ToLower()) == -1)
+            {
+                showError("上传文件扩展名是不允许的扩展名。\n只允许" + ((String)extTable[dirName]) + "格式。");
+            }
+
+            //创建文件夹
+            dirPath += dirName + "/";
+            saveUrl += dirName + "/";
+            if (!Directory.Exists(dirPath))
+            {
+                Directory.CreateDirectory(dirPath);
+            }
+            String ymd = DateTime.Now.ToString("yyyyMMdd", DateTimeFormatInfo.InvariantInfo);
+            dirPath += ymd + "/";
+            saveUrl += ymd + "/";
+            if (!Directory.Exists(dirPath))
+            {
+                Directory.CreateDirectory(dirPath);
+            }
+            String newFileName = DateTime.Now.ToString("yyyyMMddHHmmss_ffff", DateTimeFormatInfo.InvariantInfo) + fileExt;
+            String filePath = dirPath + newFileName;
+            using var fs = new FileStream(filePath, FileMode.Create);
+            imgFile.CopyTo(fs);
+            String fileUrl = saveUrl + newFileName;
+            if (dirName != "media")
+            {
+                if (!function.check_pic(filePath))
+                {
+                    System.IO.File.Delete(filePath);
+                    return null;
+                }
+                if (function.getImgRule(filePath)["width"] > 2000)
+                {
+                    String newFileName_sl = DateTime.Now.ToString("yyyyMMddHHmmss_ffff", DateTimeFormatInfo.InvariantInfo) + "_sl" + fileExt;
+                    function.imgcut(2000, filePath, dirPath + newFileName_sl);
+                    System.IO.File.Delete(filePath);
+                    fileUrl = saveUrl + newFileName_sl;
+                }
+            }
+
+            Hashtable hash = new Hashtable();
+            hash["error"] = 0;
+            hash["url"] = AppConfig.Oss.SourceHost + "/" + AppConfig.Oss.PathName + fileUrl;
+            OssHelper.Instance.ScanQueue(fileUrl, "");
+            return JsonMapper.ToJson(hash);
+        }
+
+        private object showError(string message)
+        {
+            Hashtable hash = new Hashtable();
+            hash["error"] = 1;
+            hash["message"] = message;
+            return JsonMapper.ToJson(hash);
+        }
+
+        public bool IsReusable
+        {
+            get
+            {
+                return false;
+            }
+        }
+
+
+
+        #endregion
+
+        #region 系统-上传文件
+
+        public JsonResult UploadFile([FromForm] IFormCollection rf)
+        {
+            IFormFile imgFile = rf.Files["file"];
+            string path = MySystemLib.SystemPublicFuction.GetFilePath(imgFile, AppConfig.Oss.PathName + "/uploadfile/" + DateTime.Now.Year + "/" + DateTime.Now.Month + "/" + DateTime.Now.Day + "/");
+            OssHelper.Instance.ScanQueue(path, "");
+            Dictionary<string, string> obj = new Dictionary<string, string>();
+            obj.Add("FileName", path);
+            return Json(obj);
+        }
+
+        #endregion
+
+        #region 系统-上传图片
+        public JsonResult UploadPhoto([FromForm] IFormCollection rf)
+        {
+            IFormFile imgFile = rf.Files["Icon"];
+            string Icon = MySystemLib.SystemPublicFuction.GetPicPath(imgFile, AppConfig.Oss.PathName + "/upload/" + DateTime.Now.Year + "/" + DateTime.Now.Month + "/" + DateTime.Now.Day + "/");
+            OssHelper.Instance.ScanQueue(Icon, "");
+            return Json(new AppResultJson() { Status = "1", Info = "", Data = Icon });
+        }
+
+        #endregion
+
+        #region 系统-上传图片
+        public JsonResult UploadPhotoByBase64(string value)
+        {
+            value = value.Replace("data:image/png;base64,", "");
+            string base64str = HttpUtility.UrlDecode(value).Replace(" ", "+");
+            string dummyData = base64str.Replace("%", "").Replace(",", "").Replace(" ", "+");
+            if (dummyData.Length % 4 > 0)
+            {
+                dummyData = dummyData.PadRight(dummyData.Length + 4 - dummyData.Length % 4, '=');
+            }
+            string Icon = function.base64StringToImage(dummyData, "/" + AppConfig.Oss.PathName + "/upload/" + DateTime.Now.Year + "/" + DateTime.Now.Month + "/" + DateTime.Now.Day + "/", "MT" + function.MD5_16(Guid.NewGuid().ToString()) + ".png");
+            // OssHelper.Instance.ScanQueue(Icon, "");
+            return Json(new AppResultJson() { Status = "1", Info = "", Data = Icon });
+        }
+        #endregion
+
+        #region 系统-layui上传文件
+        public JsonResult LayUIUpload([FromForm] IFormCollection rf, string Path = "", string Resize = "")
+        {
+            IFormFile imgFile = rf.Files[0];
+            string Icon = MySystemLib.SystemPublicFuction.GetFilePath(imgFile, Path + "/" + DateTime.Now.Year + "/" + DateTime.Now.Month + "/" + DateTime.Now.Day + "/",false);
+            string piccut = "";
+            if (!string.IsNullOrEmpty(Resize) && (imgFile.FileName.ToLower().EndsWith(".png") || imgFile.FileName.EndsWith(".jpg")))
+            {
+                JsonData data = JsonMapper.ToObject(Resize);
+                int width = int.Parse(data["width"].ToString());
+                int height = int.Parse(data["height"].ToString());
+                int quality = int.Parse(data["quality"].ToString());
+                piccut = Icon.Replace(".", "s.");
+                function.imgcut2(width, height, function.getPath(Icon), function.getPath(piccut));
+                System.IO.File.Delete(function.getPath(Icon));
+            }
+            else
+            { 
+                piccut = Icon;
+            }
+            return Json(new AppResultJson() { Status = "1", Info = "", Data = piccut });
+        }
+
+        #endregion
+
+        #region 图片转base64
+
+        public string ImgToBase64(string path)
+        {
+            path = HttpUtility.UrlDecode(path);
+            return function.imageToBase64String(function.getPath(path));
+        }
+
+        #endregion
+    }
+}

+ 21 - 0
Config/Base.cs

@@ -0,0 +1,21 @@
+using System.Collections.Generic;
+using Library;
+
+namespace AppConfig
+{
+    public class Base
+    {
+        public static string ApiKey = "G6H7@J8%";
+        public static string OpSqlConnStr = ConfigurationManager.AppSettings["OpSqlConnStr"].ToString();
+        public static string SqlConnStr = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        public static string Host = Library.ConfigurationManager.AppSettings["Host"].ToString();
+        public static string Database = Library.ConfigurationManager.AppSettings["Database"].ToString();
+        public static string defaultImage = Library.ConfigurationManager.AppSettings["Host"].ToString() + "/skin/app/default/static/images/default.jpg";
+        #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;
+    }
+}

+ 27 - 0
Controllers/HomeController.cs

@@ -0,0 +1,27 @@
+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();
+        }
+    }
+}

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


+ 20 - 0
Entity/AdminRightListItem.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+namespace MySystem
+{
+    public class AdminRightListItem
+    {
+        public string path { get; set; }
+        public string name { 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; }
+    }
+}

+ 13 - 0
Entity/RedisTables/MobileCodeCheck.cs

@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem
+{
+    public partial class MobileCodeCheck
+    {
+        public string Mobile { get; set; }
+        public DateTime? CheckCodeTime { get; set; }
+        public string CheckNo { get; set; }
+        public string CheckCode { 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)
+        {
+            //执行方法前先执行这
+        }
+    }
+}

+ 16 - 0
Filter/GlobalExceptionsFilter.cs

@@ -0,0 +1,16 @@
+using System;
+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;
+            function.WriteLog(DateTime.Now.ToString() + "\r\n" + Message + "\r\n" + StackTrace, "Global全局异常处理日志");
+        }
+    }
+}

+ 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)
+        {
+            // 在结果执行之前调用的一系列操作
+        }
+    }
+}

+ 78 - 0
MySystem.csproj

@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<Project Sdk="Microsoft.NET.Sdk.Web">
+  <PropertyGroup>
+    <TargetFramework>netcoreapp3.0</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="aliyun-net-sdk-core">
+      <HintPath>DLL\aliyun-net-sdk-core.dll</HintPath>
+    </Reference>
+    <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="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="8.0.18" />
+    <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://*:5501")
+                    .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.0/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.0</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.0/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.0</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.0/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.0</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.0/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.0</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.0/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.0</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.0/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.0</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.0/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.0</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.0/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.0</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.0/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.0</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.0/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.0</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.0/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.0</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.0/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.0</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.0/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.0</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.0/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.0</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.0/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.0</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.0/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.0</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.0/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.0</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.0/publish</publishUrl>
+    <DeleteExistingFiles>false</DeleteExistingFiles>
+    <TargetFramework>netcoreapp3.0</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:5501"
+    }
+  }
+}

+ 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,
+    }
+}

+ 160 - 0
Startup.cs

@@ -0,0 +1,160 @@
+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 Microsoft.IdentityModel.Tokens;
+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
+            });
+            //生成密钥
+            var symmetricKeyAsBase64 = Configuration["Setting:JwtSecret"];
+            var keyByteArray = Encoding.ASCII.GetBytes(symmetricKeyAsBase64);
+            var signingKey = new SymmetricSecurityKey(keyByteArray);
+            //认证参数
+            services.AddAuthentication("Bearer").AddJwtBearer(o =>
+            {
+                o.TokenValidationParameters = new TokenValidationParameters
+                {
+                    ValidateIssuerSigningKey = true,//是否验证签名,不验证的画可以篡改数据,不安全
+                    IssuerSigningKey = signingKey,//解密的密钥
+                    ValidateIssuer = true,//是否验证发行人,就是验证载荷中的Iss是否对应ValidIssuer参数
+                    // ValidIssuer = Configuration["Setting:JwtIss"],//发行人
+                    IssuerValidator = (m, n, z) =>
+                    {
+                        return n.Issuer;
+                    },
+                    ValidateAudience = true,//是否验证订阅人,就是验证载荷中的Aud是否对应ValidAudience参数
+                    // ValidAudience = Configuration["Setting:JwtAud"],//订阅人
+                    AudienceValidator = (m, n, z) =>
+                    {
+                        string check = RedisDbconn.Instance.Get<string>("utoken:" + n.Issuer);
+                        return m != null && m.FirstOrDefault().Equals(check);
+                    },
+                    ValidateLifetime = true,//是否验证过期时间,过期了就拒绝访问
+                    ClockSkew = TimeSpan.Zero,//这个是缓冲过期时间,也就是说,即使我们配置了过期时间,这里也要考虑进去,过期时间+缓冲,默认好像是7分钟,你可以直接设置为0
+                    RequireExpirationTime = true,
+                };
+            });
+
+            MySystemLib.SystemPublicFuction.appcheck = "success";
+        }
+
+        // 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?}");
+            });
+
+            initMainServer();
+        }
+
+        //初始化数据结构
+        private void initMainServer()
+        {
+            Dictionary<string, Dictionary<string, string>> tables = new Dictionary<string, Dictionary<string, string>>();
+            string connstr = Configuration["Setting:SqlConnStr"];
+            System.Data.DataTable tablecollection = Library.CustomerSqlConn.dtable("select DISTINCT TABLE_NAME from information_schema.columns where table_schema = 'KxsMainServer'", connstr);
+            foreach (System.Data.DataRow subtable in tablecollection.Rows)
+            {
+                Dictionary<string, string> Columns = new Dictionary<string, string>();
+                System.Data.DataTable columncollection = Library.CustomerSqlConn.dtable("select COLUMN_NAME,DATA_TYPE from information_schema.columns where table_schema = 'KxsMainServer' and TABLE_NAME='" + subtable["TABLE_NAME"].ToString() + "'", connstr);
+                foreach (System.Data.DataRow column in columncollection.Rows)
+                {
+                    string datatype = column["DATA_TYPE"].ToString();
+                    if (datatype == "decimal")
+                    {
+                        datatype = "numeric";
+                    }
+                    Columns.Add(column["COLUMN_NAME"].ToString(), datatype);
+                }
+                tables.Add(subtable["TABLE_NAME"].ToString(), Columns);
+            }
+            AppConfig.Base.mainTables = tables;
+        }
+        
+    }
+}

+ 12 - 0
Util/Base/BaseClass.cs

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

+ 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
+    }
+}

+ 17 - 0
Util/Extension/StringExtension.cs

@@ -0,0 +1,17 @@
+using System;
+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
+    }
+}

+ 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)
+                        {
+                            function.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;
+        }
+    }
+}

+ 217 - 0
Util/PublicFunction.cs

@@ -0,0 +1,217 @@
+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 Microsoft.IdentityModel.Tokens;
+using System.Security.Claims;
+using System.IdentityModel.Tokens.Jwt;
+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
+
+        #region 获取jwt的token
+        public static string AppToken(string username)
+        {
+            string test = function.get_Random(10);
+            var securityKey = new SigningCredentials(new SymmetricSecurityKey(Encoding.ASCII.GetBytes(JwtConfig.JwtSecret)), SecurityAlgorithms.HmacSha256);
+            var claims = new Claim[] {
+                new Claim(JwtRegisteredClaimNames.Iss, JwtConfig.JwtIss),
+                new Claim(JwtRegisteredClaimNames.Aud, test),
+                new Claim("Guid", Guid.NewGuid().ToString("D")),
+                new Claim(ClaimTypes.Role, "system"),
+                new Claim(ClaimTypes.Role, "admin"),
+            };
+            SecurityToken securityToken = new JwtSecurityToken(
+                signingCredentials: securityKey,
+                expires: DateTime.Now.AddDays(10),//过期时间
+                claims: claims,
+                audience: test,
+                issuer: username
+            );
+            RedisDbconn.Instance.Set("utoken:" + username, test);
+            RedisDbconn.Instance.SetExpire("utoken:" + username, 3600 * 24 * 10);
+            //生成jwt令牌
+            return new JwtSecurityTokenHandler().WriteToken(securityToken);
+        }
+        #endregion
+    }
+}

+ 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) =>
+            {
+                Library.function.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) =>
+            {
+                Library.function.WriteLog(Encoding.Default.GetString(e.Body.ToArray()), "接收到的MQ消息");
+                channel.BasicAck(e.DeliveryTag, true); //收到回复后,RabbitMQ会直接在队列中删除这条消息
+            };
+            channel.BasicConsume(QueueName, false, consumer);
+        }
+        #endregion
+    }
+}

+ 213 - 0
Util/RedisDbconn.cs

@@ -0,0 +1,213 @@
+using System.Collections.Generic;
+using Library;
+
+namespace MySystem
+{
+    public class RedisDbconn
+    {
+        public readonly static RedisDbconn Instance = new RedisDbconn();
+        private RedisDbconn()
+        {
+            var csredis = new CSRedis.CSRedisClient(ConfigurationManager.AppSettings["RedisConnStr"].ToString());
+            //初始化 RedisHelper
+            RedisHelper.Initialization(csredis);
+        }
+
+        #region 设置单个字段
+        public bool Set(string key, object value)
+        {
+            return RedisHelper.Set(key, value);
+            // return false;
+        }
+        #endregion
+
+        #region 整数累加
+        public long AddInt(string key, long value = 1)
+        {
+            return RedisHelper.IncrBy(key, value);
+            // return 0;
+        }
+        #endregion
+
+        #region 数字累加
+        public decimal AddNumber(string key, decimal value = 1)
+        {
+            return RedisHelper.IncrByFloat(key, value);
+            // return 0;
+        }
+        #endregion
+
+        #region 获取单个字段
+        public T Get<T>(string key)
+        {
+            return RedisHelper.Get<T>(key);
+        }
+        #endregion
+
+        #region 设置散列字段
+        public bool HSet(string key, string field, object value)
+        {
+            return RedisHelper.HSet(key, field, value);
+            // return false;
+        }
+        #endregion
+
+        #region 散列整数累加
+        public long HAddInt(string key, string field, long value = 1)
+        {
+            return RedisHelper.HIncrBy(key, field, value);
+            // return 0;
+        }
+        #endregion
+
+        #region 散列数字累加
+        public decimal HAddNumber(string key, string field, decimal value = 1)
+        {
+            return RedisHelper.HIncrByFloat(key, field, value);
+            // return 0;
+        }
+        #endregion
+
+        #region 获取散列元素
+        public T HGet<T>(string key, string field)
+        {
+            return RedisHelper.HGet<T>(key, field);
+        }
+        #endregion
+
+        #region 获取散列所有元素
+        public Dictionary<string, T> HGetAll<T>(string key)
+        {
+            return RedisHelper.HGetAll<T>(key);
+        }
+        #endregion
+
+        #region 添加列表对象
+        public long AddList(string key, object value)
+        {
+            return RedisHelper.LPush(key, value);
+            // return 0;
+        }
+        public long AddList(string key, object[] value)
+        {
+            return RedisHelper.LPush(key, value);
+            // return 0;
+        }
+        public T RPop<T>(string key)
+        {
+            return RedisHelper.RPop<T>(key);
+        }
+        #endregion
+
+        #region 添加集合对象
+        public long SAdd(string key, object value)
+        {
+            return RedisHelper.SAdd(key, value);
+            // return 0;
+        }
+        public long SAdd(string key, object[] value)
+        {
+            return RedisHelper.SAdd(key, value);
+            // return 0;
+        }
+        #endregion
+
+        #region 获取集合对象
+        public T[] SGetList<T>(string key)
+        {
+            return RedisHelper.SMembers<T>(key);
+        }
+        #endregion
+
+        #region 修改列表对象
+        public bool SetList(string key, int index, object value)
+        {
+            long itemindex = RedisHelper.LLen(key) - index - 1;
+            return RedisHelper.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 = RedisHelper.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 RedisHelper.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 = RedisHelper.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 = RedisHelper.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 RedisHelper.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 RedisHelper.LLen(key);
+        }
+
+        public void Clear(string pattern)
+        {
+            string[] keys = RedisHelper.Keys(pattern);
+            RedisHelper.Del(keys);
+        }
+
+        public string[] GetKeys(string pattern)
+        { 
+            string[] keys = RedisHelper.Keys(pattern);
+            return keys;
+        }
+
+        public void SetExpire(string key, int expire)
+        { 
+            RedisHelper.Expire(key, expire); //秒为单位
+        }
+    }
+}

+ 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>客小爽新版本adminap</h2>

+ 27 - 0
appsettings.Development.json

@@ -0,0 +1,27 @@
+{
+  "Logging": {
+    "LogLevel": {
+      "Default": "Information",
+      "Microsoft": "Warning",
+      "Microsoft.Hosting.Lifetime": "Information"
+    }
+  },
+  "AllowedHosts": "*",
+  "Setting": {
+    "Host": "http://localhost:6003/",
+    "OssHost": "http://oss.kexiaoshuang.com",
+    "Database": "TrainServer",
+    "SqlConnStr": "server=localhost;port=3306;user=;password=;database=;charset=utf8;",
+    "RedisConnStr": "localhost:6379,password=,DefaultDatabase=3,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": "TrainServer",
+    "JwtAud": "api"
+  }
+}

BIN
wwwroot/favicon.ico