diff --git a/app/system/service/sys_dept.go b/app/system/service/sys_dept.go index 61ba8a2..e697bf9 100644 --- a/app/system/service/sys_dept.go +++ b/app/system/service/sys_dept.go @@ -68,7 +68,7 @@ func (s *dept) GetDeptListTree(pid int64, list []*model.SysDept) []*dao.SysDeptT SysDept: v, } child := s.GetDeptListTree(v.DeptId, list) - if child != nil && len(child) > 0 { + if len(child) > 0 { t.Children = child } tree = append(tree, t) diff --git a/app/system/service/sys_dict_type.go b/app/system/service/sys_dict_type.go index b8fdcdb..1f0fc97 100644 --- a/app/system/service/sys_dict_type.go +++ b/app/system/service/sys_dict_type.go @@ -101,7 +101,7 @@ func (s *sysDictType) Edit(ctx context.Context, req *model.SysDictTypeEditReq) e //修改字段数据的类型 _, err = dao.SysDictData.TX(tx).Data(g.Map{dao.SysDictData.Columns.DictType: req.DictType}). Where(dao.SysDictData.Columns.DictType, dt.DictType).Update() - return nil + return err }) if err != nil { g.Log().Debug(err) diff --git a/app/system/service/sys_user.go b/app/system/service/sys_user.go index d79cecf..73609aa 100644 --- a/app/system/service/sys_user.go +++ b/app/system/service/sys_user.go @@ -815,7 +815,7 @@ func (s *sysUser) GetDataWhere(userInfo *dao.CtxUser, entity interface{}) (where if err != nil { return } - var dList g.ListStrAny + var dList g.List for _, d := range depts { m := g.Map{ "id": d.DeptId,