Ver Fonte

细节修复

yxh há 4 anos atrás
pai
commit
d2b49a636f

+ 1 - 1
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)

+ 1 - 1
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)

+ 1 - 1
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,