sys_dept.go 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // ================================================================================
  2. // Code generated by GoFrame CLI tool. DO NOT EDIT.
  3. // You can delete these comments if you wish manually maintain this interface file.
  4. // ================================================================================
  5. package service
  6. import (
  7. "context"
  8. "github.com/tiger1103/gfast/v3/api/v1/system"
  9. "github.com/tiger1103/gfast/v3/internal/app/system/model"
  10. "github.com/tiger1103/gfast/v3/internal/app/system/model/entity"
  11. )
  12. type ISysDept interface {
  13. GetList(ctx context.Context, req *system.DeptSearchReq) (list []*entity.SysDept, err error)
  14. GetFromCache(ctx context.Context) (list []*entity.SysDept, err error)
  15. Add(ctx context.Context, req *system.DeptAddReq) (err error)
  16. Edit(ctx context.Context, req *system.DeptEditReq) (err error)
  17. Delete(ctx context.Context, id uint64) (err error)
  18. FindSonByParentId(deptList []*entity.SysDept, deptId uint64) []*entity.SysDept
  19. GetListTree(pid uint64, list []*entity.SysDept) (deptTree []*model.SysDeptTreeRes)
  20. GetByDeptId(ctx context.Context, deptId uint64) (dept *entity.SysDept, err error)
  21. }
  22. var localSysDept ISysDept
  23. func SysDept() ISysDept {
  24. if localSysDept == nil {
  25. panic("implement not found for interface ISysDept, forgot register?")
  26. }
  27. return localSysDept
  28. }
  29. func RegisterSysDept(i ISysDept) {
  30. localSysDept = i
  31. }