diff --git a/config/db.sql b/config/db.sql index e0c19ff..782954d 100644 --- a/config/db.sql +++ b/config/db.sql @@ -92,11 +92,11 @@ INSERT INTO `casbin_rule`(`p_type`, `v0`, `v1`, `v2`, `v3`, `v4`, `v5`) VALUES ( COMMIT; BEGIN; -INSERT INTO `sys_dept`(`dept_id`, `parent_id`, `dept_path`, `dept_name`, `sort`, `leader`, `phone`, `email`, `status`, `create_by`, `update_by`) VALUES (1, 0, '/0/1', '磊哥科技', 0, null, '', 'lanyulei@fdevops.com', 0, '1', '1'); -INSERT INTO `sys_dept`(`dept_id`, `parent_id`, `dept_path`, `dept_name`, `sort`, `leader`, `phone`, `email`, `status`, `create_by`, `update_by`) VALUES (7, 1, '/0/1/7', '研发部', 1, null, '', '', 0, '1', '1'); -INSERT INTO `sys_dept`(`dept_id`, `parent_id`, `dept_path`, `dept_name`, `sort`, `leader`, `phone`, `email`, `status`, `create_by`, `update_by`) VALUES (8, 1, '/0/1/8', '运维部', 0, null, '', '', 0, '1', NULL); -INSERT INTO `sys_dept`(`dept_id`, `parent_id`, `dept_path`, `dept_name`, `sort`, `leader`, `phone`, `email`, `status`, `create_by`, `update_by`) VALUES (9, 1, '/0/1/9', '客服部', 0, null, '', '', 0, '1', NULL); -INSERT INTO `sys_dept`(`dept_id`, `parent_id`, `dept_path`, `dept_name`, `sort`, `leader`, `phone`, `email`, `status`, `create_by`, `update_by`) VALUES (10, 1, '/0/1/10', '人力资源', 3, null, '', '', 1, '1', '1'); +INSERT INTO `sys_dept`(`dept_id`, `parent_id`, `dept_path`, `dept_name`, `sort`, `leader`, `phone`, `email`, `status`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (1, 0, '/0/1', '磊哥科技', 0, null, '', 'lanyulei@fdevops.com', 0, '1', '1', '2021-02-24 21:30:59', '2021-02-24 21:30:59'); +INSERT INTO `sys_dept`(`dept_id`, `parent_id`, `dept_path`, `dept_name`, `sort`, `leader`, `phone`, `email`, `status`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (7, 1, '/0/1/7', '研发部', 1, null, '', '', 0, '1', '1', '2021-02-24 21:30:59', '2021-02-24 21:30:59'); +INSERT INTO `sys_dept`(`dept_id`, `parent_id`, `dept_path`, `dept_name`, `sort`, `leader`, `phone`, `email`, `status`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (8, 1, '/0/1/8', '运维部', 0, null, '', '', 0, '1', NULL, '2021-02-24 21:30:59', '2021-02-24 21:30:59'); +INSERT INTO `sys_dept`(`dept_id`, `parent_id`, `dept_path`, `dept_name`, `sort`, `leader`, `phone`, `email`, `status`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (9, 1, '/0/1/9', '客服部', 0, null, '', '', 0, '1', NULL, '2021-02-24 21:30:59', '2021-02-24 21:30:59'); +INSERT INTO `sys_dept`(`dept_id`, `parent_id`, `dept_path`, `dept_name`, `sort`, `leader`, `phone`, `email`, `status`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (10, 1, '/0/1/10', '人力资源', 3, null, '', '', 1, '1', '1', '2021-02-24 21:30:59', '2021-02-24 21:30:59'); COMMIT; BEGIN; diff --git a/models/system/dept.go b/models/system/dept.go index 455f004..dde27d7 100644 --- a/models/system/dept.go +++ b/models/system/dept.go @@ -158,6 +158,8 @@ func Digui(deptlist *[]Dept, menu Dept) Dept { mi.Phone = list[j].Phone mi.Email = list[j].Email mi.Status = list[j].Status + mi.CreatedAt = list[j].CreatedAt + mi.UpdatedAt = list[j].UpdatedAt mi.Children = []Dept{} ms := Digui(deptlist, mi) min = append(min, ms) diff --git a/models/system/menu.go b/models/system/menu.go index fbb3722..495492a 100644 --- a/models/system/menu.go +++ b/models/system/menu.go @@ -130,6 +130,8 @@ func DiguiMenu(menulist *[]Menu, menu Menu) Menu { mi.Component = list[j].Component mi.Sort = list[j].Sort mi.Visible = list[j].Visible + mi.CreatedAt = list[j].CreatedAt + mi.UpdatedAt = list[j].UpdatedAt mi.Children = []Menu{} if mi.MenuType != "F" {