├── cookiecutter.json ├── .gitattributes ├── {{cookiecutter.project_name}} ├── {{cookiecutter.project_name}} │ ├── README.md │ ├── wwwroot │ │ ├── favicon.ico │ │ ├── lib │ │ │ └── ueditor.zip │ │ ├── images │ │ │ ├── account │ │ │ │ ├── qq.png │ │ │ │ ├── weibo.png │ │ │ │ └── weixin.png │ │ │ ├── home │ │ │ │ └── user.jpg │ │ │ ├── lib │ │ │ │ └── singleupload │ │ │ │ │ └── upload.png │ │ │ └── workflow │ │ │ │ ├── glyphicons-halflings.png │ │ │ │ └── glyphicons-halflings-white.png │ │ ├── pages │ │ │ ├── error │ │ │ │ ├── 403.html │ │ │ │ ├── 404.html │ │ │ │ ├── error.html │ │ │ │ └── false.html │ │ │ ├── picker │ │ │ │ └── modulepicker.html │ │ │ ├── templates │ │ │ │ └── exampleRedirect.html │ │ │ ├── workflow │ │ │ │ └── flowhistory.html │ │ │ ├── workbench │ │ │ │ ├── toread.html │ │ │ │ ├── todo.html │ │ │ │ ├── done.html │ │ │ │ └── read.html │ │ │ ├── home │ │ │ │ └── summary.html │ │ │ ├── shared │ │ │ │ └── layout.html │ │ │ ├── system │ │ │ │ └── log.html │ │ │ ├── workflowexample │ │ │ │ ├── Example.html │ │ │ │ ├── ExampleTwo.html │ │ │ │ ├── ExampleFive.html │ │ │ │ ├── ExampleFour.html │ │ │ │ ├── ExampleThree.html │ │ │ │ └── ExampleOne.html │ │ │ ├── develop │ │ │ │ └── operation.html │ │ │ └── account │ │ │ │ └── bind.html │ │ ├── weixin │ │ │ ├── error │ │ │ │ └── error.html │ │ │ ├── home │ │ │ │ └── index.html │ │ │ ├── templates │ │ │ │ ├── exampleone.html │ │ │ │ └── exampletow.html │ │ │ └── account │ │ │ │ ├── login.html │ │ │ │ └── bind.html │ │ ├── css │ │ │ ├── lib │ │ │ │ ├── fileupload.min.css │ │ │ │ └── fileupload.css │ │ │ └── workflow │ │ │ │ └── flowdesign.css │ │ ├── work │ │ │ ├── templates │ │ │ │ ├── exampleone.html │ │ │ │ └── exampletow.html │ │ │ └── account │ │ │ │ └── login.html │ │ └── js │ │ │ └── lib │ │ │ ├── spop.min.js │ │ │ └── singleupload.js │ ├── Models │ │ ├── SysRoleUser.cs │ │ ├── SysPageOperation.cs │ │ ├── SysServer.cs │ │ ├── SysUserClientId.cs │ │ ├── FlowMain.cs │ │ ├── SysUserOpenId.cs │ │ ├── FlowOrderCodes.cs │ │ ├── SysLeader.cs │ │ ├── SysRoleOperatePower.cs │ │ ├── SysRole.cs │ │ ├── FlowStepPath.cs │ │ ├── SysSmsCode.cs │ │ ├── SysOperation.cs │ │ ├── SysDictionary.cs │ │ ├── SysUserFaceFeature.cs │ │ ├── SysModule.cs │ │ ├── SysLog.cs │ │ ├── SysQueue.cs │ │ ├── SysQueueHistory.cs │ │ ├── SysModulePage.cs │ │ ├── SysAttachment.cs │ │ ├── SysDepartment.cs │ │ ├── FlowBillsRecordUser.cs │ │ ├── FlowStep.cs │ │ ├── SysUser.cs │ │ ├── FlowBills.cs │ │ ├── FlowBillsRecord.cs │ │ └── GeneralExample.cs │ ├── Helpers │ │ ├── Message │ │ │ ├── SMSService.cs │ │ │ ├── EmailService.cs │ │ │ └── IgetuiService.cs │ │ ├── System │ │ │ ├── DateTimeHelper.cs │ │ │ └── BitmapHelper.cs │ │ ├── Lib │ │ │ └── UEditor │ │ │ │ ├── Handlers │ │ │ │ ├── NotSupportedHandler.cs │ │ │ │ ├── ConfigHandler.cs │ │ │ │ ├── Handler.cs │ │ │ │ ├── FileHandler.cs │ │ │ │ └── ListFileHandler.cs │ │ │ │ ├── UEditorServiceExtension.cs │ │ │ │ ├── UEditorService.cs │ │ │ │ ├── Config.cs │ │ │ │ └── PathFormatter.cs │ │ ├── Framework │ │ │ ├── HttpContext.cs │ │ │ └── LogHelper.cs │ │ ├── AI │ │ │ └── FaceCompareHelper.cs │ │ ├── Video │ │ │ └── VideoHelper.cs │ │ └── Weixin │ │ │ ├── WeixinMPHelper.cs │ │ │ └── WeixinWorkHelper.cs │ ├── App_Data │ │ └── ef-cmd.txt │ ├── Properties │ │ └── launchSettings.json │ ├── Program.cs │ ├── Controllers │ │ ├── Framework │ │ │ ├── UEditorController.cs │ │ │ └── Auth │ │ │ │ ├── SMSController.cs │ │ │ │ ├── WeixinController.cs │ │ │ │ ├── WebController.cs │ │ │ │ └── AppController.cs │ │ └── Services │ │ │ ├── QRCodeController.cs │ │ │ └── BitServiceController.cs │ ├── appsettings.json │ ├── {{cookiecutter.project_name}}.csproj │ ├── libman.json │ └── BLL │ │ └── FaceCompareBLL.cs ├── BitAdminService │ ├── favicon.ico │ ├── packages.config │ ├── App.config │ ├── install.txt │ ├── Program.cs │ ├── Jobs │ │ └── HelloJob.cs │ ├── Services │ │ ├── BitAdminService.Designer.cs │ │ └── BitAdminService.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── Helpers │ │ └── LogHelper.cs ├── BitAdminFileService │ ├── BitAdminFileService.csproj │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Startup.cs │ └── LogHelper.cs └── {{cookiecutter.project_name}}.sln ├── README.md └── .gitignore /cookiecutter.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_name": "BitAdminCore", 3 | "author": "chenyinxin@163.com" 4 | } 5 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=netcore 2 | *.css linguist-language=netcore 3 | *.html linguist-language=netcore 4 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/README.md: -------------------------------------------------------------------------------- 1 | # 框架使用说明 2 | 详见:https://github.com/chenyinxin/cookiecutter-bitadmin-core 3 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/BitAdminService/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyinxin/cookiecutter-bitadmin-core/HEAD/{{cookiecutter.project_name}}/BitAdminService/favicon.ico -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyinxin/cookiecutter-bitadmin-core/HEAD/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/favicon.ico -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/lib/ueditor.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyinxin/cookiecutter-bitadmin-core/HEAD/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/lib/ueditor.zip -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/images/account/qq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyinxin/cookiecutter-bitadmin-core/HEAD/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/images/account/qq.png -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/images/home/user.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyinxin/cookiecutter-bitadmin-core/HEAD/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/images/home/user.jpg -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/images/account/weibo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyinxin/cookiecutter-bitadmin-core/HEAD/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/images/account/weibo.png -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/images/account/weixin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyinxin/cookiecutter-bitadmin-core/HEAD/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/images/account/weixin.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 框架使用说明 2 | `BitAdminCore`是基于`net core`的`管理应用``快速开发框架`,为管理应用开发提供必要的`基础功能`。
3 | 示例地址:https://www.bitadmincore.com
4 | 功能介绍:详见示例
5 | QQ交流群:202426919 6 | 7 | ## 创建项目 8 | 参照教程:http://www.cnblogs.com/chenyinxin/p/9023862.html 9 | 10 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/images/lib/singleupload/upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyinxin/cookiecutter-bitadmin-core/HEAD/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/images/lib/singleupload/upload.png -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/BitAdminService/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/images/workflow/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyinxin/cookiecutter-bitadmin-core/HEAD/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/images/workflow/glyphicons-halflings.png -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/images/workflow/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyinxin/cookiecutter-bitadmin-core/HEAD/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/images/workflow/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/BitAdminService/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/BitAdminService/install.txt: -------------------------------------------------------------------------------- 1 | 服务开发说明 2 | 3 | 1、增加定时服务,在Jobs中添加一个类继承IJob,声明Invoke属性即可。 4 | 2、用以下脚本创建后台服务,注意加-svc参数。 5 | 3、双击exe打开管理界面。 6 | 7 | --创建自启服务 8 | sc create BitAdminService binPath= "E:\Git\BitAdminCore\BitAdminService\bin\Debug\BitAdminService.exe -svc" displayname= "BitAdminCore服务框架" start= auto 9 | 10 | --创建服务 11 | sc delete BitAdminService -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/SysRoleUser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class SysRoleUser 7 | { 8 | public Guid Id { get; set; } 9 | public Guid? RoleId { get; set; } 10 | public Guid? UserId { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/SysPageOperation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class SysPageOperation 7 | { 8 | public Guid Id { get; set; } 9 | public Guid? PageId { get; set; } 10 | public string OperationSign { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/SysServer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class SysServer 7 | { 8 | public string ServerIp { get; set; } 9 | public DateTime? CreateTime { get; set; } 10 | public DateTime? UpdateTime { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。 3 | ################################################################################ 4 | 5 | /.vs 6 | /{{cookiecutter.project_name}}/BitAdminFileService/obj 7 | /{{cookiecutter.project_name}}/BitAdminService/obj 8 | /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/obj 9 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/SysUserClientId.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class SysUserClientId 7 | { 8 | public string ClientId { get; set; } 9 | public Guid? UserId { get; set; } 10 | public DateTime? UpdateTime { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/FlowMain.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class FlowMain 7 | { 8 | public Guid Id { get; set; } 9 | public string Code { get; set; } 10 | public string Name { get; set; } 11 | public string Description { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/SysUserOpenId.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class SysUserOpenId 7 | { 8 | public string OpenId { get; set; } 9 | public Guid? UserId { get; set; } 10 | public DateTime? CreateTime { get; set; } 11 | public DateTime? BindTime { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/FlowOrderCodes.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class FlowOrderCodes 7 | { 8 | public int Id { get; set; } 9 | public string Pinyin { get; set; } 10 | public string Day { get; set; } 11 | public int Index { get; set; } 12 | public string Code { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Helpers/Message/SMSService.cs: -------------------------------------------------------------------------------- 1 | /*********************** 2 | * BitAdmin2.0框架文件 3 | ***********************/ 4 | 5 | namespace {{cookiecutter.project_name}}.Helpers 6 | { 7 | public class SMSService 8 | { 9 | public static bool Send(string mobile,string msg) 10 | { 11 | LogHelper.SaveLog("sms", string.Format("发送信息:{0}:{1}", mobile, msg)); 12 | return true; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/SysLeader.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class SysLeader 7 | { 8 | public Guid LeaderId { get; set; } 9 | public string DepartmentCode { get; set; } 10 | public string UserCode { get; set; } 11 | public string Pos { get; set; } 12 | public string Sequence { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/pages/error/403.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 403 11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/pages/error/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 404 11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/pages/error/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 错误 11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/pages/error/false.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 没有权限 11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/SysRoleOperatePower.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class SysRoleOperatePower 7 | { 8 | public Guid Id { get; set; } 9 | public Guid? RoleId { get; set; } 10 | public Guid? ModulePageId { get; set; } 11 | public Guid? ModuleParentId { get; set; } 12 | public string OperationSign { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/App_Data/ef-cmd.txt: -------------------------------------------------------------------------------- 1 | 2 | --步骤一:从数据库生成实体(生成的实体不能手动删除,否则无法重新生成) 3 | Scaffold-DbContext “data source=.;initial catalog=BitAdminCore;user id=sa;password=123456;” Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -Context DataContext -Force 4 | 5 | --步骤二:修改DataContext.cs中OnConfiguring的数据库链接引用(改为从配置文件读取) 6 | optionsBuilder.UseSqlServer(SqlHelper.ConnectionString); 7 | --步骤二:旧版本数据库使用以下代码,否则分页会报错。 8 | optionsBuilder.UseSqlServer(SqlHelper.ConnectionString, b => b.UseRowNumberForPaging()); 9 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Helpers/System/DateTimeHelper.cs: -------------------------------------------------------------------------------- 1 | /*********************** 2 | * BitAdmin2.0框架文件 3 | ***********************/ 4 | using System; 5 | 6 | namespace {{cookiecutter.project_name}} 7 | { 8 | public static class DateTimeHelper 9 | { 10 | public static string WeekName(this DateTime datetime) 11 | { 12 | string[] Day = new string[] { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" }; 13 | return Day[(int)datetime.DayOfWeek]; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/SysRole.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class SysRole 7 | { 8 | public Guid Id { get; set; } 9 | public string RoleName { get; set; } 10 | public int? OrderNo { get; set; } 11 | public Guid? CreateBy { get; set; } 12 | public DateTime? CreateTime { get; set; } 13 | public Guid? UpdateBy { get; set; } 14 | public DateTime? UpdateTime { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Helpers/Lib/UEditor/Handlers/NotSupportedHandler.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Http; 2 | 3 | namespace {{cookiecutter.project_name}}.UEditor.Handlers 4 | { 5 | public class NotSupportedHandler : Handler 6 | { 7 | public NotSupportedHandler(HttpContext context) 8 | : base(context) 9 | { 10 | } 11 | 12 | public override void Process() 13 | { 14 | WriteJson(new 15 | { 16 | state = "action is empty or action not supperted." 17 | }); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:12345/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "launchUrl": "pages/account/login.html", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | }, 18 | "use64Bit": true 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Program.cs: -------------------------------------------------------------------------------- 1 | /*********************** 2 | * BitAdmin2.0框架文件 3 | ***********************/ 4 | using Microsoft.AspNetCore; 5 | using Microsoft.AspNetCore.Hosting; 6 | 7 | namespace {{cookiecutter.project_name}} 8 | { 9 | public class Program 10 | { 11 | public static void Main(string[] args) 12 | { 13 | BuildWebHost(args).Run(); 14 | } 15 | 16 | public static IWebHost BuildWebHost(string[] args) => 17 | WebHost.CreateDefaultBuilder(args) 18 | .UseStartup() 19 | .Build(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/BitAdminFileService/BitAdminFileService.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/FlowStepPath.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class FlowStepPath 7 | { 8 | public Guid Id { get; set; } 9 | public Guid? MainId { get; set; } 10 | public Guid? StartStepId { get; set; } 11 | public Guid? StopStepId { get; set; } 12 | public string Nikename { get; set; } 13 | public int Condition { get; set; } 14 | public string Expression { get; set; } 15 | public string Description { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/SysSmsCode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class SysSmsCode 7 | { 8 | public Guid Id { get; set; } 9 | public string Mobile { get; set; } 10 | public string SmsSign { get; set; } 11 | public string SmsCode { get; set; } 12 | public int? IsVerify { get; set; } 13 | public DateTime? CreateTime { get; set; } 14 | public DateTime? OverTime { get; set; } 15 | public DateTime? VerifyTime { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/SysOperation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class SysOperation 7 | { 8 | public Guid Id { get; set; } 9 | public string OperationSign { get; set; } 10 | public string OperationName { get; set; } 11 | public int? OrderNo { get; set; } 12 | public Guid? CreateBy { get; set; } 13 | public DateTime? CreateTime { get; set; } 14 | public Guid? UpdateBy { get; set; } 15 | public DateTime? UpdateTime { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Controllers/Framework/UEditorController.cs: -------------------------------------------------------------------------------- 1 | /*********************** 2 | * BitAdmin2.0框架文件 3 | ***********************/ 4 | using {{cookiecutter.project_name}}.UEditor; 5 | using Microsoft.AspNetCore.Mvc; 6 | 7 | namespace {{cookiecutter.project_name}}.Controllers 8 | { 9 | [Route("[controller]")] 10 | public class UEditorController : Controller 11 | { 12 | private UEditorService ue; 13 | public UEditorController(UEditorService ue) 14 | { 15 | this.ue = ue; 16 | } 17 | 18 | public void Do() 19 | { 20 | ue.DoAction(HttpContext); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/SysDictionary.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class SysDictionary 7 | { 8 | public string Type { get; set; } 9 | public string Member { get; set; } 10 | public string MemberName { get; set; } 11 | public string Description { get; set; } 12 | public int? OrderNo { get; set; } 13 | public Guid? CreateBy { get; set; } 14 | public DateTime? CreateTime { get; set; } 15 | public Guid? UpdateBy { get; set; } 16 | public DateTime? UpdateTime { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/weixin/error/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 错误提示 10 | 11 | 12 |
13 | 微信错误 14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/SysUserFaceFeature.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class SysUserFaceFeature 7 | { 8 | public Guid UserId { get; set; } 9 | public string UserName { get; set; } 10 | public string UserType { get; set; } 11 | public string FaceImage { get; set; } 12 | public string FaceFeature { get; set; } 13 | public string FaceFeatureType { get; set; } 14 | public DateTime? FaceTimeOut { get; set; } 15 | public DateTime? CreateTime { get; set; } 16 | public DateTime? UpdateTime { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/SysModule.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class SysModule 7 | { 8 | public Guid ModuleId { get; set; } 9 | public Guid? ParentId { get; set; } 10 | public string ModuleName { get; set; } 11 | public string ModuleIcon { get; set; } 12 | public string Description { get; set; } 13 | public int? OrderNo { get; set; } 14 | public Guid? CreateBy { get; set; } 15 | public DateTime? CreateTime { get; set; } 16 | public Guid? UpdateBy { get; set; } 17 | public DateTime? UpdateTime { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/BitAdminFileService/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace BitAdminFileService 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/SysLog.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class SysLog 7 | { 8 | public int Id { get; set; } 9 | public Guid? UserId { get; set; } 10 | public string UserCode { get; set; } 11 | public string UserName { get; set; } 12 | public string DepartmentName { get; set; } 13 | public string IpAddress { get; set; } 14 | public string UserAgent { get; set; } 15 | public string Title { get; set; } 16 | public string Type { get; set; } 17 | public DateTime? CreateTime { get; set; } 18 | public string Description { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/BitAdminFileService/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:54117/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "BitAdminFileService": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development" 23 | }, 24 | "applicationUrl": "http://localhost:54118/" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/SysQueue.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class SysQueue 7 | { 8 | public Guid Id { get; set; } 9 | public string ClientId { get; set; } 10 | public DateTime? CreateTime { get; set; } 11 | public string ActionName { get; set; } 12 | public string ActionObjectId { get; set; } 13 | public string ActionObjectType { get; set; } 14 | public string ActionData { get; set; } 15 | public string ResultState { get; set; } 16 | public int? ResultNumber { get; set; } 17 | public DateTime? ResultTime { get; set; } 18 | public string ResultRemark { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Helpers/Lib/UEditor/UEditorServiceExtension.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.DependencyInjection; 2 | 3 | namespace {{cookiecutter.project_name}}.UEditor 4 | { 5 | public static class UEditorServiceExtension 6 | { 7 | public static UEditorActionCollection AddUEditorService( 8 | this IServiceCollection services, 9 | string configFile="config.json", 10 | bool isCache = false) 11 | { 12 | Config.ConfigFile = configFile; 13 | Config.noCache = !isCache; 14 | 15 | var actions = new UEditorActionCollection(); 16 | services.AddSingleton(actions); 17 | services.AddSingleton(); 18 | 19 | return actions; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/SysQueueHistory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class SysQueueHistory 7 | { 8 | public Guid Id { get; set; } 9 | public string ClientId { get; set; } 10 | public DateTime? CreateTime { get; set; } 11 | public string ActionName { get; set; } 12 | public string ActionObjectId { get; set; } 13 | public string ActionObjectType { get; set; } 14 | public string ActionData { get; set; } 15 | public string ResultState { get; set; } 16 | public int? ResultNumber { get; set; } 17 | public DateTime? ResultTime { get; set; } 18 | public string ResultRemark { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/SysModulePage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class SysModulePage 7 | { 8 | public Guid Id { get; set; } 9 | public Guid? ModuleId { get; set; } 10 | public string PageSign { get; set; } 11 | public string PageName { get; set; } 12 | public string PageIcon { get; set; } 13 | public string PageUrl { get; set; } 14 | public string Description { get; set; } 15 | public int? OrderNo { get; set; } 16 | public Guid? CreateBy { get; set; } 17 | public DateTime? CreateTime { get; set; } 18 | public Guid? UpdateBy { get; set; } 19 | public DateTime? UpdateTime { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/css/lib/fileupload.min.css: -------------------------------------------------------------------------------- 1 | .fileControl-queueID{background-color:#fff;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.25);max-height:200px;overflow:auto;padding:5px 10px;width:100%;display:none;margin:5px 0}.fileControl-table>thead>tr>th,.fileControl-table>tbody>tr>th,.fileControl-table>tfoot>tr>th,.fileControl-table>thead>tr>td,.fileControl-table>tbody>tr>td,.fileControl-table>tfoot>tr>td{vertical-align:middle;text-align:center;padding:5px}.fileControl-content a{margin-left:5px}.fileControl-content a:first-child{margin-left:0}.fileControl-btn{margin-top:10px;margin-bottom:0}.fileControl-size{font-size:13px}.fileControl-color{color:#777}.fileControl-paddingHorizontal0{padding-left:0;padding-right:0}.fileControl-margin0{margin:0}.fileControl-padding0{padding:0}.fileControl-marBot10{margin-bottom:10px} -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/SysAttachment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class SysAttachment 7 | { 8 | public Guid Id { get; set; } 9 | public string RelationId { get; set; } 10 | public string Name { get; set; } 11 | public string Url { get; set; } 12 | public int? Type { get; set; } 13 | public string Suffix { get; set; } 14 | public string Path { get; set; } 15 | public string Names { get; set; } 16 | public int? Status { get; set; } 17 | public long? Size { get; set; } 18 | public string CreateBy { get; set; } 19 | public string CreateByName { get; set; } 20 | public DateTime? CreateTime { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/SysDepartment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class SysDepartment 7 | { 8 | public Guid DepartmentId { get; set; } 9 | public Guid? ParentId { get; set; } 10 | public string DepartmentCode { get; set; } 11 | public string DepartmentName { get; set; } 12 | public string DepartmentFullName { get; set; } 13 | public long? WeixinWorkId { get; set; } 14 | public string ExtendId { get; set; } 15 | public int? OrderNo { get; set; } 16 | public Guid? CreateBy { get; set; } 17 | public DateTime? CreateTime { get; set; } 18 | public Guid? UpdateBy { get; set; } 19 | public DateTime? UpdateTime { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Helpers/Lib/UEditor/Handlers/ConfigHandler.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Http; 2 | 3 | namespace {{cookiecutter.project_name}}.UEditor.Handlers 4 | { 5 | public class ConfigHandler : Handler 6 | { 7 | public ConfigHandler(HttpContext context) : base(context) { } 8 | 9 | public override void Process() 10 | { 11 | var config = Config.Items; 12 | var isLocal = Config.GetValue("isLocal"); 13 | if (!isLocal) 14 | { 15 | config["imageUrlPrefix"] = ""; 16 | config["scrawlUrlPrefix"] = ""; 17 | config["snapscreenUrlPrefix"] = ""; 18 | config["catcherUrlPrefix"] = ""; 19 | config["videoUrlPrefix"] = ""; 20 | config["fileUrlPrefix"] = ""; 21 | } 22 | WriteJson(config); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "Debug": { 5 | "LogLevel": { 6 | "Default": "Warning" 7 | } 8 | }, 9 | "Console": { 10 | "LogLevel": { 11 | "Default": "Warning" 12 | } 13 | } 14 | }, 15 | "ConnectionStrings": { 16 | "DataContext": "data source=.;initial catalog={{cookiecutter.project_name}};user id=sa;password=sa;" 17 | }, 18 | "SenparcSetting": { 19 | "IsDebug": false, 20 | "DefaultCacheNamespace": "WeixinCache", 21 | "Cache_Redis_Configuration": "", 22 | "Cache_Memcached_Configuration": "", 23 | "SenparcUnionAgentKey": "WeixinAgentKey" 24 | }, 25 | "SenparcWeixinSetting": { 26 | "IsDebug": false, 27 | //公众号 28 | "Token": "bitadmincore", 29 | "EncodingAESKey": "", 30 | "WeixinAppId": "wx806943202a75a124", 31 | "WeixinAppSecret": "d52257abea1018eec3a798005ba4f841" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Helpers/Lib/UEditor/UEditorService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Http; 2 | using Microsoft.AspNetCore.Hosting; 3 | using {{cookiecutter.project_name}}.UEditor.Handlers; 4 | using System; 5 | 6 | namespace {{cookiecutter.project_name}}.UEditor 7 | { 8 | public class UEditorService 9 | { 10 | private UEditorActionCollection actionList; 11 | 12 | public UEditorService(IHostingEnvironment env, UEditorActionCollection actions) 13 | { 14 | Config.WebRootPath = env.WebRootPath; 15 | actionList = actions; 16 | } 17 | 18 | public void DoAction(HttpContext context) 19 | { 20 | var action = context.Request.Query["action"]; 21 | if (actionList.ContainsKey(action)) 22 | actionList[action].Invoke(context); 23 | else 24 | new NotSupportedHandler(context).Process(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/BitAdminService/Program.cs: -------------------------------------------------------------------------------- 1 | /*********************** 2 | * BitAdmin2.0框架文件 3 | ***********************/ 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.ServiceProcess; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | using System.Windows.Forms; 11 | 12 | namespace BitAdminService 13 | { 14 | static class Program 15 | { 16 | /// 17 | /// 应用程序的主入口点。 18 | /// 19 | static void Main(string[] args) 20 | { 21 | if (args.Length > 0 && args.Contains("-svc")) 22 | { 23 | ServiceBase[] ServicesToRun; 24 | ServicesToRun = new ServiceBase[] 25 | { 26 | new BitAdminService() 27 | }; 28 | ServiceBase.Run(ServicesToRun); 29 | 30 | } 31 | else 32 | { 33 | Application.Run(new ServiceManagerForm()); 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/FlowBillsRecordUser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class FlowBillsRecordUser 7 | { 8 | public Guid Id { get; set; } 9 | public Guid? StepId { get; set; } 10 | public Guid BillsRecordId { get; set; } 11 | public Guid? BillsRecordOutId { get; set; } 12 | public Guid? UserId { get; set; } 13 | public DateTime? CreateTime { get; set; } 14 | public DateTime? StartTime { get; set; } 15 | public DateTime? EndTime { get; set; } 16 | public int Type { get; set; } 17 | public string State { get; set; } 18 | public string Condition { get; set; } 19 | public string Choice { get; set; } 20 | public string Opinion { get; set; } 21 | public string DisplayState { get; set; } 22 | public DateTime? RunTime { get; set; } 23 | 24 | public virtual FlowBillsRecord BillsRecord { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/BitAdminService/Jobs/HelloJob.cs: -------------------------------------------------------------------------------- 1 | /*********************** 2 | * BitAdmin2.0框架文件 3 | ***********************/ 4 | using {{cookiecutter.project_name}}.Helpers; 5 | using Quartz; 6 | using System.Threading; 7 | using System.Threading.Tasks; 8 | 9 | namespace BitAdminService.Jobs 10 | { 11 | /*Interval单位为秒*/ 12 | [Invoke(Name = "HelloJob", Remark = "HelloJob示例服务", StartTime = "2018-05-01 12:00:00", Interval = 11)] 13 | public class HelloJob : IJob 14 | { 15 | public Task Execute(IJobExecutionContext context) 16 | { 17 | LogHelper.SaveLog("HelloJob", "execute"); 18 | Thread.Sleep(5000); 19 | return null; 20 | } 21 | } 22 | 23 | [Invoke(Name = "BitAdminJob", Remark = "BitAdminJob示例服务", StartTime = "2018-05-01 12:00:00", Interval = 18)] 24 | public class BitAdminJob : IJob 25 | { 26 | public Task Execute(IJobExecutionContext context) 27 | { 28 | LogHelper.SaveLog("BitAdminJob", "execute"); 29 | Thread.Sleep(10000); 30 | return null; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/BitAdminService/Services/BitAdminService.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace BitAdminService 2 | { 3 | partial class BitAdminService 4 | { 5 | /// 6 | /// 必需的设计器变量。 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// 清理所有正在使用的资源。 12 | /// 13 | /// 如果应释放托管资源,为 true;否则为 false。 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region 组件设计器生成的代码 24 | 25 | /// 26 | /// 设计器支持所需的方法 - 不要修改 27 | /// 使用代码编辑器修改此方法的内容。 28 | /// 29 | private void InitializeComponent() 30 | { 31 | components = new System.ComponentModel.Container(); 32 | this.ServiceName = "Service1"; 33 | } 34 | 35 | #endregion 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/FlowStep.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class FlowStep 7 | { 8 | public Guid StepId { get; set; } 9 | public Guid? MainId { get; set; } 10 | public string StepName { get; set; } 11 | public int StepStatus { get; set; } 12 | public string Agency { get; set; } 13 | public string Circularize { get; set; } 14 | public string RunMode { get; set; } 15 | public string LinkCode { get; set; } 16 | public string ShowTabIndex { get; set; } 17 | public long? ReminderTimeout { get; set; } 18 | public string AuditNorm { get; set; } 19 | public string AuditId { get; set; } 20 | public string AuditNormRead { get; set; } 21 | public string AuditIdRead { get; set; } 22 | public string SmsTemplateToDo { get; set; } 23 | public string SmsTemplateRead { get; set; } 24 | public string Description { get; set; } 25 | public string Style { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/BitAdminService/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("BitAdminService")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("BitAdminService")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("7d107a6c-3d12-4640-b33b-9d0a3c5190fb")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 33 | // 方法是按如下所示使用“*”: : 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/SysUser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class SysUser 7 | { 8 | public Guid UserId { get; set; } 9 | public Guid? DepartmentId { get; set; } 10 | public string UserCode { get; set; } 11 | public string UserName { get; set; } 12 | public string UserPassword { get; set; } 13 | public string IdCard { get; set; } 14 | public string Mobile { get; set; } 15 | public string Email { get; set; } 16 | public string Post { get; set; } 17 | public string Gender { get; set; } 18 | public DateTime? Birthday { get; set; } 19 | public string ExtendId { get; set; } 20 | public string UserImage { get; set; } 21 | public string UserStatus { get; set; } 22 | public int? OrderNo { get; set; } 23 | public Guid? CreateBy { get; set; } 24 | public DateTime? CreateTime { get; set; } 25 | public Guid? UpdateBy { get; set; } 26 | public DateTime? UpdateTime { get; set; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/FlowBills.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class FlowBills 7 | { 8 | public FlowBills() 9 | { 10 | FlowBillsRecord = new HashSet(); 11 | } 12 | 13 | public Guid Id { get; set; } 14 | public Guid? ParentId { get; set; } 15 | public Guid? MainId { get; set; } 16 | public Guid? StepId { get; set; } 17 | public string BillsType { get; set; } 18 | public string WorkOrderCode { get; set; } 19 | public string WorkOrderName { get; set; } 20 | public string BillsCode { get; set; } 21 | public int Sort { get; set; } 22 | public string State { get; set; } 23 | public Guid SubmitUser { get; set; } 24 | public DateTime CreateTime { get; set; } 25 | public DateTime? UpdateTime { get; set; } 26 | public string Description { get; set; } 27 | public int? Version { get; set; } 28 | 29 | public virtual ICollection FlowBillsRecord { get; set; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/FlowBillsRecord.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class FlowBillsRecord 7 | { 8 | public FlowBillsRecord() 9 | { 10 | FlowBillsRecordUser = new HashSet(); 11 | } 12 | 13 | public Guid Id { get; set; } 14 | public Guid BillsId { get; set; } 15 | public Guid? PrevStepId { get; set; } 16 | public Guid? NextStepId { get; set; } 17 | public Guid? UserId { get; set; } 18 | public Guid? PrevBillsRecordId { get; set; } 19 | public DateTime? AuditDate { get; set; } 20 | public int Sort { get; set; } 21 | public int Condition { get; set; } 22 | public string State { get; set; } 23 | public DateTime? StartTime { get; set; } 24 | public DateTime? EndTime { get; set; } 25 | public string Choice { get; set; } 26 | public int Type { get; set; } 27 | public string Description { get; set; } 28 | public int? Batch { get; set; } 29 | 30 | public virtual FlowBills Bills { get; set; } 31 | public virtual ICollection FlowBillsRecordUser { get; set; } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Helpers/Framework/HttpContext.cs: -------------------------------------------------------------------------------- 1 | /*********************** 2 | * BitAdmin2.0框架文件 3 | ***********************/ 4 | using Microsoft.AspNetCore.Hosting; 5 | using Microsoft.AspNetCore.Http; 6 | using Microsoft.Extensions.Configuration; 7 | using Newtonsoft.Json; 8 | using System; 9 | 10 | namespace {{cookiecutter.project_name}} 11 | { 12 | public static class HttpContextCore 13 | { 14 | public static IServiceProvider ServiceProvider { get; set; } 15 | public static IConfiguration Configuration { get; set; } 16 | public static HttpContext Current => ((IHttpContextAccessor)ServiceProvider.GetService(typeof(IHttpContextAccessor))).HttpContext; 17 | 18 | public static void Set(this ISession session, string key, T value) 19 | { 20 | session.SetString(key, JsonConvert.SerializeObject(value)); 21 | } 22 | 23 | public static T Get(this ISession session, string key) 24 | { 25 | var value = session.GetString(key); 26 | return value == null ? default(T) : JsonConvert.DeserializeObject(value); 27 | } 28 | public static string MapPath(string url) 29 | { 30 | return AppDomain.CurrentDomain.BaseDirectory + url.Replace("/", "\\"); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.2 5 | 0c3c8ad1-393d-40bc-ba9e-0ae40aeeac80 6 | 3.0 7 | 8 | 9 | 10 | 11 | 1701;1702;1705;1591;1573;1572;1570 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | Never 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/weixin/home/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 微信首页 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 | 微信首页
19 | 姓名:
20 | 手机: 21 |
22 |
23 | 35 | 36 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/css/lib/fileupload.css: -------------------------------------------------------------------------------- 1 | .fileControl-queueID { 2 | background-color: #FFF; 3 | border-radius: 3px; 4 | box-shadow: 0 1px 3px rgba(0,0,0,0.25); 5 | max-height: 200px; 6 | overflow: auto; 7 | padding: 5px 10px; 8 | width: 100%; 9 | display: none; 10 | margin: 5px 0px; 11 | } 12 | 13 | .fileControl-table > thead > tr > th, 14 | .fileControl-table > tbody > tr > th, 15 | .fileControl-table > tfoot > tr > th, 16 | .fileControl-table > thead > tr > td, 17 | .fileControl-table > tbody > tr > td, 18 | .fileControl-table > tfoot > tr > td { 19 | vertical-align: middle; 20 | text-align: center; 21 | padding: 5px; 22 | } 23 | 24 | .fileControl-content a { 25 | margin-left: 5px; 26 | } 27 | 28 | .fileControl-content a:first-child { 29 | margin-left: 0px; 30 | } 31 | 32 | .fileControl-btn { 33 | margin-top: 10px; 34 | margin-bottom: 0px; 35 | } 36 | 37 | .fileControl-size { 38 | font-size: 13px; 39 | } 40 | 41 | .fileControl-color { 42 | color: #777; 43 | } 44 | 45 | .fileControl-paddingHorizontal0 { 46 | padding-left: 0px; 47 | padding-right: 0px; 48 | } 49 | 50 | .fileControl-margin0 { 51 | margin: 0px; 52 | } 53 | 54 | .fileControl-padding0 { 55 | padding: 0px; 56 | } 57 | 58 | .fileControl-marBot10 { 59 | margin-bottom: 10px; 60 | } 61 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/weixin/templates/exampleone.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 微信公众号示例页面 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 | 微信公众号示例页面(一)
19 | 姓名:
20 | 手机: 21 |
22 |
23 | 35 | 36 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/weixin/templates/exampletow.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 微信公众号示例页面 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 | 微信公众号示例页面(二)
19 | 姓名:
20 | 手机: 21 |
22 |
23 | 35 | 36 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/work/templates/exampleone.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 微信企业号示例页面 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 | 微信企业号示例页面(一)
19 | 姓名:
20 | 手机: 21 |
22 |
23 | 35 | 36 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/work/templates/exampletow.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 微信企业号示例页面 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 | 微信企业号示例页面(二)
19 | 姓名:
20 | 手机: 21 |
22 |
23 | 35 | 36 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/weixin/account/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 微信公众号登录 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 21 |
22 |
23 |

公众号授权模式:

24 | snsapi_base 静默授权只能获取用户openid;
25 | snsapi_userinfo 手动授权可通过openid获取基本信息。
26 | 备注:配置微信菜单可直接指向以下地址即可。 27 |
28 | 31 | 34 |
35 | 36 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Controllers/Services/QRCodeController.cs: -------------------------------------------------------------------------------- 1 | /*********************** 2 | * BitAdmin2.0框架文件 3 | ***********************/ 4 | using {{cookiecutter.project_name}}.Helpers; 5 | using Microsoft.AspNetCore.Mvc; 6 | using QRCoder; 7 | using System; 8 | using System.Drawing; 9 | using System.Drawing.Imaging; 10 | using System.IO; 11 | 12 | namespace {{cookiecutter.project_name}}.Controllers 13 | { 14 | public class QRCodeController : Controller 15 | { 16 | public ActionResult Encode(string msg = "https://www.bitadmincore.com/") 17 | { 18 | try 19 | { 20 | QRCodeGenerator qrGenerator = new QRCodeGenerator(); 21 | QRCodeData qrCodeData = qrGenerator.CreateQrCode(msg, QRCodeGenerator.ECCLevel.L); 22 | QRCode qrCode = new QRCode(qrCodeData); 23 | Bitmap qrCodeImage = qrCode.GetGraphic(20); 24 | 25 | MemoryStream ms = new MemoryStream(); 26 | qrCodeImage.Save(ms, ImageFormat.Png); 27 | byte[] bytes = ms.GetBuffer(); 28 | ms.Close(); 29 | return File(bytes, "image/jpeg"); 30 | } 31 | catch (Exception ex) 32 | { 33 | LogHelper.SaveLog(ex); 34 | return Json(new { Code = 1, Msg = "服务器异常,请联系管理员!" }); 35 | } 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Helpers/Lib/UEditor/Handlers/Handler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.AspNetCore.Http; 3 | using Newtonsoft.Json; 4 | 5 | namespace {{cookiecutter.project_name}}.UEditor.Handlers 6 | { 7 | public abstract class Handler 8 | { 9 | public HttpRequest Request { get; private set; } 10 | public HttpResponse Response { get; private set; } 11 | public HttpContext Context { get; private set; } 12 | 13 | public Handler(HttpContext context) 14 | { 15 | this.Request = context.Request; 16 | this.Response = context.Response; 17 | this.Context = context; 18 | //this.Server = context.Server; 19 | } 20 | 21 | public abstract void Process(); 22 | 23 | protected void WriteJson(object response) 24 | { 25 | string jsonpCallback = Context.Request.Query["callback"], 26 | json = JsonConvert.SerializeObject(response); 27 | if (String.IsNullOrWhiteSpace(jsonpCallback)) 28 | { 29 | Response.Headers.Add("Content-Type", "text/plain"); 30 | Response.WriteAsync(json); 31 | } 32 | else 33 | { 34 | Response.Headers.Add("Content-Type", "application/javascript"); 35 | Response.WriteAsync(String.Format("{0}({1});", jsonpCallback, json)); 36 | } 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/work/account/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 微信企业号登录 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 21 |
22 |
23 |

企业号授权模式:

24 | snsapi_base 静默授权只能获取用户openid;
25 | snsapi_userinfo 静默授权可通过openid获取基本信息。
26 | snsapi_privateinfo:手动授权,可获取成员的详细信息,包含手机、邮箱。
27 | 备注:配置微信菜单可直接指向以下地址即可。
28 | 企业微信页面在微信中打开只能取到OpenId,在企业微信中打开只能取到UserId。 29 |
30 | 33 | 36 |
37 | 38 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Helpers/Lib/UEditor/Config.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Linq; 4 | using Newtonsoft.Json.Linq; 5 | 6 | namespace {{cookiecutter.project_name}}.UEditor 7 | { 8 | public static class Config 9 | { 10 | public static string WebRootPath { get; set; } 11 | public static string ConfigFile { set; get; } = "config.json"; 12 | public static bool noCache { set; get; } = true; 13 | private static JObject BuildItems() 14 | { 15 | var json = File.ReadAllText(ConfigFile); 16 | return JObject.Parse(json); 17 | } 18 | 19 | public static JObject Items 20 | { 21 | get 22 | { 23 | if (noCache || _Items == null) 24 | { 25 | _Items = BuildItems(); 26 | } 27 | return _Items; 28 | } 29 | } 30 | private static JObject _Items; 31 | 32 | 33 | public static T GetValue(string key) 34 | { 35 | return Items[key].Value(); 36 | } 37 | 38 | public static String[] GetStringList(string key) 39 | { 40 | return Items[key].Select(x => x.Value()).ToArray(); 41 | } 42 | 43 | public static String GetString(string key) 44 | { 45 | return GetValue(key); 46 | } 47 | 48 | public static int GetInt(string key) 49 | { 50 | return GetValue(key); 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/pages/picker/modulepicker.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/BitAdminFileService/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Builder; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.AspNetCore.Http; 9 | using Microsoft.Extensions.DependencyInjection; 10 | using Microsoft.Extensions.FileProviders; 11 | 12 | namespace BitAdminFileService 13 | { 14 | public class Startup 15 | { 16 | // This method gets called by the runtime. Use this method to add services to the container. 17 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 18 | public void ConfigureServices(IServiceCollection services) 19 | { 20 | services.AddMvc(); 21 | } 22 | 23 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 24 | public void Configure(IApplicationBuilder app, IHostingEnvironment env) 25 | { 26 | if (env.IsDevelopment()) 27 | { 28 | app.UseDeveloperExceptionPage(); 29 | } 30 | string fileupload = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "uploadfiles"); 31 | if (!Directory.Exists(fileupload)) Directory.CreateDirectory(fileupload); 32 | app.UseStaticFiles(new StaticFileOptions 33 | { 34 | FileProvider = new PhysicalFileProvider(fileupload), 35 | RequestPath = "/uploadfiles" 36 | }); 37 | 38 | app.UseMvc(routes => routes.MapRoute(name: "default", template: "{controller=FileService}/{action=Index}/{id?}")); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/libman.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "defaultProvider": "cdnjs", 4 | "libraries": [ 5 | { 6 | "library": "jquery@3.4.1", 7 | "destination": "wwwroot/lib/jquery/" 8 | }, 9 | { 10 | "library": "twitter-bootstrap@4.3.1", 11 | "destination": "wwwroot/lib/twitter-bootstrap/" 12 | }, 13 | { 14 | "library": "admin-lte@2.4.18", 15 | "destination": "wwwroot/lib/admin-lte/" 16 | }, 17 | { 18 | "library": "jqueryui@1.12.1", 19 | "destination": "wwwroot/lib/jqueryui/" 20 | }, 21 | { 22 | "library": "jquery-validation-unobtrusive@3.2.11", 23 | "destination": "wwwroot/lib/jquery-validation-unobtrusive/" 24 | }, 25 | { 26 | "library": "jquery-treegrid@0.2.0", 27 | "destination": "wwwroot/lib/jquery-treegrid/" 28 | }, 29 | { 30 | "library": "bootstrap-treeview@1.2.0", 31 | "destination": "wwwroot/lib/bootstrap-treeview/" 32 | }, 33 | { 34 | "library": "font-awesome@5.10.2", 35 | "destination": "wwwroot/lib/font-awesome/" 36 | }, 37 | { 38 | "library": "jquery.form@4.2.2", 39 | "destination": "wwwroot/lib/jquery.form/" 40 | }, 41 | { 42 | "library": "jquery-cookie@1.4.1", 43 | "destination": "wwwroot/lib/jquery-cookie/" 44 | }, 45 | { 46 | "library": "jquery-validate@1.19.1", 47 | "destination": "wwwroot/lib/jquery-validate/" 48 | }, 49 | { 50 | "library": "popper.js@1.15.0", 51 | "destination": "wwwroot/lib/popper.js/" 52 | }, 53 | { 54 | "library": "multiselect@2.2.9", 55 | "destination": "wwwroot/lib/multiselect/" 56 | }, 57 | { 58 | "library": "jquery-contextmenu@2.8.0", 59 | "destination": "wwwroot/lib/jquery-contextmenu/" 60 | } 61 | ] 62 | } -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/BitAdminFileService/LogHelper.cs: -------------------------------------------------------------------------------- 1 | /*********************** 2 | * BitAdmin2.0框架文件 3 | ***********************/ 4 | using System; 5 | using System.IO; 6 | using System.Text; 7 | 8 | namespace {{cookiecutter.project_name}}.Helpers 9 | { 10 | public class LogHelper 11 | { 12 | private static string lockKey = "lock"; 13 | public static void SaveLog(Exception ex) 14 | { 15 | StringBuilder sb = new StringBuilder(); 16 | sb.AppendLine(ex.Message); 17 | sb.AppendLine(ex.StackTrace); 18 | sb.AppendLine(ex.Source); 19 | 20 | SaveLog("错误日志",sb.ToString()); 21 | } 22 | public static void SaveLog(String logName, String msg) 23 | { 24 | try 25 | { 26 | if (!Directory.Exists(AppDomain.CurrentDomain.BaseDirectory + "\\logs\\")) 27 | { 28 | Directory.CreateDirectory(AppDomain.CurrentDomain.BaseDirectory + "\\logs\\"); 29 | 30 | } 31 | 32 | DateTime now = DateTime.Now; 33 | String LogFile = AppDomain.CurrentDomain.BaseDirectory + "\\logs\\" + logName + "_" + now.ToString("yyyy-MM-dd") + ".log"; 34 | lock (lockKey) 35 | { 36 | using (FileStream fs = new FileStream(LogFile, FileMode.Append, FileAccess.Write)) 37 | { 38 | byte[] datetimefile = Encoding.Default.GetBytes(logName + "_" + now.ToString("yyyy-MM-dd HH:mm:ss.fff") + ":\r\n"); 39 | fs.Write(datetimefile, 0, datetimefile.Length); 40 | if (!String.IsNullOrEmpty(msg)) 41 | { 42 | byte[] data = Encoding.Default.GetBytes(msg + "\r\n==========================================\r\n"); 43 | fs.Write(data, 0, data.Length); 44 | } 45 | fs.Flush(); 46 | } 47 | } 48 | } 49 | catch 50 | { } 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Helpers/Lib/UEditor/PathFormatter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Text.RegularExpressions; 4 | 5 | namespace {{cookiecutter.project_name}}.UEditor 6 | { 7 | public static class PathFormatter 8 | { 9 | public static string Format(string originFileName, string pathFormat) 10 | { 11 | if (String.IsNullOrWhiteSpace(pathFormat)) 12 | { 13 | pathFormat = "{filename}{rand:6}"; 14 | } 15 | 16 | var invalidPattern = new Regex(@"[\\\/\:\*\?\042\<\>\|]"); 17 | originFileName = invalidPattern.Replace(originFileName, ""); 18 | 19 | string extension = Path.GetExtension(originFileName); 20 | string filename = Path.GetFileNameWithoutExtension(originFileName); 21 | 22 | pathFormat = pathFormat.Replace("{filename}", filename); 23 | pathFormat = new Regex(@"\{rand(\:?)(\d+)\}", RegexOptions.Compiled).Replace(pathFormat, new MatchEvaluator(delegate(Match match) 24 | { 25 | var digit = 6; 26 | if (match.Groups.Count > 2) 27 | { 28 | digit = Convert.ToInt32(match.Groups[2].Value); 29 | } 30 | var rand = new Random(); 31 | return rand.Next((int)Math.Pow(10, digit), (int)Math.Pow(10, digit + 1)).ToString(); 32 | })); 33 | 34 | pathFormat = pathFormat.Replace("{time}", DateTime.Now.Ticks.ToString()); 35 | pathFormat = pathFormat.Replace("{yyyy}", DateTime.Now.Year.ToString()); 36 | pathFormat = pathFormat.Replace("{yy}", (DateTime.Now.Year % 100).ToString("D2")); 37 | pathFormat = pathFormat.Replace("{mm}", DateTime.Now.Month.ToString("D2")); 38 | pathFormat = pathFormat.Replace("{dd}", DateTime.Now.Day.ToString("D2")); 39 | pathFormat = pathFormat.Replace("{hh}", DateTime.Now.Hour.ToString("D2")); 40 | pathFormat = pathFormat.Replace("{ii}", DateTime.Now.Minute.ToString("D2")); 41 | pathFormat = pathFormat.Replace("{ss}", DateTime.Now.Second.ToString("D2")); 42 | 43 | return pathFormat + extension; 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/BitAdminService/Helpers/LogHelper.cs: -------------------------------------------------------------------------------- 1 | /*********************** 2 | * BitAdmin2.0框架文件 3 | ***********************/ 4 | using System; 5 | using System.IO; 6 | using System.Text; 7 | 8 | namespace {{cookiecutter.project_name}}.Helpers 9 | { 10 | public class LogHelper 11 | { 12 | private static string lockKey = "lock"; 13 | public static void SaveLog(Exception ex) 14 | { 15 | StringBuilder sb = new StringBuilder(); 16 | sb.AppendLine(ex.Message); 17 | sb.AppendLine(ex.StackTrace); 18 | sb.AppendLine(ex.Source); 19 | 20 | SaveLog("错误日志",sb.ToString()); 21 | } 22 | public static void SaveLog(String logName, string msg, params string[] para) 23 | { 24 | try 25 | { 26 | if (!Directory.Exists(AppDomain.CurrentDomain.BaseDirectory + "\\logs\\")) 27 | { 28 | Directory.CreateDirectory(AppDomain.CurrentDomain.BaseDirectory + "\\logs\\"); 29 | 30 | } 31 | 32 | DateTime now = DateTime.Now; 33 | String LogFile = AppDomain.CurrentDomain.BaseDirectory + "\\logs\\" + logName + "_" + now.ToString("yyyy-MM-dd") + ".log"; 34 | lock (lockKey) 35 | { 36 | using (FileStream fs = new FileStream(LogFile, FileMode.Append, FileAccess.Write)) 37 | { 38 | byte[] datetimefile = Encoding.Default.GetBytes(logName + "_" + now.ToString("yyyy-MM-dd HH:mm:ss.fff") + ":\r\n"); 39 | fs.Write(datetimefile, 0, datetimefile.Length); 40 | if (!String.IsNullOrEmpty(msg)) 41 | { 42 | byte[] data = Encoding.Default.GetBytes(string.Format(msg, para) + "\r\n==========================================\r\n"); 43 | fs.Write(data, 0, data.Length); 44 | } 45 | fs.Flush(); 46 | } 47 | } 48 | } 49 | catch 50 | { } 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Helpers/Message/EmailService.cs: -------------------------------------------------------------------------------- 1 | /*********************** 2 | * BitAdmin2.0框架文件 3 | ***********************/ 4 | using System.Collections.Generic; 5 | using System.Net; 6 | using System.Net.Mail; 7 | using System.Text; 8 | 9 | namespace {{cookiecutter.project_name}}.Helpers 10 | { 11 | public class EmailService 12 | { 13 | /* 14 | * 邮件一般用来发送通知,示例用QQ邮件。 15 | * 登陆qq邮箱时,密码是授权码(设置->账户->生成授权码) 16 | */ 17 | public static void SendMail(string subject, string html, string tomail, string displayName = "") 18 | { 19 | Dictionary tolist = new Dictionary(); 20 | tolist.Add(tomail, displayName); 21 | SendMail(subject, html, tolist); 22 | } 23 | public static void SendMail(string subject, string html, Dictionary tomail) 24 | { 25 | string fromMail = "bit@bitdao.cn"; 26 | 27 | MailMessage mailMessage = new MailMessage 28 | { 29 | From = new MailAddress(fromMail,"{{cookiecutter.project_name}}") 30 | }; 31 | foreach (var item in tomail) 32 | { 33 | if (string.IsNullOrEmpty(item.Value)) 34 | mailMessage.To.Add(new MailAddress(item.Key)); 35 | else 36 | mailMessage.To.Add(new MailAddress(item.Key, item.Value)); 37 | } 38 | mailMessage.SubjectEncoding = Encoding.UTF8; 39 | mailMessage.Subject = subject; 40 | mailMessage.BodyEncoding = Encoding.UTF8; 41 | mailMessage.Body = html; 42 | mailMessage.IsBodyHtml = true; 43 | 44 | //发送图片附件等,请参照:https://www.cnblogs.com/phasd/p/7439696.html 45 | 46 | SmtpClient sendClient = new SmtpClient("smtp.qq.com", 25) 47 | { 48 | Credentials = new NetworkCredential(fromMail, "vaiiskehnyptbjcj") 49 | }; 50 | 51 | sendClient.DeliveryMethod = SmtpDeliveryMethod.Network; 52 | sendClient.EnableSsl = true; 53 | sendClient.Send(mailMessage); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Models/GeneralExample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace {{cookiecutter.project_name}}.Models 5 | { 6 | public partial class GeneralExample 7 | { 8 | public Guid ExampleId { get; set; } 9 | public string ExampleName { get; set; } 10 | public Guid? ParentId { get; set; } 11 | public string PlainText { get; set; } 12 | public string RequiredText { get; set; } 13 | public string RepeatText { get; set; } 14 | public string MobileText { get; set; } 15 | public string EmailText { get; set; } 16 | public int? PlainInt { get; set; } 17 | public decimal? PlainDecimal { get; set; } 18 | public DateTime? DateTimePicker { get; set; } 19 | public DateTime? DateTimePickerDate { get; set; } 20 | public DateTime? DateTimePickerYymm { get; set; } 21 | public DateTime? DateTimePickerFormatter { get; set; } 22 | public string UserPicker { get; set; } 23 | public string Oupicker { get; set; } 24 | public string ExampleText { get; set; } 25 | public string ExampleRadio { get; set; } 26 | public string ExampleCheckbox { get; set; } 27 | public string ExampleSelect { get; set; } 28 | public string ExamplePhone { get; set; } 29 | public DateTime? ExampleTime { get; set; } 30 | public string ExampleUser { get; set; } 31 | public string Department { get; set; } 32 | public string AutoComplete { get; set; } 33 | public string AutoComSelectText { get; set; } 34 | public string AutoComSelect { get; set; } 35 | public string LinkageSelectA { get; set; } 36 | public string LinkageSelectB { get; set; } 37 | public string LinkageSelectC { get; set; } 38 | public string LinkageSelectD { get; set; } 39 | public string LinkageSelectE { get; set; } 40 | public string LinkageSelectF { get; set; } 41 | public Guid? CreateBy { get; set; } 42 | public DateTime? CreateTime { get; set; } 43 | public Guid? UpdateBy { get; set; } 44 | public DateTime? UpdateTime { get; set; } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Helpers/Lib/UEditor/Handlers/FileHandler.cs: -------------------------------------------------------------------------------- 1 | using {{cookiecutter.project_name}}.Helpers; 2 | using Newtonsoft.Json; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.IO; 6 | using System.Net.Http; 7 | using System.Net.Http.Headers; 8 | using System.Runtime.Serialization.Json; 9 | using System.Text; 10 | 11 | namespace {{cookiecutter.project_name}}.UEditor.Handlers 12 | { 13 | public class FileHandler 14 | { 15 | /// 16 | /// 文件上传 17 | /// 18 | /// 19 | /// 20 | /// 21 | public FileServiceResult UploadFile(Stream fs,string uploadUrl, string filePath) 22 | { 23 | FileServiceResult param = new FileServiceResult(); 24 | try 25 | { 26 | HttpClient client = new HttpClient(); 27 | MultipartFormDataContent form = new MultipartFormDataContent(); 28 | StreamContent fileContent = new StreamContent(fs); 29 | fileContent.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream"); 30 | fileContent.Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data"); 31 | fileContent.Headers.ContentDisposition.FileName = filePath; 32 | form.Add(fileContent); 33 | HttpResponseMessage res = client.PostAsync(uploadUrl, form).Result; 34 | var uploadModel = res.Content.ReadAsStringAsync().Result; 35 | param = JsonConvert.DeserializeObject(uploadModel); 36 | } 37 | catch (Exception ex) 38 | { 39 | param.Code = 1; 40 | param.Msg = "服务器异常,请联系管理员!"; 41 | LogHelper.SaveLog(ex); 42 | } 43 | return param; 44 | } 45 | 46 | public class FileServiceResult 47 | { 48 | public int Code { get; set; } 49 | 50 | public string Msg { get; set; } 51 | 52 | public List Data { get; set; } 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2010 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "{{cookiecutter.project_name}}", "{{cookiecutter.project_name}}\{{cookiecutter.project_name}}.csproj", "{2F792C22-9439-454D-BC17-71962157B450}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BitAdminService", "BitAdminService\BitAdminService.csproj", "{7D107A6C-3D12-4640-B33B-9D0A3C5190FB}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BitAdminFileService", "BitAdminFileService\BitAdminFileService.csproj", "{240A4C59-5D17-45FB-BD9B-1F9C623AFA55}" 11 | EndProject 12 | Global 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|Any CPU = Debug|Any CPU 15 | Release|Any CPU = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {2F792C22-9439-454D-BC17-71962157B450}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {2F792C22-9439-454D-BC17-71962157B450}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {2F792C22-9439-454D-BC17-71962157B450}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {2F792C22-9439-454D-BC17-71962157B450}.Release|Any CPU.Build.0 = Release|Any CPU 22 | {7D107A6C-3D12-4640-B33B-9D0A3C5190FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {7D107A6C-3D12-4640-B33B-9D0A3C5190FB}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {7D107A6C-3D12-4640-B33B-9D0A3C5190FB}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {7D107A6C-3D12-4640-B33B-9D0A3C5190FB}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {240A4C59-5D17-45FB-BD9B-1F9C623AFA55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {240A4C59-5D17-45FB-BD9B-1F9C623AFA55}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {240A4C59-5D17-45FB-BD9B-1F9C623AFA55}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {240A4C59-5D17-45FB-BD9B-1F9C623AFA55}.Release|Any CPU.Build.0 = Release|Any CPU 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | GlobalSection(ExtensibilityGlobals) = postSolution 35 | SolutionGuid = {AC57DF0B-D494-447F-AEDB-F1F9CEE853D4} 36 | EndGlobalSection 37 | EndGlobal 38 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Controllers/Framework/Auth/SMSController.cs: -------------------------------------------------------------------------------- 1 | using {{cookiecutter.project_name}}.Helpers; 2 | using {{cookiecutter.project_name}}.Models; 3 | using Microsoft.AspNetCore.Mvc; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Threading.Tasks; 8 | 9 | namespace {{cookiecutter.project_name}}.Controllers.Framework.Auth 10 | { 11 | public class SMSController: Controller 12 | { 13 | DataContext dbContext = new DataContext(); 14 | 15 | public ActionResult VerifyCode(string account, string t) 16 | { 17 | try 18 | { 19 | if (!SSOClient.Validate(account, out SysUser user)) 20 | return Json(new { Code = 1, Msg = "帐号不存在,请重新输入!" }); 21 | 22 | string code = VerifyHelper.CreateNumber(4); 23 | SMSService.Send(user.Mobile, code); 24 | dbContext.SysSmsCode.Add(new SysSmsCode() 25 | { 26 | Id = Guid.NewGuid(), 27 | Mobile = user.Mobile, 28 | CreateTime = DateTime.Now, 29 | OverTime = DateTime.Now.AddMinutes(3), 30 | IsVerify = 0, 31 | SmsCode = code, 32 | SmsSign = t 33 | }); 34 | dbContext.SaveChanges(); 35 | return Json(new { Code = 0, Msg = "发送成功!" }); 36 | } 37 | catch (Exception ex) 38 | { 39 | LogHelper.SaveLog(ex); 40 | return Json(new { Code = 1, Msg = "服务器异常,请联系管理员!" }); 41 | } 42 | } 43 | 44 | public JsonResult Login(string account, string t, string code) 45 | { 46 | try 47 | { 48 | if (!SSOClient.Validate(account, out SysUser user)) 49 | return Json(new { Code = 1, Msg = "帐号不存在,请重新输入!" }); 50 | 51 | var item = dbContext.SysSmsCode.FirstOrDefault(x => x.Mobile == user.Mobile && x.SmsCode == code && x.SmsSign == t && x.OverTime > DateTime.Now); 52 | if (item == null) 53 | return Json(new { Code = 1, Msg = "验证码验证失败,请重新输入!" }); 54 | item.IsVerify = 1; 55 | item.VerifyTime = DateTime.Now; 56 | dbContext.SaveChanges(); 57 | 58 | SSOClient.SignIn(user.UserId); 59 | return Json(new { Code = 0 }); 60 | } 61 | catch (Exception ex) 62 | { 63 | LogHelper.SaveLog(ex); 64 | return Json(new { Code = 1, Msg = "服务器异常,请联系管理员!" }); 65 | } 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Controllers/Framework/Auth/WeixinController.cs: -------------------------------------------------------------------------------- 1 | using {{cookiecutter.project_name}}.Helpers; 2 | using {{cookiecutter.project_name}}.Models; 3 | using Microsoft.AspNetCore.Mvc; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Threading.Tasks; 8 | 9 | namespace {{cookiecutter.project_name}}.Controllers.Framework.Weixin 10 | { 11 | /// 12 | /// 微信开放平台相关功能 13 | /// 14 | public class WeixinController : Controller 15 | { 16 | DataContext dbContext = new DataContext(); 17 | public ActionResult Login(string code) 18 | { 19 | try 20 | { 21 | string openid = string.Empty; 22 | 23 | SysUserOpenId userOpenId = dbContext.Set().Where(x => x.OpenId == openid).FirstOrDefault(); 24 | if (userOpenId != null && userOpenId.UserId != Guid.Empty) 25 | { 26 | SSOClient.SignIn(userOpenId.UserId.Value); 27 | return Redirect("/pages/home/index.html"); 28 | } 29 | return Redirect("/pages/account/bind.html?openid=" + openid); 30 | 31 | //自动创建本地用户,适用面向公众网站,项目根据需要调整逻辑。 32 | //url = string.Format("https://api.weixin.qq.com//sns/userinfo?access_token={0}&openid={1}", weixin_access_token, appid, openid); 33 | //wcl.Encoding = Encoding.UTF8; 34 | //json = wcl.DownloadString(url); 35 | //JObject weixinUser = JObject.Parse(json.Replace("\\", "")); 36 | 37 | //var user = new SysUser(); 38 | //user.UserId = Guid.NewGuid(); 39 | //user.UserName = (string)weixinUser["nickname"];//更多可用属性请查看官方接入文档(openid,nickname,sex,province,city,country,headimgurl,privilege[],unionid) 40 | //user.UserCode = Guid.NewGuid().ToString("N").Substring(20); 41 | //user.DepartmentId = new Guid("2379788E-45F0-417B-A103-0B6440A9D55D"); 42 | //dbContext.SysUser.Add(user); 43 | 44 | //userOpenId = new SysUserOpenId(); 45 | //userOpenId.OpenId = openid; 46 | //userOpenId.UserId = user.UserId; 47 | //userOpenId.CreateTime = DateTime.Now; 48 | //userOpenId.BindTime = DateTime.Now; 49 | //dbContext.SysUserOpenId.Add(userOpenId); 50 | 51 | //dbContext.SaveChanges(); 52 | 53 | //SSOClient.SignIn(userOpenId.UserId.Value); 54 | //return Redirect("/pages/home/index.html"); 55 | } 56 | catch (Exception ex) 57 | { 58 | LogHelper.SaveLog(ex); 59 | return Json(new { Code = 1, Msg = "服务器异常,请联系管理员!" }); 60 | } 61 | } 62 | 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Helpers/System/BitmapHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Drawing; 4 | using System.Drawing.Drawing2D; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | 8 | namespace {{cookiecutter.project_name}}.Helpers 9 | { 10 | public static class BitmapHelper 11 | { 12 | /// 13 | /// 压缩图片 14 | /// 15 | /// 16 | /// 17 | public static Bitmap Zoom(this Bitmap image, int width) 18 | { 19 | if (width >= image.Width) 20 | return image; 21 | 22 | int thumbHeight = image.Height * width / image.Width; 23 | Bitmap thumbBitmap = new Bitmap(width, thumbHeight); 24 | 25 | using (Graphics graphics = Graphics.FromImage(thumbBitmap)) 26 | { 27 | graphics.PixelOffsetMode = PixelOffsetMode.Half; 28 | graphics.InterpolationMode = InterpolationMode.High; 29 | graphics.SmoothingMode = SmoothingMode.AntiAlias; 30 | graphics.Clear(Color.Transparent); 31 | graphics.DrawImage(image, new Rectangle(0, 0, width, thumbHeight), new Rectangle(0, 0, image.Width, image.Height), GraphicsUnit.Pixel); 32 | } 33 | return thumbBitmap; 34 | } 35 | 36 | /// 37 | /// 裁剪图片 38 | /// 39 | /// 原图 40 | /// 41 | /// 42 | public static Bitmap Cut(this Bitmap image, Rectangle rectangle) 43 | { 44 | Bitmap thumbBitmap = new Bitmap(rectangle.Width, rectangle.Height); 45 | 46 | using (Graphics graphics = Graphics.FromImage(thumbBitmap)) 47 | { 48 | graphics.PixelOffsetMode = PixelOffsetMode.Half; 49 | graphics.InterpolationMode = InterpolationMode.High; 50 | graphics.SmoothingMode = SmoothingMode.AntiAlias; 51 | graphics.Clear(Color.Transparent); 52 | graphics.DrawImage(image, new Rectangle(0, 0, rectangle.Width, rectangle.Height), rectangle, GraphicsUnit.Pixel); 53 | } 54 | return thumbBitmap; 55 | } 56 | 57 | /// 58 | /// 裁剪图片 59 | /// 60 | /// 原图 61 | /// 62 | /// 63 | /// 64 | /// 65 | /// 66 | public static Bitmap Cut(this Bitmap image, int x, int y, int width, int height) 67 | { 68 | return Cut(image, new Rectangle(x, y, width, height)); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/js/lib/spop.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * smallPop 0.1.2 | https://github.com/silvio-r/spop 3 | * Copyright (c) 2015 Sílvio Rosa @silvior_ 4 | * MIT license 5 | */ 6 | !function(){"use strict";function t(t,o){return"string"==typeof t?(o||document).getElementById(t):t||null}function o(t,o){t.classList?t.classList.remove(o):t.className=t.className.replace(new RegExp("(^|\\b)"+o.split(" ").join("|")+"(\\b|$)","gi")," ")}function e(t,o){for(var e in o)o.hasOwnProperty(e)&&(t[e]=o[e]);return t}var s,i,p,n,r,c,l,h,a=390,u=function(o,p){if(this.defaults={template:null,style:"info",autoclose:!1,position:"top-right",icon:!0,group:!1,onOpen:!1,onClose:!1},i=e(this.defaults,spop.defaults),"string"==typeof o||"string"==typeof p)s={template:o,style:p||i.style};else{if("object"!=typeof o)return console.error("Invalid arguments."),!1;s=o}this.opt=e(i,s),t("spop--"+this.opt.group)&&this.remove(t("spop--"+this.opt.group)),this.open()};u.prototype.create=function(o){p=t(this.getPosition("spop--",this.opt.position)),n=this.opt.icon?'':"",r='
×
'+n+'
'+o+"
",p||(this.popContainer=document.createElement("div"),this.popContainer.setAttribute("class","spop-container "+this.getPosition("spop--",this.opt.position)),this.popContainer.setAttribute("id",this.getPosition("spop--",this.opt.position)),document.body.appendChild(this.popContainer),p=t(this.getPosition("spop--",this.opt.position))),this.pop=document.createElement("div"),this.pop.setAttribute("class","spop spop--out spop--in "+this.getStyle("spop--",this.opt.style)),this.opt.group&&"string"==typeof this.opt.group&&this.pop.setAttribute("id","spop--"+this.opt.group),this.pop.setAttribute("role","alert"),this.pop.innerHTML=r,p.appendChild(this.pop)},u.prototype.getStyle=function(t,o){return c={success:"success",error:"error",warning:"warning"},t+(c[o]||"info")},u.prototype.getPosition=function(t,o){return l={"top-left":"top-left","top-center":"top-center","top-right":"top-right","bottom-left":"bottom-left","bottom-center":"bottom-center","bottom-right":"bottom-right"},t+(l[o]||"top-right")},u.prototype.open=function(){this.create(this.opt.template),this.opt.onOpen&&this.opt.onOpen(),this.close()},u.prototype.close=function(){this.opt.autoclose&&"number"==typeof this.opt.autoclose&&(this.autocloseTimer=setTimeout(this.remove.bind(this,this.pop),this.opt.autoclose)),this.pop.addEventListener("click",this.addListeners.bind(this),!1)},u.prototype.addListeners=function(t){h=t.target.getAttribute("data-spop"),"close"===h&&(this.autocloseTimer&&clearTimeout(this.autocloseTimer),this.remove(this.pop))},u.prototype.remove=function(t){this.opt.onClose&&this.opt.onClose(),o(t,"spop--in"),setTimeout(function(){document.body.contains(t)&&t.parentNode.removeChild(t)},a)},window.spop=function(t,o){return t&&window.addEventListener?new u(t,o):!1},spop.defaults={}}(); -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Helpers/AI/FaceCompareHelper.cs: -------------------------------------------------------------------------------- 1 | /*********************** 2 | * BitAdmin2.0框架文件 3 | ***********************/ 4 | using Baidu.Aip.Face; 5 | using Newtonsoft.Json; 6 | using Newtonsoft.Json.Linq; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Drawing; 10 | using System.Linq; 11 | using System.Net.Http; 12 | using System.Threading.Tasks; 13 | 14 | namespace {{cookiecutter.project_name}}.Helpers 15 | { 16 | public class FaceCompareHelper 17 | { 18 | /* 百度人脸识别API更换成3.0,人脸识别功能用不了啦。 19 | * 换种思路实现,本地用户存储“身份证”和“姓名”,然后与公安数据库进行对比。 20 | */ 21 | //static string appid = "11129681"; 22 | static string appkey = "EDyBDG1mQnBPUY5exsOMNyS6"; 23 | static string secretkey = "bMVGearZZvbLclZvEMFStSBUyN6DXaNE "; 24 | public static bool Verify(string idCardNumber, string name, string imgStr) 25 | { 26 | Face client = new Face(appkey, secretkey); 27 | client.Timeout = 60 * 1000; 28 | var result = client.PersonVerify(imgStr, "BASE64", idCardNumber, name); 29 | 30 | LogHelper.SaveLog("face", result.ToString()); 31 | 32 | foreach (JValue val in (JArray)result["result"]) 33 | { 34 | if ((double)val.Value > 80) return true; 35 | } 36 | 37 | return false; 38 | } 39 | 40 | static string domain = "http://api.bitdao.cn"; 41 | public static string ExtractFeature(string imgfile) 42 | { 43 | HttpClient client = new HttpClient(); 44 | MultipartFormDataContent form = new MultipartFormDataContent(); 45 | form.Add(HttpHelper.CreateStreamContent("face.jpg", imgfile)); 46 | HttpResponseMessage res = client.PostAsync(domain + "/FaceCompare/ExtractFeature", form).Result; 47 | var json = res.Content.ReadAsStringAsync().Result; 48 | var result = JsonConvert.DeserializeObject(json); 49 | return result.Data; 50 | } 51 | 52 | public static string MatchFeature(Bitmap image, string feature) 53 | { 54 | HttpClient client = new HttpClient(); 55 | MultipartFormDataContent form = new MultipartFormDataContent(); 56 | form.Add(HttpHelper.CreateByteArrayContent("feature", feature)); 57 | form.Add(HttpHelper.CreateStreamContent("face.jpg", image)); 58 | HttpResponseMessage res = client.PostAsync(domain + "/FaceCompare/MatchFeature", form).Result; 59 | var json = res.Content.ReadAsStringAsync().Result; 60 | var result = JsonConvert.DeserializeObject(json); 61 | return result.Data; 62 | } 63 | 64 | private class UploadResult 65 | { 66 | public int Code { get; set; } 67 | public string Msg { get; set; } 68 | public string Data { get; set; } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/js/lib/singleupload.js: -------------------------------------------------------------------------------- 1 | function SingleImageUpload(id, options) { 2 | this.me = $(id); var defaultOpt = { boxWidth: '200px', boxHeight: 'auto' } 3 | this.preview = $('
'); this.opts = $.extend(true, defaultOpt, {}, options); this.init(); this.callback = this.opts.callback; 4 | } 5 | SingleImageUpload.prototype = { 6 | init: function () { this.me.append(this.preview); this.me.append(this.fileupload); this.cssInit(); this.eventClickInit(); }, 7 | cssInit: function () { 8 | this.me.css({ 'width': this.opts.boxWidth, 'height': this.opts.boxHeight, 'border': '1px solid #cccccc', 'padding': '10px', 'cursor': 'pointer' }) 9 | this.preview.css({ 'height': '100%', 'overflow': 'hidden' }) 10 | }, 11 | onDragover: function (e) { e.stopPropagation(); e.preventDefault(); e.dataTransfer.dropEffect = 'copy'; }, 12 | onDrop: function (e) { 13 | var self = this; e.stopPropagation(); e.preventDefault(); var fileList = e.dataTransfer.files; if (fileList.length == 0) { return false; } 14 | if (fileList[0].type.indexOf('image') === -1) { alert("您拖的不是图片!"); return false; } 15 | var img = window.URL.createObjectURL(fileList[0]); var filename = fileList[0].name; var filesize = Math.floor((fileList[0].size) / 1024); if (filesize > 500) { alert("上传大小不能超过500K."); return false; } 16 | self.me.find("img").attr("src", img); self.me.find("img").attr("title", filename); if (this.callback) { this.callback(fileList); } 17 | }, 18 | eventClickInit: function () { 19 | var self = this; this.me.unbind().click(function () { self.createImageUploadDialog(); }) 20 | var dp = this.me[0]; dp.addEventListener('dragover', function (e) { self.onDragover(e); }); dp.addEventListener("drop", function (e) { self.onDrop(e); }); 21 | }, 22 | onChangeUploadFile: function () { 23 | var fileInput = this.fileInput; var files = fileInput.files; var file = files[0]; 24 | var img = window.URL.createObjectURL(file); var filename = file.name; this.me.find("img").attr("src", img); this.me.find("img").attr("title", filename); 25 | if (this.callback) { this.callback(files); } 26 | }, 27 | createImageUploadDialog: function () { 28 | var fileInput = this.fileInput; 29 | if (!fileInput) { 30 | fileInput = document.createElement('input'); 31 | fileInput.type = 'file'; 32 | fileInput.name = 'ime-images'; fileInput.multiple = true; 33 | fileInput.onchange = this.onChangeUploadFile.bind(this); this.fileInput = fileInput; 34 | } 35 | fileInput.click(); 36 | }, 37 | src: function (uri) { 38 | if (uri) 39 | this.preview.find("img").attr("src", uri); 40 | else 41 | this.preview.find("img").attr("src", "../../images/lib/singleupload/upload.png"); 42 | } 43 | } -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/css/workflow/flowdesign.css: -------------------------------------------------------------------------------- 1 | html,body{height:100%;} 2 | .mini-layout{ 3 | width:100%; 4 | height:100%; 5 | /*background: rgb(58, 65, 68) url(/Public/images/grid.png) repeat;*/ 6 | background: rgb(58, 65, 68); 7 | } 8 | 9 | .process-step{position: absolute; cursor: move; min-width: 100px; line-height: 28px} 10 | .process-step span{cursor: pointer;} 11 | 12 | /*颜色*/ 13 | .colors { 14 | clear: both; 15 | padding: 0px; 16 | display: inline-block; 17 | vertical-align: bottom; 18 | } 19 | 20 | .colors ul{list-style: none; display:inline-block;margin:0px;padding:0px;} 21 | .colors li { 22 | position: relative; 23 | float: left; 24 | width: 18px; 25 | height: 18px; 26 | margin: 2px 1px 0 0; 27 | padding:2px 2px 2px 4px; 28 | background: #000; 29 | color:#ffffff; 30 | cursor: pointer; 31 | filter: alpha(opacity=50); 32 | opacity: 0.5; 33 | -webkit-transition: opacity 0.2s; 34 | -moz-transition: opacity 0.2s; 35 | -ms-transition: opacity 0.2s; 36 | -o-transition: opacity 0.2s; 37 | transition: opacity 0.2s; 38 | } 39 | .colors li:hover { 40 | filter: alpha(opacity=100); 41 | opacity: 1; 42 | } 43 | .colors li.active { 44 | height: 20px; 45 | margin-top: 0; 46 | filter: alpha(opacity=75); 47 | opacity: 0.75; 48 | } 49 | .colors li.red { 50 | background: #d54e21; 51 | } 52 | .colors li.green { 53 | background: #78a300; 54 | } 55 | .colors li.blue { 56 | background: #0e76a8; 57 | } 58 | .colors li.aero { 59 | background: #9cc2cb; 60 | } 61 | .colors li.grey { 62 | background: #73716e; 63 | } 64 | .colors li.orange { 65 | background: #f70; 66 | } 67 | .colors li.yellow { 68 | background: #fc0; 69 | } 70 | .colors li.pink { 71 | background: #ff66b5; 72 | } 73 | .colors li.purple { 74 | background: #6a5a8c; 75 | } 76 | /*连接线提示*/ 77 | .component { 78 | opacity: 0.8; 79 | filter: alpha(opacity=80); 80 | z-index: 20; 81 | } 82 | 83 | 84 | /*圆形*/ 85 | .circle { 86 | min-width: 100px; 87 | min-height: 100px; 88 | padding:20px; 89 | -moz-border-radius: 100px; 90 | -webkit-border-radius: 100px; 91 | border-radius: 100px; 92 | } 93 | /*椭圆*/ 94 | .oval { 95 | min-width: 50px; 96 | min-height: 50px; 97 | padding:20px; 98 | -moz-border-radius: 100px / 50px; 99 | -webkit-border-radius: 100px / 50px; 100 | border-radius: 100px / 50px; 101 | } 102 | /*菱形*/ 103 | .hexagon { 104 | min-width: 50px; 105 | min-height: 30px; 106 | background: #ccc; 107 | position: relative; 108 | } 109 | .hexagon:before { 110 | content: ""; 111 | position: absolute; 112 | top: -25px; 113 | left: 0; 114 | width: 0; 115 | height: 0; 116 | border-left: 50px solid transparent; 117 | border-right: 50px solid transparent; 118 | border-bottom: 25px solid #ccc; 119 | } 120 | .hexagon:after { 121 | content: ""; 122 | position: absolute; 123 | bottom: -25px; 124 | left: 0; 125 | width: 0; 126 | height: 0; 127 | border-left: 50px solid transparent; 128 | border-right: 50px solid transparent; 129 | border-top: 25px solid #ccc; 130 | } -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/pages/templates/exampleRedirect.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 |
示例名称:
13 |
14 | 15 |
16 |
17 | 20 | 23 | 26 |
27 |
28 | 29 |
34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
示例名称普通文本电话号码日期时间操作
46 |
47 | 48 |
49 |
50 |
51 | 52 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Controllers/Framework/Auth/WebController.cs: -------------------------------------------------------------------------------- 1 | using {{cookiecutter.project_name}}.Helpers; 2 | using {{cookiecutter.project_name}}.Models; 3 | using Microsoft.AspNetCore.Mvc; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Drawing.Imaging; 7 | using System.IO; 8 | using System.Linq; 9 | using System.Threading.Tasks; 10 | 11 | namespace {{cookiecutter.project_name}}.Controllers.Framework.Auth 12 | { 13 | public class WebController: Controller 14 | { 15 | DataContext dbContext = new DataContext(); 16 | 17 | public ActionResult VerifyCode() 18 | { 19 | try 20 | { 21 | var code = VerifyHelper.CreateCode(4); 22 | var image = VerifyHelper.CreateImage(code); 23 | MemoryStream ms = new MemoryStream(); 24 | image.Save(ms, ImageFormat.Png); 25 | byte[] bytes = ms.GetBuffer(); 26 | ms.Close(); 27 | 28 | HttpContextCore.Current.Session.Set("VerifyCode", code); 29 | return File(bytes, "image/jpeg"); 30 | } 31 | catch (Exception ex) 32 | { 33 | LogHelper.SaveLog(ex); 34 | return Json(new { Code = 1, Msg = "服务器异常,请联系管理员!" }); 35 | } 36 | } 37 | 38 | public JsonResult Login(string account, string password, string verifyCode) 39 | { 40 | try 41 | { 42 | string vcode = HttpContextCore.Current.Session.Get("VerifyCode"); 43 | if (Convert.ToString(verifyCode).ToLower() != Convert.ToString(vcode).ToLower()) 44 | return Json(new { Code = 1, Msg = "验证码不正确,请重新输入!" }); 45 | 46 | if (!SSOClient.Validate(account, password, out Guid userId)) 47 | return Json(new { Code = 1, Msg = "帐号或密码不正确,请重新输入!" }); 48 | 49 | HttpContextCore.Current.Session.Set("VerifyCode", string.Empty); 50 | 51 | SSOClient.SignIn(userId); 52 | return Json(new { Code = 0 }); 53 | } 54 | catch (Exception ex) 55 | { 56 | LogHelper.SaveLog(ex); 57 | return Json(new { Code = 1, Msg = "服务器异常,请联系管理员!" }); 58 | } 59 | } 60 | 61 | [BitAuthorize] 62 | public JsonResult UpdatePassword(string OldPwd, string NewPwd) 63 | { 64 | try 65 | { 66 | var userModel = dbContext.SysUser.FirstOrDefault(t => t.UserId.Equals(SSOClient.UserId)); 67 | if (userModel.UserPassword != EncryptHelper.MD5(OldPwd)) 68 | return Json(new { Code = 1, Msg = "原密码不正确" }); 69 | 70 | userModel.UserPassword = EncryptHelper.MD5(NewPwd); 71 | if (dbContext.SaveChanges() < 0) 72 | return Json(new { Code = 1, Msg = "修改密码失败,请联系管理员" }); 73 | 74 | return Json(new { Code = 0, Msg = "修改密码成功" }); 75 | } 76 | catch (Exception ex) 77 | { 78 | LogHelper.SaveLog(ex); 79 | return Json(new { Code = 1, Msg = "服务器异常,请联系管理员!" }); 80 | } 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/pages/workflow/flowhistory.html: -------------------------------------------------------------------------------- 1 | 2 | 38 | 39 | 40 | 83 | 84 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/pages/workbench/toread.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 |
6 | 7 | 8 | 9 | 13 | 14 | 17 | 18 | 21 | 22 |
工单名称: 10 | 11 | 12 | 待阅开始时间: 15 | 16 | 19 | 20 |
23 |
24 | 25 |
26 |
27 | 30 |
31 |
32 | 33 |
36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 |
流程类型工单名称处理环节环节处理人待阅开始时间
47 |
48 | 49 |
50 |
51 |
52 | 53 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/pages/workbench/todo.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 |
6 | 7 | 8 | 9 | 13 | 14 | 17 | 18 | 21 | 22 |
工单名称: 10 | 11 | 12 | 待办开始时间: 15 | 16 | 19 | 20 |
23 |
24 | 25 |
26 |
27 | 30 |
31 |
32 | 33 |
36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 |
流程类型工单名称处理环节当前处理人待办开始时间
47 |
48 | 49 |
50 |
51 |
52 | 53 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Helpers/Framework/LogHelper.cs: -------------------------------------------------------------------------------- 1 | /*********************** 2 | * BitAdmin2.0框架文件 3 | ***********************/ 4 | using {{cookiecutter.project_name}}.Models; 5 | using Microsoft.AspNetCore.Http; 6 | using System.Linq; 7 | using System; 8 | using System.IO; 9 | using System.Text; 10 | 11 | namespace {{cookiecutter.project_name}}.Helpers 12 | { 13 | public class LogHelper 14 | { 15 | private static string lockKey = "lock"; 16 | public static void SaveLog(Exception ex) 17 | { 18 | StringBuilder sb = new StringBuilder(); 19 | sb.AppendLine(ex.Message); 20 | sb.AppendLine(ex.StackTrace); 21 | sb.AppendLine(ex.Source); 22 | SaveLog("错误日志",sb.ToString()); 23 | 24 | try 25 | { 26 | DataContext dbContext = new DataContext(); 27 | var currentUser = SSOClient.User; 28 | string ip = HttpContextCore.Current.Request.Headers["X-Forwarded-For"].FirstOrDefault(); 29 | 30 | SysLog model = new SysLog 31 | { 32 | UserId = currentUser.UserId, 33 | UserCode = currentUser.UserCode, 34 | UserName = currentUser.UserName, 35 | DepartmentName = SSOClient.Department.DepartmentFullName, 36 | IpAddress = string.IsNullOrEmpty(ip) ? HttpContextCore.Current.Connection.RemoteIpAddress.ToString() : ip, 37 | UserAgent = HttpContextCore.Current.Request.Headers["User-Agent"], 38 | CreateTime = DateTime.Now, 39 | Type = "错误日志", 40 | Title = "程序异常", 41 | Description = sb.ToString(), 42 | }; 43 | dbContext.SysLog.Add(model); 44 | dbContext.SaveChanges(); 45 | } 46 | catch { } 47 | } 48 | public static void SaveLog(String logName, string msg, params string[] para) 49 | { 50 | try 51 | { 52 | if (!Directory.Exists(AppDomain.CurrentDomain.BaseDirectory + "\\logs\\")) 53 | { 54 | Directory.CreateDirectory(AppDomain.CurrentDomain.BaseDirectory + "\\logs\\"); 55 | 56 | } 57 | 58 | DateTime now = DateTime.Now; 59 | String LogFile = AppDomain.CurrentDomain.BaseDirectory + "\\logs\\" + logName + "_" + now.ToString("yyyy-MM-dd") + ".log"; 60 | lock (lockKey) 61 | { 62 | using (FileStream fs = new FileStream(LogFile, FileMode.Append, FileAccess.Write)) 63 | { 64 | byte[] datetimefile = Encoding.Default.GetBytes(logName + "_" + now.ToString("yyyy-MM-dd HH:mm:ss.fff") + ":\r\n"); 65 | fs.Write(datetimefile, 0, datetimefile.Length); 66 | if (!String.IsNullOrEmpty(msg)) 67 | { 68 | byte[] data = Encoding.Default.GetBytes((para.Length > 0 ? string.Format(msg, para) : msg) + "\r\n==========================================\r\n"); 69 | fs.Write(data, 0, data.Length); 70 | } 71 | fs.Flush(); 72 | } 73 | } 74 | } 75 | catch 76 | { } 77 | } 78 | } 79 | } -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/Helpers/Video/VideoHelper.cs: -------------------------------------------------------------------------------- 1 | /*********************** 2 | * BitAdmin2.0框架文件 3 | ***********************/ 4 | using System; 5 | using System.Diagnostics; 6 | using System.Drawing; 7 | using System.Drawing.Drawing2D; 8 | using System.Drawing.Imaging; 9 | using System.IO; 10 | 11 | namespace {{cookiecutter.project_name}}.Helpers 12 | { 13 | public class VideoHelper 14 | { 15 | /// 16 | /// 下载ffmpeg,解压到以下路径。 17 | /// 18 | static string ffmpeg = "E:\\Video\\ffmpeg\\bin\\ffmpeg.exe"; 19 | /// 20 | /// 工作目录,入参为工作目录的相对路径。 21 | /// 22 | static string workingDirectory = "E:\\Video\\"; 23 | 24 | /// 25 | /// 截取视频并加图片水印 26 | /// 27 | /// 输出文件名,相对工作目录路径。 28 | /// 输出文件名,相对工作目录路径。 29 | /// 图片水印文件|png 30 | /// 开始时间|00:00:00 31 | /// 结束时间|00:00:15 32 | /// 33 | public static string CutAndWater(string inputFile, string outputFile, string watermarkFile, string startTime, string endTime) 34 | { 35 | //如需更多参数,请百度ffmpeg,路径符号不能使用“\” 36 | string config = string.Format("-y -i {0} -acodec copy -ss {2} -to {3} -vf \"movie={4}[watermark];[in][watermark]overlay=10:10[out]\" {1}", 37 | inputFile.Replace("\\","/"), outputFile.Replace("\\", "/"), startTime, endTime, watermarkFile.Replace("\\", "/")); 38 | 39 | LogHelper.SaveLog("video", config); 40 | 41 | return Exec(config); 42 | } 43 | 44 | /// 45 | /// 生成水印图片,返回工作目录相对路径。 46 | /// 47 | /// 48 | /// 49 | public static string CreateImage(string msg) 50 | { 51 | var fileName = Path.Combine("image", string.Format("{0:yyyyMMddHHmmss}{1}.png", DateTime.Now, Guid.NewGuid().ToString().Substring(0, 6))); 52 | 53 | int iImageWidth = msg.Length * 15; 54 | int iImageHeight = 20; 55 | Bitmap image = new Bitmap(iImageWidth, iImageHeight); 56 | Graphics g = Graphics.FromImage(image); 57 | g.Clear(Color.Transparent); 58 | Font font = new Font("微软雅黑", 10, (FontStyle.Regular)); 59 | Rectangle rc = new Rectangle(0, 0, iImageWidth, image.Height); 60 | LinearGradientBrush brush = new LinearGradientBrush(rc, Color.White, Color.White, 0, false); 61 | g.DrawString(msg, font, brush, 0, 2); 62 | 63 | image.Save(workingDirectory + fileName, ImageFormat.Png); 64 | 65 | return fileName; 66 | } 67 | private static string Exec(string config) 68 | { 69 | Process p = new Process(); 70 | p.StartInfo.FileName = ffmpeg; 71 | p.StartInfo.Arguments = config; 72 | p.StartInfo.WorkingDirectory = workingDirectory; 73 | p.StartInfo.UseShellExecute = false; 74 | p.StartInfo.RedirectStandardInput = true; 75 | p.StartInfo.RedirectStandardOutput = true; 76 | p.StartInfo.RedirectStandardError = true; 77 | p.StartInfo.CreateNoWindow = false; 78 | p.Start(); 79 | 80 | return p.StandardError.ReadToEnd(); 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/pages/home/summary.html: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 |
14 |
15 |

BitAdminCore介绍

16 |

BitAdminCore是基于jQuery,Bootstrap,AdminLTE的 NET Core开发框架,使用SQL Server数据库。

17 |

BitAdminCore为没有自主开发框架的小团队,提供快速项目搭建及开发能力。让你的团队从零开始在一周之内可以完成一个小型系统的开发。

18 |

源码地址:https://github.com/chenyinxin/cookiecutter-bitadmin-core

19 |

博客地址:https://www.cnblogs.com/chenyinxin/

20 |

架构思想:

21 |

定位于后台管理模块开发,以管理员对数据增删改查为核心。

22 |

以程序易读性为核心,采用布局与逻辑分离、前端后端分离的思路,降低耦合度。

23 |

规范约定:

24 |

使用EF Core与Sql语句混合开发模式;使用骆驼命名法,前端示例:userName;后端示例:UserName。

25 |

26 | 27 |

BitAdminCore套件

28 |

querySuite & formSuite:

29 |

querySuite & formSuite 是增删改查一体化套件,快速实现模块增删改查功能。

30 |

generalForm:

31 |

generalForm 是一个独立表单套件。

32 |

其它组件:

33 |

bitSelect、bitRadio、bitCheckbox、bitAutoComplete、bitAutoComSelect

34 |

bitTree、picker、datePicker、linkageSelect、treeTable、fileUpload

35 | 36 |

BitAdminCore框架(网站)

37 |

登录页面:

38 |

提供基础的用户名、密码、验证码、短信登录。支持负载均衡环境。

39 |

提供平台登录:微信、QQ、AD域

40 |

应用首页:

41 |

基础布局:头部、菜单、内容;默认tab加载模式,支持iframe。

42 |

全局配置、通用操作、权限、日志、通知推送等

43 |

基础功能:

44 |

系统管理:部门信息、用户信息、角色权限、日志查看。

45 |

开发功能:系统菜单、页面操作、数据字典、代码生成、原型示例。

46 |

流程引擎:流程配置、我的待办、我的已办、我的待阅、我的已阅。

47 |

示例功能:简单示例、完整示例、流程示例。

48 | 49 |

BitAdminCore框架(微信)

50 |

登录页面:

51 |

提供微信平台登录:公众号、企业号

52 |

提供用户名、密码、验证码、短信用户绑定。支持负载均衡环境。

53 | 54 |

BitAdminCore文件服务

55 |

在负载环境下,需要将上传的附件保存到文件服务器。

56 | 57 |

BitAdminCore定时服务

58 |

提供Windows后台服务框架以及服务管理界面,简单开发一个定时服务。

59 | 60 |
61 |
62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/pages/workbench/done.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 |
6 | 7 | 8 | 9 | 13 | 14 | 17 | 18 | 21 | 22 |
工单名称: 10 | 11 | 12 | 待办结束时间: 15 | 16 | 19 | 20 |
23 |
24 | 25 |
26 |
27 | 30 |
31 |
32 | 33 |
36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
流程类型工单名称处理环节环节处理人待办开始时间待办结束时间
48 |
49 | 50 |
51 |
52 |
53 | 54 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/pages/workbench/read.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 |
6 | 7 | 8 | 9 | 13 | 14 | 17 | 18 | 21 | 22 |
工单名称: 10 | 11 | 12 | 待阅结束时间: 15 | 16 | 19 | 20 |
23 |
24 | 25 |
26 |
27 | 30 |
31 |
32 | 33 |
36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
流程类型工单名称处理环节环节处理人待阅开始时间待阅结束时间
48 |
49 | 50 |
51 |
52 |
53 | 54 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/pages/shared/layout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 首页 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 61 | 62 | 63 |
64 |
65 |
66 |

67 | 68 | 69 |

70 | 75 |
76 |
77 |
78 |
79 | 80 | 81 | -------------------------------------------------------------------------------- /{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/wwwroot/pages/system/log.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
日志类型:日志标题:日志描述:
16 |
17 | 18 |
19 |
20 | 23 |
24 |
25 | 26 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
日志标题日志记录时间日志类型IP地址用户名用户标识部门
42 |
43 | 44 |
45 |
46 | 47 |