xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/service/impl/XpOperationsUserServiceImpl.java
@@ -203,7 +203,7 @@ .in(XpOperationsRole::getOperationsUserId, operationsUserIds)); if(!CollectionUtils.isEmpty(xpOperationsRoles)){ List<Long> roleIds = xpOperationsRoles.stream().map(XpOperationsRole::getRoleId).collect(Collectors.toList()); List<Long> roleIds = xpOperationsRoles.stream().map(XpOperationsRole::getRoleId).distinct().collect(Collectors.toList()); // 查询列表关联的所有角色 List<SysRole> sysRoles = sysRoleMapper.selectList(Wrappers.lambdaQuery(SysRole.class) .in(SysRole::getId, roleIds)); xp-robotaxi-account-boot/src/main/resources/mapper/account/XpOperationsUserMapper.xml
@@ -40,9 +40,9 @@ and xou.phone_number like concat('%',#{query.phoneNumber},'%') </if> <if test="query.roleId != null"> AND EXISTS (SELECT 1 FROM xp_operations_role xor WHERE xor.operations_user_id = xou.id AND xor.role_id = #{query.roleId}) AND EXISTS (SELECT 1 FROM xp_operations_role xore WHERE xore.operations_user_id = xou.id AND xore.role_id = #{query.roleId}) </if> <if test="query.status != null"> and xou.status = #{query.status}