mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-09-29 07:56:37 +08:00
35 lines
1.2 KiB
XML
35 lines
1.2 KiB
XML
<?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.UserTunnelMapper">
|
|
|
|
<!-- 获取用户隧道权限及隧道详细信息 -->
|
|
<select id="getUserTunnelWithDetails" resultType="com.admin.common.dto.UserTunnelWithDetailDto">
|
|
SELECT
|
|
ut.id,
|
|
ut.user_id as userId,
|
|
ut.tunnel_id as tunnelId,
|
|
ut.flow,
|
|
ut.in_flow as inFlow,
|
|
ut.out_flow as outFlow,
|
|
ut.num,
|
|
ut.flow_reset_time as flowResetTime,
|
|
ut.exp_time as expTime,
|
|
ut.speed_id as speedId,
|
|
ut.status as status,
|
|
t.name as tunnelName,
|
|
t.flow as tunnelFlow,
|
|
t.in_ip as inIp,
|
|
t.out_ip as outIp,
|
|
t.type,
|
|
t.protocol,
|
|
sl.name as speedLimitName,
|
|
sl.speed
|
|
FROM user_tunnel ut
|
|
LEFT JOIN tunnel t ON ut.tunnel_id = t.id
|
|
LEFT JOIN speed_limit sl ON ut.speed_id = sl.id
|
|
WHERE ut.user_id = #{userId}
|
|
ORDER BY ut.id
|
|
</select>
|
|
|
|
</mapper>
|