修复转发管理隧道下拉顺序不同步

This commit is contained in:
root
2026-02-02 06:28:45 +00:00
parent 0f57ec58b3
commit 7ca01aba5d
@@ -597,7 +597,10 @@ public class TunnelServiceImpl extends ServiceImpl<TunnelMapper, Tunnel> impleme
Integer roleId = JwtUtil.getRoleIdFromToken(); Integer roleId = JwtUtil.getRoleIdFromToken();
Integer userId = JwtUtil.getUserIdFromToken(); Integer userId = JwtUtil.getUserIdFromToken();
if (roleId == 0) { if (roleId == 0) {
tunnelEntities = this.list(new QueryWrapper<Tunnel>().eq("status", 1)); tunnelEntities = this.list(new QueryWrapper<Tunnel>()
.eq("status", 1)
.orderByAsc("inx")
.orderByAsc("id"));
} else { } else {
tunnelEntities = java.util.Collections.emptyList(); // 返回空列表 tunnelEntities = java.util.Collections.emptyList(); // 返回空列表
List<UserTunnel> userTunnels = userTunnelMapper.selectList( List<UserTunnel> userTunnels = userTunnelMapper.selectList(
@@ -609,7 +612,9 @@ public class TunnelServiceImpl extends ServiceImpl<TunnelMapper, Tunnel> impleme
.collect(Collectors.toList()); .collect(Collectors.toList());
tunnelEntities = this.list(new QueryWrapper<Tunnel>() tunnelEntities = this.list(new QueryWrapper<Tunnel>()
.in("id", tunnelIds) .in("id", tunnelIds)
.eq("status", 1)); .eq("status", 1)
.orderByAsc("inx")
.orderByAsc("id"));
} }
} }