You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.5 KiB
35 lines
1.5 KiB
package BaseRoleService
|
|
|
|
import (
|
|
"dsBaseWeb/Business/BaseRole/BaseRoleProto"
|
|
"strings"
|
|
)
|
|
|
|
func PageBaseRoleInfo(appId string, identityId int32, page int32, limit int32) (*BaseRoleProto.Reply, error) {
|
|
Reply, err := PageBaseRole(BaseRoleProto.QueryArg{AppId: appId, IdentityId: identityId, Page: page, Limit: limit})
|
|
return Reply, err
|
|
}
|
|
|
|
func GetBaseRoleInfo(roleId string) (*BaseRoleProto.Reply, error) {
|
|
Reply, err := GetBaseRole(BaseRoleProto.ModelArg{RoleId: roleId})
|
|
return Reply, err
|
|
}
|
|
|
|
func AddBaseRoleInfo(roleName string, roleCode string, identityId int32, roleLevel int32, appIds string, sortId int32) (*BaseRoleProto.Reply, error) {
|
|
idsArr := strings.Split(appIds, ",")
|
|
Reply, err := AddBaseRole(BaseRoleProto.ModelArg{RoleName: roleName, RoleCode: roleCode, IdentityId: identityId, RoleLevel: roleLevel, AppIds: idsArr, SortId: sortId})
|
|
return Reply, err
|
|
}
|
|
|
|
func DeleteBaseRoleInfo(ids string) (*BaseRoleProto.Reply, error) {
|
|
idsArr := strings.Split(ids, ",")
|
|
Reply, err := DeleteBaseRole(BaseRoleProto.DeleteIdsArg{Ids: idsArr})
|
|
return Reply, err
|
|
}
|
|
|
|
func UpdateBaseRoleInfo(roleId string, roleName string, roleCode string, identityId int32, roleLevel int32, appIds string, sortId int32) (*BaseRoleProto.Reply, error) {
|
|
idsArr := strings.Split(appIds, ",")
|
|
Reply, err := UpdateBaseRole(BaseRoleProto.ModelArg{RoleId: roleId, RoleName: roleName, RoleCode: roleCode, IdentityId: identityId, RoleLevel: roleLevel, AppIds: idsArr, SortId: sortId})
|
|
return Reply, err
|
|
}
|