From 206eb8ddd98e0b963bc39b61bba338145027a20f Mon Sep 17 00:00:00 2001 From: "Mr. Lan" Date: Wed, 24 Feb 2021 21:41:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=83=A8=E9=97=A8?= =?UTF-8?q?=E6=A0=91=E5=92=8C=E8=8F=9C=E5=8D=95=E6=A0=91=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E9=97=AE=E9=A2=98=EF=BC=8Cfixes=20#132?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/db.sql | 10 +++++----- models/system/dept.go | 2 ++ models/system/menu.go | 2 ++ 3 files changed, 9 insertions(+), 5 deletions(-) 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" {