Merge branch 'izhaorui:main' into main
This commit is contained in:
@@ -90,8 +90,11 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
|
||||
var genTableInfo = GenTableService.GetGenTableInfo(dto.TableId);
|
||||
genTableInfo.Columns = GenTableColumnService.GenTableColumns(dto.TableId);
|
||||
Dictionary<string, object> options = JsonConvert.DeserializeObject<Dictionary<string, object>>(genTableInfo.Options);
|
||||
dto.ParentMenuId = (long)options.GetValueOrDefault("parentMenuId", 0);
|
||||
if (!string.IsNullOrEmpty(genTableInfo.Options))
|
||||
{
|
||||
Dictionary<string, object> options = JsonConvert.DeserializeObject<Dictionary<string, object>>(genTableInfo.Options);
|
||||
dto.ParentMenuId = (long)options.GetValueOrDefault("parentMenuId", 0);
|
||||
}
|
||||
dto.GenTable = genTableInfo;
|
||||
//生成代码
|
||||
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);
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace ZR.Admin.WebApi.Controllers.System
|
||||
{
|
||||
string uuid = Guid.NewGuid().ToString().Replace("-", "");
|
||||
var code = SecurityCodeHelper.GetRandomEnDigitalText(4);
|
||||
var imgByte = SecurityCodeHelper.GetGifEnDigitalCodeByte(code);
|
||||
var imgByte = SecurityCodeHelper.GetEnDigitalCodeByte(code);
|
||||
string base64Str = Convert.ToBase64String(imgByte);
|
||||
CacheHelper.SetCache(uuid, code);
|
||||
var obj = new { uuid, img = base64Str };// File(stream, "image/png")
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Stage"
|
||||
"ASPNETCORE_ENVIRONMENT": ""
|
||||
},
|
||||
"applicationUrl": "https://localhost:5001;http://localhost:5000"
|
||||
}
|
||||
|
||||
@@ -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", //<2F><>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>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, //<2F>Զ<EFBFBD>ȥ<EFBFBD><C8A5><EFBFBD><EFBFBD>ǰ
|
||||
"author": "zr",
|
||||
"tablePrefix": "live_,sys_" //"<22><>ǰ<C7B0><D7BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<C7B0><D7BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ö<EFBFBD><C3B6>ŷָ<C5B7><D6B8><EFBFBD>",
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace {ApiControllerNamespace}.Controllers
|
||||
//开始拼装查询条件
|
||||
var predicate = Expressionable.Create<{ModelName}>();
|
||||
|
||||
//TODO 搜索条件
|
||||
//TODO 自己实现搜索条件查询语法参考Sqlsugar,默认查询所有
|
||||
//predicate = predicate.And(m => m.Name.Contains(parm.Name));
|
||||
|
||||
var response = _{ModelName}Service.GetPages(predicate.ToExpression(), parm);
|
||||
|
||||
Reference in New Issue
Block a user