mirror of https://gitee.com/stylefeng/roses
修复分组搜索bug
parent
2717aa24c7
commit
93deb10413
|
@ -28,9 +28,15 @@
|
||||||
LEFT JOIN sys_resource sr ON ar.resource_code = sr.resource_code
|
LEFT JOIN sys_resource sr ON ar.resource_code = sr.resource_code
|
||||||
WHERE
|
WHERE
|
||||||
1 = 1
|
1 = 1
|
||||||
|
OR ag.group_pid = -1
|
||||||
<if test="paramCondition.groupName != null and paramCondition.groupName != ''">
|
<if test="paramCondition.groupName != null and paramCondition.groupName != ''">
|
||||||
AND ar.api_alias LIKE CONCAT('%', #{paramCondition.groupName}, '%')
|
AND ar.api_alias LIKE CONCAT('%', #{paramCondition.groupName}, '%')
|
||||||
OR sr.url LIKE CONCAT('%', #{paramCondition.groupName}, '%')
|
OR sr.url LIKE CONCAT('%', #{paramCondition.groupName}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="paramCondition.groupId != null">
|
||||||
|
AND ag.group_pids NOT LIKE CONCAT('%[', #{paramCondition.groupId}, ']%')
|
||||||
|
AND ag.group_id != #{paramCondition.groupId}
|
||||||
|
</if>
|
||||||
|
GROUP BY ag.group_id
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
|
@ -183,12 +183,6 @@ public class ApiGroupServiceImpl extends ServiceImpl<ApiGroupMapper, ApiGroup> i
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询所有分组
|
// 查询所有分组
|
||||||
LambdaQueryWrapper<ApiGroup> wrapper = new LambdaQueryWrapper<>();
|
|
||||||
if (ObjectUtil.isNotEmpty(apiGroupRequest.getGroupId())) {
|
|
||||||
wrapper.notLike(ApiGroup::getGroupPids, SymbolConstant.LEFT_SQUARE_BRACKETS + apiGroupRequest.getGroupId() + SymbolConstant.RIGHT_SQUARE_BRACKETS);
|
|
||||||
wrapper.ne(ApiGroup::getGroupId, apiGroupRequest.getGroupId());
|
|
||||||
}
|
|
||||||
|
|
||||||
List<ApiGroup> apiGroups = this.dataList(apiGroupRequest);
|
List<ApiGroup> apiGroups = this.dataList(apiGroupRequest);
|
||||||
if (ObjectUtil.isNotEmpty(apiGroups)) {
|
if (ObjectUtil.isNotEmpty(apiGroups)) {
|
||||||
for (ApiGroup apiGroup : apiGroups) {
|
for (ApiGroup apiGroup : apiGroups) {
|
||||||
|
|
Loading…
Reference in New Issue