This repository has been archived on 2024-11-28. You can view files and clone it, but cannot push or open issues or pull requests.
Files
schisandra-cloud-album/service/role_service/role_service.go
2024-08-14 00:11:32 +08:00

16 lines
388 B
Go

package role_service
import (
"schisandra-cloud-album/global"
"schisandra-cloud-album/model"
)
// GetRoleById : 通过Id获取角色信息
func (RoleService) GetRoleById(id int64) (model.ScaAuthRole, error) {
var role model.ScaAuthRole
if err := global.DB.Where("id = ? and deleted = 0", id).First(&role).Error; err != nil {
return model.ScaAuthRole{}, err
}
return role, nil
}