fix 代码生成选择上级菜单bug
This commit is contained in:
@@ -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);
|
||||
//附加参数,key,value格式
|
||||
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);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
-- 菜单
|
||||
INSERT INTO sys_menu(menuName, parentId, orderNum, path, component, isFrame, isCache, menuType, visible, status, perms, icon, create_by, create_time, remark)
|
||||
VALUES ('{FunctionName}', 0, 1, '{ModuleName}/{ModelTypeName}', '{ModuleName}/{ViewsFileName}/index', 0, 0, 'C', '0', '0', '{Permission}:list', 'icon1', '', sysdate(), '{FunctionName}菜单');
|
||||
VALUES ('{FunctionName}', {ParentId}, 1, '{ModuleName}/{ModelTypeName}', '{ModuleName}/{ViewsFileName}/index', 0, 0, 'C', '0', '0', '{Permission}:list', 'icon1', '', sysdate(), '{FunctionName}菜单');
|
||||
|
||||
-- 按钮父菜单id
|
||||
SELECT @menuId := LAST_INSERT_ID();
|
||||
|
||||
Reference in New Issue
Block a user