端口池管理,新增根据端口池分组过滤

This commit is contained in:
aoshiguchen
2023-03-25 21:17:30 +08:00
parent 3f014418e1
commit 7dba9ac173
4 changed files with 15 additions and 6 deletions
@@ -1,6 +1,9 @@
<template>
<div class="app-container calendar-list-container">
<div class="filter-container">
<el-select v-model="listQuery.groupId" placeholder="请选择端口池分组" clearable>
<el-option v-for="item in portGroupList" :key="item.id" :label="item.name" :value="item.id"/>
</el-select>
<el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">{{$t('table.search')}}</el-button>
<el-button class="filter-item" style="margin-left: 10px;" @click="handleCreate" type="primary" icon="el-icon-edit">{{$t('table.add')}}</el-button>
</div>
@@ -125,9 +128,7 @@
listQuery: {
current: 1,
size: 10,
importance: undefined,
title: undefined,
type: undefined
groupId: undefined
},
importanceOptions: [1, 2, 3],
calendarTypeOptions,
@@ -30,5 +30,8 @@ import lombok.Data;
*/
@Data
public class PortPoolListReq {
/**
* 分组ID
*/
private Integer groupId;
}
@@ -66,7 +66,7 @@ public interface PortPoolMapper extends BaseMapper<PortPoolDO> {
);
}
List<PortPoolListRes> selectResList(PortPoolListReq req);
List<PortPoolListRes> selectResList(@Param("req") PortPoolListReq req);
List<PortPoolListRes> getAvailablePortList(@Param("licenseId") Integer licenseId,@Param("userId") Integer userId);
}
@@ -7,7 +7,12 @@
g.possessor_type,
g.`name` group_name
FROM port_pool p
LEFT JOIN port_group g ON p.group_id = g.id
LEFT JOIN port_group g ON p.group_id = g.id
<where>
<if test="req.groupId != null">
AND p.group_id = #{req.groupId}
</if>
</where>
ORDER BY p.id
</select>