diff --git a/ZR.Admin.WebApi/Controllers/CodeGeneratorController.cs b/ZR.Admin.WebApi/Controllers/CodeGeneratorController.cs index cb778a8..e503f8e 100644 --- a/ZR.Admin.WebApi/Controllers/CodeGeneratorController.cs +++ b/ZR.Admin.WebApi/Controllers/CodeGeneratorController.cs @@ -90,8 +90,11 @@ namespace ZR.Admin.WebApi.Controllers var genTableInfo = GenTableService.GetGenTableInfo(dto.TableId); genTableInfo.Columns = GenTableColumnService.GenTableColumns(dto.TableId); - Dictionary options = JsonConvert.DeserializeObject>(genTableInfo.Options); - dto.ParentMenuId = (long)options.GetValueOrDefault("parentMenuId", 0); + if (!string.IsNullOrEmpty(genTableInfo.Options)) + { + Dictionary options = JsonConvert.DeserializeObject>(genTableInfo.Options); + dto.ParentMenuId = (long)options.GetValueOrDefault("parentMenuId", 0); + } dto.GenTable = genTableInfo; //鐢熸垚浠g爜 CodeGeneratorTool.Generate(genTableInfo, dto); @@ -176,9 +179,9 @@ namespace ZR.Admin.WebApi.Controllers ClassName = CodeGeneratorTool.GetClassName(tableName), BusinessName = CodeGeneratorTool.GetClassName(tableName), FunctionAuthor = ConfigUtils.Instance.GetConfig(GenConstants.Gen_author), - FunctionName = tabInfo.Description, + FunctionName = string.IsNullOrEmpty(tabInfo.Description) ? tableName : tabInfo.Description, TableName = tableName, - TableComment = tabInfo.Description, + TableComment = string.IsNullOrEmpty(tabInfo.Description) ? tableName : tabInfo.Description, Create_by = userName, }; genTable.TableId = GenTableService.ImportGenTable(genTable); diff --git a/ZR.Admin.WebApi/Properties/launchSettings.json b/ZR.Admin.WebApi/Properties/launchSettings.json index c5c2293..365059a 100644 --- a/ZR.Admin.WebApi/Properties/launchSettings.json +++ b/ZR.Admin.WebApi/Properties/launchSettings.json @@ -19,7 +19,7 @@ "commandName": "Project", "launchBrowser": true, "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Stage" + "ASPNETCORE_ENVIRONMENT": "" }, "applicationUrl": "https://localhost:5001;http://localhost:5000" } diff --git a/ZR.Admin.WebApi/appsettings.json b/ZR.Admin.WebApi/appsettings.json index 51eede7..8b29429 100644 --- a/ZR.Admin.WebApi/appsettings.json +++ b/ZR.Admin.WebApi/appsettings.json @@ -7,11 +7,11 @@ } }, "ConnectionStrings": { - "conn_zrAdmin": "server=127.0.0.1;user=zr;pwd=abc;database=admin", - "conn_bus": "server=127.0.0.1;user=zr;pwd=abc;database=admin" + "conn_zrAdmin": "server=LAPTOP-STKF2M8H\\SQLEXPRESS;uid=sa;pwd=zradmin123;database=ZrAdmin;Trusted_Connection=SSPI", + "conn_bus": "server=LAPTOP-STKF2M8H\\SQLEXPRESS;uid=zr;pwd=zradmin123;database=ZrAdmin;Trusted_Connection=SSPI" }, - "conn_zrAdmin_type": 0, //MySql = 0, SqlServer = 1 - "conn_bus_type": 0, + "conn_zrAdmin_type": 1, //MySql = 0, SqlServer = 1 + "conn_bus_type": 1, "urls": "http://localhost:8888", //项目启动url "sysConfig": { "DBCommandTimeout": 10, @@ -30,8 +30,8 @@ "SECRET": "XX" }, "gen": { - "conn": "server=127.0.0.1;user=zr;pwd=abc;database={database}", - "dbType": 0, //MySql = 0, SqlServer = 1 + "conn": "server=LAPTOP-STKF2M8H\\SQLEXPRESS;user=zr;pwd=abc;database={database};Trusted_Connection=SSPI", + "dbType": 1, //MySql = 0, SqlServer = 1 "autoPre": true, //自动去除表前缀 "author": "zr", "tablePrefix": "live_,sys_" //"表前缀(生成类名不会包含表前缀,多个用逗号分隔)", diff --git a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/ControllersTemplate.txt b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/ControllersTemplate.txt index 97bb3b0..27824d5 100644 --- a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/ControllersTemplate.txt +++ b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/ControllersTemplate.txt @@ -49,7 +49,7 @@ namespace {ApiControllerNamespace}.Controllers //寮濮嬫嫾瑁呮煡璇㈡潯浠 var predicate = Expressionable.Create<{ModelName}>(); - //TODO 鎼滅储鏉′欢 + //TODO 鑷繁瀹炵幇鎼滅储鏉′欢鏌ヨ璇硶鍙傝僑qlsugar锛岄粯璁ゆ煡璇㈡墍鏈 //predicate = predicate.And(m => m.Name.Contains(parm.Name)); var response = _{ModelName}Service.GetPages(predicate.ToExpression(), parm); diff --git a/ZR.Vue/src/views/system/notice/index.vue b/ZR.Vue/src/views/system/notice/index.vue index 3160e37..a2e73b4 100644 --- a/ZR.Vue/src/views/system/notice/index.vue +++ b/ZR.Vue/src/views/system/notice/index.vue @@ -2,31 +2,14 @@
- + - + - + @@ -37,33 +20,15 @@ - 鏂板 + 鏂板 - 淇敼 + 淇敼 + - 鍒犻櫎 + 鍒犻櫎 + @@ -71,26 +36,9 @@ - - - + + + \ No newline at end of file diff --git a/ZR.Vue/src/views/tool/email/sendEmail.vue b/ZR.Vue/src/views/tool/email/sendEmail.vue index 684de53..aa5413b 100644 --- a/ZR.Vue/src/views/tool/email/sendEmail.vue +++ b/ZR.Vue/src/views/tool/email/sendEmail.vue @@ -9,11 +9,12 @@ - + - + 閫夋嫨鏂囦欢 涓婁紶鍒版湇鍔″櫒 @@ -27,9 +28,11 @@