app_permit_service.go 675 B

1234567891011121314151617181920212223242526272829
  1. package system
  2. import (
  3. "xps/datasource"
  4. "xps/repositories/system"
  5. "xps/viewmodels"
  6. )
  7. // AppPermit interface
  8. type AppPermitService interface {
  9. GetByList(appKey string, roleId int64, keywords string) []viewmodels.AppPermitInfo
  10. }
  11. // AppPermitService data struct definition
  12. type appPermitService struct {
  13. repo *system.AppPermitRepo
  14. }
  15. // Create Instance
  16. func NewAppPermitService() AppPermitService {
  17. return &appPermitService{
  18. repo: system.NewAppPermitRepo(datasource.InstanceMaster()),
  19. }
  20. }
  21. // GetAll
  22. func (s *appPermitService) GetByList(appKey string, roleId int64, keywords string) []viewmodels.AppPermitInfo {
  23. return s.repo.GetByList(appKey, roleId, keywords)
  24. }