service3.go 566 字节
package service

import (
	permissionSrv "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/permission"
	permissionCmd "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/permission/command"
	"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
)

func getPermission(companyId int64) (*domain.Permission, error) {
	srv := &permissionSrv.PermissionService{}
	permissionData, err := srv.Get(&permissionCmd.GetPermissionCommand{
		CompanyId: companyId,
	})
	if err != nil {
		return nil, err
	}
	return permissionData, nil
}