diff --git a/.gitignore b/.gitignore index 70fd532..16abee3 100644 --- a/.gitignore +++ b/.gitignore @@ -259,14 +259,14 @@ paket-files/ # Python Tools for Visual Studio (PTVS) __pycache__/ *.pyc -/DOAN.Admin.WebApi/appsettings.Development.json + /CodeGenerate -/DOAN.Admin.WebApi/appsettings.Production.json + /DOAN.Admin.WebApi/wwwroot/uploads /DOAN.Admin.WebApi/wwwroot/Generatecode /DOAN.Admin.WebApi/wwwroot/export /DOAN.Vue/src/views/business/Gendemo.vue -/DOAN.Admin.WebApi/Properties/launchSettings.json + /DOAN.Admin.WebApi/DOANAdmin.xml /DOAN.Admin.WebApi/DataProtection /Quartz.NET.WindowsService diff --git a/DOAN.Admin.WebApi/Properties/launchSettings.json b/DOAN.Admin.WebApi/Properties/launchSettings.json new file mode 100644 index 0000000..2e04687 --- /dev/null +++ b/DOAN.Admin.WebApi/Properties/launchSettings.json @@ -0,0 +1,30 @@ +{ + "profiles": { + "DOAN.Admin.WebApi": { + "commandName": "Project", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "dotnetRunMessages": true, + "applicationUrl": "http://localhost:8888" + }, + "Container (Dockerfile)": { + "commandName": "Docker", + "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", + "environmentVariables": { + "ASPNETCORE_URLS": "https://+:443;http://+:80" + }, + "publishAllPorts": true, + "useSSL": true + } + }, + "$schema": "https://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:63521", + "sslPort": 44395 + } + } +} \ No newline at end of file diff --git a/DOAN.Admin.WebApi/appsettings.development.json b/DOAN.Admin.WebApi/appsettings.development.json new file mode 100644 index 0000000..62af5b8 --- /dev/null +++ b/DOAN.Admin.WebApi/appsettings.development.json @@ -0,0 +1,118 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "dbConfigs": [ + { + // "Conn": "Data Source=139.224.232.211;User ID=root;Password=sw@414295;Initial Catalog=ziyuanworkstationgreen;Port=3306", + "Conn": "Data Source=192.168.0.58;User ID=root;Password=123456;Initial Catalog=huate_group_digital;Port=3306", + //"Conn": "Data Source=47.116.122.230;User ID=root;Password=123456;Initial Catalog=ziyuan_workstation_green;Port=3307", + "DbType": 0, //数据库类型 MySql = 0, SqlServer = 1, Oracle = 3,PgSql = 4 + "ConfigId": "1", // 上海华特 + "IsAutoCloseConnection": true + + }, + { + // "Conn": "Data Source=139.224.232.211;User ID=root;Password=sw@414295;Initial Catalog=ziyuanworkstationgreen;Port=3306", + "Conn": "Data Source=192.168.0.58;User ID=root;Password=123456;Initial Catalog=huate_ziyuan_company_digital;Port=3306", + //"Conn": "Data Source=47.116.122.230;User ID=root;Password=123456;Initial Catalog=ziyuan_workstation_green;Port=3307", + "DbType": 0, //数据库类型 MySql = 0, SqlServer = 1, Oracle = 3,PgSql = 4 + "ConfigId": "2", //新子元公司 + "IsAutoCloseConnection": true + } + + ], + //代码生成数据库配置 + "CodeGenDbConfig": { + //代码生成连接字符串,注意{dbName}为固定格式,不要填写数据库名 + "Conn": "Data Source=192.168.0.58;User ID=root;Password=123456;Initial Catalog={dbName};", + "DbType": 0, + "IsAutoCloseConnection": true, + "DbName": "huate_group_digital" //代码生成默认连接数据库,Oracle库是实例的名称 + }, + "urls": "http://localhost:8888", //项目启动url,如果改动端口前端对应devServer也需要进行修改 + "corsUrls": [ "http://localhost:8887", "http://localhost:8886" ], //跨域地址(前端启动项目,前后端分离单独部署需要设置),多个用","隔开 + "JwtSettings": { + "Issuer": "DOANAdmin.NET", //即token的签发者。 + "Audience": "DOANAdmin.NET", //指该token是服务于哪个群体的(群体范围) + "SecretKey": "SecretKey-DOANADMIN.NET-20210101", + "Expire": 1440, //jwt登录过期时间(分) + "RefreshTokenTime": 30, //分钟 + "TokenType": "Bearer" + }, + "InjectClass": [ "DOAN.Repository", "DOAN.Service", "DOAN.Tasks", "DOAN.ServiceCore" ], //自动注入类 + "ShowDbLog": true, //是否打印db日志 + "InitDb": false, //是否初始化db + "DemoMode": false, //是否演示模式 + "SingleLogin": false, //是否允许多设备/浏览器登录 + "workId": 1, //雪花id唯一数字 + "sqlExecutionTime": 5, //Sql执行时间超过多少秒记录日志并警报 + "Upload": { + "uploadUrl": "http://127.0.0.1:8888", //本地存储资源访问路径 + "localSavePath": "", //本地上传默认文件存储目录 wwwroot + "maxSize": 15, //上传文件大小限制 15M + "notAllowedExt": [ ".bat", ".exe", ".jar", ".js" ], + "requestLimitSize": 50 //请求body大小限制 + }, + //阿里云存储配置 + "ALIYUN_OSS": { + "REGIONID": "", //eg:cn-hangzhou + "KEY": "XX", + "SECRET": "XX", + "bucketName": "bucketName", + "domainUrl": "http://xxx.xxx.com", //访问资源域名 + "maxSize": 100 //上传文件大小限制 100M + }, + //企业微信通知配置 + "WxCorp": { + "AgentID": "", + "CorpID": "", + "CorpSecret": "", + "SendUser": "@all" + }, + //微信公众号设置 + "WxOpen": { + "AppID": "", + "AppSecret": "" + }, + //邮箱配置信息 + "MailOptions": { + //发件人名称 + "FromName": "system", + //发送人邮箱 + "FromEmail": "", //eg:xxxx@qq.com + //发送人邮箱密码 + "Password": "", + //协议 + "Smtp": "smtp.qq.com", + "Port": 587, + "Signature": "系统邮件,请勿回复!", + "UseSsl": true + }, + //redis服务配置 + "RedisServer": { + "open": 0, //是否启用redis + "Cache": "127.0.0.1:6379,defaultDatabase=0,poolsize=50,ssl=false,writeBuffer=10240,prefix=cache:", + "Session": "127.0.0.1:6379,defaultDatabase=0,poolsize=50,ssl=false,writeBuffer=10240,prefix=session:" + }, + //验证码配置 + "CaptchaOptions": { + "IgnoreCase": true // 比较时是否忽略大小写 + }, + //代码生成配置 + "CodeGen": { + //是否显示移动端代码生成 + "showApp": false, + //自动去除表前缀 + "autoPre": true, + //默认生成业务模块名 + "moduleName": "business", + "author": "admin", + "tablePrefix": "sys_", //"表前缀(生成类名不会包含表前缀,多个用逗号分隔)", + "vuePath": "" //前端代码存储路径eg:D:\Work\DOANAdmin-Vue3 + } +} diff --git a/DOAN.Admin.WebApi/appsettings.production.json b/DOAN.Admin.WebApi/appsettings.production.json new file mode 100644 index 0000000..8e6a43b --- /dev/null +++ b/DOAN.Admin.WebApi/appsettings.production.json @@ -0,0 +1,109 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + + + } + }, + "dbConfigs": [ + { + "Conn": "Data Source=139.224.232.211;User ID=root;Password=sw@414295;Initial Catalog=ziyuanworkstationgreen;Port=3306;SslMode=None", + "DbType": 0, //数据库类型 MySql = 0, SqlServer = 1, Oracle = 3,PgSql = 4 + "ConfigId": "0", //多租户唯一标识 + "IsAutoCloseConnection": true + } + //...下面添加更多的数据库源 + ], + //代码生成数据库配置 + "CodeGenDbConfig": { + //代码生成连接字符串,注意{dbName}为固定格式,不要填写数据库名 + "Conn": "Data Source=192.168.0.36;User ID=root;Password=123456;Initial Catalog={dbName};", + "DbType": 1, + "IsAutoCloseConnection": true, + "DbName": "DOANAdmin" //代码生成默认连接数据库,Oracle库是实例的名称 + }, + "urls": "http://localhost:8888", //项目启动url,如果改动端口前端对应devServer也需要进行修改 + "corsUrls": [ "http://localhost:8887", "http://localhost:8886" ], //跨域地址(前端启动项目,前后端分离单独部署需要设置),多个用","隔开 + "JwtSettings": { + "Issuer": "DOANAdmin.NET", //即token的签发者。 + "Audience": "DOANAdmin.NET", //指该token是服务于哪个群体的(群体范围) + "SecretKey": "SecretKey-DOANADMIN.NET-20210101", + "Expire": 1440, //jwt登录过期时间(分) + "RefreshTokenTime": 30, //分钟 + "TokenType": "Bearer" + }, + "InjectClass": [ "DOAN.Repository", "DOAN.Service", "DOAN.Tasks", "DOAN.ServiceCore" ], //自动注入类 + "ShowDbLog": true, //是否打印db日志 + "InitDb": false, //是否初始化db + "DemoMode": false, //是否演示模式 + "SingleLogin": false, //是否允许多设备/浏览器登录 + "workId": 1, //雪花id唯一数字 + "sqlExecutionTime": 5, //Sql执行时间超过多少秒记录日志并警报 + "Upload": { + "uploadUrl": "http://192.0.0.23:8888", //本地存储资源访问路径 + "localSavePath": "", //本地上传默认文件存储目录 wwwroot + "maxSize": 15, //上传文件大小限制 15M + "notAllowedExt": [ ".bat", ".exe", ".jar", ".js" ], + "requestLimitSize": 50 //请求body大小限制 + }, + //阿里云存储配置 + "ALIYUN_OSS": { + "REGIONID": "", //eg:cn-hangzhou + "KEY": "XX", + "SECRET": "XX", + "bucketName": "bucketName", + "domainUrl": "http://xxx.xxx.com", //访问资源域名 + "maxSize": 100 //上传文件大小限制 100M + }, + //企业微信通知配置 + "WxCorp": { + "AgentID": "", + "CorpID": "", + "CorpSecret": "", + "SendUser": "@all" + }, + //微信公众号设置 + "WxOpen": { + "AppID": "", + "AppSecret": "" + }, + //邮箱配置信息 + "MailOptions": { + //发件人名称 + "FromName": "system", + //发送人邮箱 + "FromEmail": "", //eg:xxxx@qq.com + //发送人邮箱密码 + "Password": "", + //协议 + "Smtp": "smtp.qq.com", + "Port": 587, + "Signature": "系统邮件,请勿回复!", + "UseSsl": true + }, + //redis服务配置 + "RedisServer": { + "open": 0, //是否启用redis + "Cache": "127.0.0.1:6379,defaultDatabase=0,poolsize=50,ssl=false,writeBuffer=10240,prefix=cache:", + "Session": "127.0.0.1:6379,defaultDatabase=0,poolsize=50,ssl=false,writeBuffer=10240,prefix=session:" + }, + //验证码配置 + "CaptchaOptions": { + "IgnoreCase": true // 比较时是否忽略大小写 + }, + //代码生成配置 + "CodeGen": { + //是否显示移动端代码生成 + "showApp": false, + //自动去除表前缀 + "autoPre": true, + //默认生成业务模块名 + "moduleName": "business", + "author": "admin", + "tablePrefix": "sys_", //"表前缀(生成类名不会包含表前缀,多个用逗号分隔)", + "vuePath": "" //前端代码存储路径eg:D:\Work\DOANAdmin-Vue3 + } +}