|
@@ -185,6 +185,9 @@ func (repository *RoleRepository) Find(queryOptions map[string]interface{}) (int |
|
@@ -185,6 +185,9 @@ func (repository *RoleRepository) Find(queryOptions map[string]interface{}) (int |
185
|
if orgName, ok := queryOptions["orgName"]; ok && len(orgName.(string)) > 0 {
|
185
|
if orgName, ok := queryOptions["orgName"]; ok && len(orgName.(string)) > 0 {
|
186
|
query.Where(fmt.Sprintf("ext->>'orgName' like '%%%v%%'", orgName))
|
186
|
query.Where(fmt.Sprintf("ext->>'orgName' like '%%%v%%'", orgName))
|
187
|
}
|
187
|
}
|
|
|
188
|
+ if matchRoleName, ok := queryOptions["matchRoleName"]; ok && len(matchRoleName.(string)) > 0 {
|
|
|
189
|
+ query.Where(fmt.Sprintf("role_name like '%%%v%%'", matchRoleName))
|
|
|
190
|
+ }
|
188
|
// 包含删除的
|
191
|
// 包含删除的
|
189
|
if v, ok := queryOptions["includeDeleted"]; ok && !(v.(bool)) {
|
192
|
if v, ok := queryOptions["includeDeleted"]; ok && !(v.(bool)) {
|
190
|
query.Where("deleted_at is null")
|
193
|
query.Where("deleted_at is null")
|