fix 代码生成选择上级菜单bug

This commit is contained in:
不做码农
2021-11-28 17:40:43 +08:00
parent 81a91f13b6
commit aaff546de4
8 changed files with 28 additions and 16 deletions

View File

@@ -231,7 +231,7 @@ namespace ZR.Admin.WebApi.Controllers
}
/// <summary>
/// 生成代码
/// 生成代码(下载方式)
/// </summary>
/// <param name="dto">数据传输对象</param>
/// <returns></returns>
@@ -249,12 +249,7 @@ namespace ZR.Admin.WebApi.Controllers
var genTableInfo = GenTableService.GetGenTableInfo(dto.TableId);
genTableInfo.Columns = GenTableColumnService.GenTableColumns(dto.TableId);
//附加参数keyvalue格式
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);