mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-10-01 08:36:38 +08:00
init
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.admin.mapper.ForwardMapper">
|
||||
|
||||
<!-- 查询所有转发信息(包含隧道信息) -->
|
||||
<select id="selectAllForwardsWithTunnel" resultType="com.admin.common.dto.ForwardWithTunnelDto">
|
||||
SELECT
|
||||
f.id,
|
||||
f.user_id AS userId,
|
||||
f.name,
|
||||
f.tunnel_id AS tunnelId,
|
||||
f.in_port AS inPort,
|
||||
f.out_port AS outPort,
|
||||
f.remote_addr AS remoteAddr,
|
||||
f.status,
|
||||
f.created_time AS createdTime,
|
||||
f.updated_time AS updatedTime,
|
||||
f.user_name AS userName,
|
||||
f.in_flow AS inFlow,
|
||||
f.out_flow AS outFlow,
|
||||
t.name AS tunnelName,
|
||||
t.in_ip AS inIp,
|
||||
t.in_port_sta AS inPortSta,
|
||||
t.in_port_end AS inPortEnd,
|
||||
t.out_ip AS outIp,
|
||||
t.out_ip_sta AS outIpSta,
|
||||
t.out_ip_end AS outIpEnd,
|
||||
t.type
|
||||
FROM
|
||||
forward f
|
||||
LEFT JOIN
|
||||
tunnel t ON f.tunnel_id = t.id
|
||||
ORDER BY
|
||||
f.created_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 根据用户ID查询转发信息(包含隧道信息) -->
|
||||
<select id="selectForwardsWithTunnelByUserId" resultType="com.admin.common.dto.ForwardWithTunnelDto">
|
||||
SELECT
|
||||
f.id,
|
||||
f.user_id AS userId,
|
||||
f.name,
|
||||
f.tunnel_id AS tunnelId,
|
||||
f.in_port AS inPort,
|
||||
f.out_port AS outPort,
|
||||
f.remote_addr AS remoteAddr,
|
||||
f.status,
|
||||
f.created_time AS createdTime,
|
||||
f.updated_time AS updatedTime,
|
||||
f.user_name AS userName,
|
||||
f.in_flow AS inFlow,
|
||||
f.out_flow AS outFlow,
|
||||
t.name AS tunnelName,
|
||||
t.in_ip AS inIp,
|
||||
t.in_port_sta AS inPortSta,
|
||||
t.in_port_end AS inPortEnd,
|
||||
t.out_ip AS outIp,
|
||||
t.out_ip_sta AS outIpSta,
|
||||
t.out_ip_end AS outIpEnd,
|
||||
t.type
|
||||
FROM
|
||||
forward f
|
||||
LEFT JOIN
|
||||
tunnel t ON f.tunnel_id = t.id
|
||||
WHERE
|
||||
f.user_id = #{userId}
|
||||
ORDER BY
|
||||
f.created_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user