代码生成

master
xiaochanghai 1 year ago
parent 37ebb4a1f0
commit bc5acd7a7c
  1. 4
      Tiobon.CodeGenerator/Program.cs
  2. 68
      Tiobon.CodeGenerator/appsettings.json

@ -32,10 +32,10 @@ class Program
var basePath = AppContext.BaseDirectory; var basePath = AppContext.BaseDirectory;
IServiceCollection services = new ServiceCollection(); IServiceCollection services = new ServiceCollection();
services.AddAutoMapperSetup();
services.AddSimpleDapperSetup();
services.AddSingleton(new AppSettings(basePath)); services.AddSingleton(new AppSettings(basePath));
services.AddAutoMapperSetup();
services.AddSimpleDapperSetup();
services.AddScoped<DBSeed>(); services.AddScoped<DBSeed>();
services.AddScoped<MyContext>(); services.AddScoped<MyContext>();
services.AddSqlsugarSetup(); services.AddSqlsugarSetup();

@ -33,13 +33,13 @@
"Kafka": { "Kafka": {
"Enabled": false, "Enabled": false,
"Servers": "localhost:9092", "Servers": "localhost:9092",
"Topic": "EU", "Topic": "Tiobon",
"GroupId": "EU-consumer", "GroupId": "Tiobon-consumer",
"NumPartitions": 3 // "NumPartitions": 3 //
}, },
"EventBus": { "EventBus": {
"Enabled": false, "Enabled": false,
"SubscriptionClientName": "EU.Core" "SubscriptionClientName": "Tiobon.Core"
}, },
"AppSettings": { "AppSettings": {
"CachingAOP": { "CachingAOP": {
@ -76,8 +76,8 @@
"Date": "2018-08-28", "Date": "2018-08-28",
"SeedDBEnabled": false, // "SeedDBEnabled": false, //
"SeedDBDataEnabled": false, //, "SeedDBDataEnabled": false, //,
"Author": "EU.Core", "Author": "Tiobon.Core",
"SvcName": "", // /svc/EU "SvcName": "", // /svc/Tiobon
"UseLoadTest": false "UseLoadTest": false
}, },
@ -91,7 +91,7 @@
//ConnIdConnId+,ConnIdMain,ConnIdMian1 //ConnIdConnId+,ConnIdMain,ConnIdMian1
//! //!
//, //,
"MainDB": "WMEU_MSSQL_Main", //Enabledtrue "MainDB": "WMTiobon_MSSQL_Main", //Enabledtrue
"DBS": [ "DBS": [
/* /*
DBType DBType
@ -104,21 +104,22 @@
Kdbndp = 6,// Kdbndp = 6,//
*/ */
{ {
"ConnId": "WMEU_MSSQL_Main", "ConnId": "WMTiobon_MSSQL_Main",
"DBType": 1, "DBType": 1,
"Enabled": true, "Enabled": true,
"Connection": "Data Source=116.204.98.209;User ID=eu_cloud;Password=qazWESDR,!@#288268;Database=EU_Cloud;Encrypt=True;TrustServerCertificate=True;", "Connection": "Data Source=47.99.54.186;User ID=GHR;Password=Tiobon20190101;Database=GHR30;Encrypt=True;TrustServerCertificate=True;",
//"Connection": "Data Source=116.204.98.209;User ID=Tiobon;Password=&($!4UGUyU#$2sp9O;Database=Tiobon;Encrypt=True;TrustServerCertificate=True;",
"ProviderName": "System.Data.SqlClient" "ProviderName": "System.Data.SqlClient"
}, },
{ {
"ConnId": "Main", "ConnId": "Main",
"DBType": 2, "DBType": 2,
"Enabled": false, "Enabled": false,
"Connection": "WMEU.db", //sqlite "Connection": "WMTiobon.db", //sqlite
"Slaves": [ "Slaves": [
{ {
"HitRate": 0, // 0使 "HitRate": 0, // 0使
"Connection": "WMEU2.db" "Connection": "WMTiobon2.db"
} }
] ]
}, },
@ -126,11 +127,11 @@
"ConnId": "Main2", "ConnId": "Main2",
"DBType": 2, "DBType": 2,
"Enabled": false, "Enabled": false,
"Connection": "WMEU3.db", //sqlite "Connection": "WMTiobon3.db", //sqlite
"Slaves": [ "Slaves": [
{ {
"HitRate": 0, // 0使 "HitRate": 0, // 0使
"Connection": "WMEU4.db" "Connection": "WMTiobon4.db"
} }
] ]
}, },
@ -139,49 +140,49 @@
"DBType": 1, "DBType": 1,
"Enabled": true, "Enabled": true,
"HitRate": 50, "HitRate": 50,
"Connection": "Data Source=116.204.98.209;User ID=EU;Password=&($!4UGUyU#$2sp9O;Database=EU;Encrypt=True;TrustServerCertificate=True;", "Connection": "Data Source=47.99.54.186;User ID=GHR;Password=Tiobon20190101;Database=GHR30;Encrypt=True;TrustServerCertificate=True;",
"ProviderName": "System.Data.SqlClient" "ProviderName": "System.Data.SqlClient"
}, },
{ {
"ConnId": "WMEU_MSSQL_1", "ConnId": "WMTiobon_MSSQL_1",
"DBType": 1, "DBType": 1,
"Enabled": false, "Enabled": false,
"Connection": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=WMEU_MSSQL_1;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", "Connection": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=WMTiobon_MSSQL_1;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
"ProviderName": "System.Data.SqlClient" "ProviderName": "System.Data.SqlClient"
}, },
{ {
"ConnId": "WMEU_MSSQL_2", "ConnId": "WMTiobon_MSSQL_2",
"DBType": 1, "DBType": 1,
"Enabled": false, "Enabled": false,
"Connection": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=WMEU_MSSQL_2;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", "Connection": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=WMTiobon_MSSQL_2;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
"ProviderName": "System.Data.SqlClient" "ProviderName": "System.Data.SqlClient"
}, },
{ {
"ConnId": "WMEU_MYSQL", "ConnId": "WMTiobon_MYSQL",
"DBType": 0, "DBType": 0,
"Enabled": false, "Enabled": false,
"Connection": "server=localhost;Database=EU;Uid=root;Pwd=root;Port=3306;Allow User Variables=True;" "Connection": "server=localhost;Database=Tiobon;Uid=root;Pwd=root;Port=3306;Allow User Variables=True;"
}, },
{ {
"ConnId": "WMEU_MYSQL_2", "ConnId": "WMTiobon_MYSQL_2",
"DBType": 0, "DBType": 0,
"Enabled": false, "Enabled": false,
"Connection": "server=localhost;Database=EUcore001;Uid=root;Pwd=root;Port=3306;Allow User Variables=True;" "Connection": "server=localhost;Database=Tioboncore001;Uid=root;Pwd=root;Port=3306;Allow User Variables=True;"
}, },
{ {
"ConnId": "WMEU_ORACLE", "ConnId": "WMTiobon_ORACLE",
"DBType": 3, "DBType": 3,
"Enabled": false, "Enabled": false,
"Connection": "Data Source=127.0.0.1/ops;User ID=OPS;Password=123456;Persist Security Info=True;Connection Timeout=60;" "Connection": "Data Source=127.0.0.1/ops;User ID=OPS;Password=123456;Persist Security Info=True;Connection Timeout=60;"
}, },
{ {
"ConnId": "WMEU_DM", "ConnId": "WMTiobon_DM",
"DBType": 5, "DBType": 5,
"Enabled": false, "Enabled": false,
"Connection": "Server=xxxxx:5236;User Id=xxxxx;PWD=xxxxx;SCHEMA=TESTDBA;" "Connection": "Server=xxxxx:5236;User Id=xxxxx;PWD=xxxxx;SCHEMA=TESTDBA;"
}, },
{ {
"ConnId": "WMEU_KDBNDP", "ConnId": "WMTiobon_KDBNDP",
"DBType": 6, "DBType": 6,
"Enabled": false, "Enabled": false,
"Connection": "Server=127.0.0.1;Port=54321;UID=SYSTEM;PWD=system;database=SQLSUGAR4XTEST1;" "Connection": "Server=127.0.0.1;Port=54321;UID=SYSTEM;PWD=system;database=SQLSUGAR4XTEST1;"
@ -189,13 +190,14 @@
], ],
"Audience": { "Audience": {
"Secret": "sdfsdfsrty45634kkhllghtdgdfss345t678fs", //16+ "Secret": "sdfsdfsrty45634kkhllghtdgdfss345t678fs", //16+
"SecretFile": "C:\\my-file\\EU.core.audience.secret.txt", //Secret "SecretFile": "C:\\my-file\\Tiobon.core.audience.secret.txt", //Secret
"Issuer": "EU.Core", // "Issuer": "Tiobon.Core", //
"Audience": "wr" // "Audience": "wr", //
"ExpirationHour": 72 //
}, },
"Mongo": { "Mongo": {
"ConnectionString": "mongodb://nosql.data", "ConnectionString": "mongodb://nosql.data",
"Database": "EUCoreDb" "Database": "TiobonCoreDb"
}, },
"Startup": { "Startup": {
"Domain": "http://localhost:9291", "Domain": "http://localhost:9291",
@ -212,7 +214,7 @@
"IdentityServer4": { "IdentityServer4": {
"Enabled": false, // false使jwttrue使Ids4 "Enabled": false, // false使jwttrue使Ids4
"AuthorizationUrl": "http://localhost:5004", // "AuthorizationUrl": "http://localhost:5004", //
"ApiName": "EU.core.api" // "ApiName": "Tiobon.core.api" //
}, },
"Authing": { "Authing": {
"Enabled": false, "Enabled": false,
@ -305,7 +307,7 @@
"HttpStatusCode": 429, // "HttpStatusCode": 429, //
"GeneralRules": [ //api,* "GeneralRules": [ //api,*
{ {
"Endpoint": "*:/api/EU*", "Endpoint": "*:/api/Tiobon*",
"Period": "1m", "Period": "1m",
"Limit": 20 "Limit": 20
}, },
@ -328,7 +330,7 @@
}, },
"ConsulSetting": { "ConsulSetting": {
"ServiceName": "EUCoreService", "ServiceName": "TiobonCoreService",
"ServiceIP": "localhost", "ServiceIP": "localhost",
"ServicePort": "9291", "ServicePort": "9291",
"ServiceHealthCheck": "/healthcheck", "ServiceHealthCheck": "/healthcheck",
@ -348,7 +350,7 @@
"DefaultTimeOut": 15000, // "DefaultTimeOut": 15000, //
"Namespace": "public", // "Namespace": "public", //
"ListenInterval": 10000, // "ListenInterval": 10000, //
"ServiceName": "EU.Core.Api", // "ServiceName": "Tiobon.Core.Api", //
"Port": "9291", // "Port": "9291", //
"RegisterEnabled": true // nacos "RegisterEnabled": true // nacos
}, },
@ -358,7 +360,7 @@
"ConfigsInfo": [ // elk "ConfigsInfo": [ // elk
{ {
"FiedName": "applicationName", "FiedName": "applicationName",
"FiedValue": "EU.Core.Api" "FiedValue": "Tiobon.Core.Api"
} }
] ]
}, },

Loading…
Cancel
Save