@@ -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)
@@ -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)
@@ -815,7 +815,7 @@ func (s *sysUser) GetDataWhere(userInfo *dao.CtxUser, entity interface{}) (where
return
- var dList g.ListStrAny
+ var dList g.List
for _, d := range depts {
m := g.Map{
"id": d.DeptId,