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..8835dc6 100644 --- a/app/system/service/sys_dict_type.go +++ b/app/system/service/sys_dict_type.go @@ -7,6 +7,7 @@ import ( comService "gfast/app/common/service" "gfast/app/system/dao" "gfast/app/system/model" + "github.com/gogf/gf/container/garray" "github.com/gogf/gf/database/gdb" "github.com/gogf/gf/errors/gerror" @@ -101,7 +102,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/tools_gen_table.go b/app/system/service/tools_gen_table.go index bc871a0..2c7a13d 100644 --- a/app/system/service/tools_gen_table.go +++ b/app/system/service/tools_gen_table.go @@ -17,6 +17,10 @@ import ( comService "gfast/app/common/service" "gfast/app/system/dao" "gfast/app/system/model" + "io" + "os" + "strings" + "github.com/gogf/gf/database/gdb" "github.com/gogf/gf/encoding/gjson" "github.com/gogf/gf/errors/gerror" @@ -27,9 +31,6 @@ import ( "github.com/gogf/gf/text/gregex" "github.com/gogf/gf/text/gstr" "github.com/gogf/gf/util/gconv" - "io" - "os" - "strings" ) type toolsGenTable struct{}