32 lines
1.3 KiB
XML
32 lines
1.3 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="org.dromara.neutrinoproxy.server.dal.PortMappingMapper">
|
|
|
|
<select id="selectPortMappingByCondition" resultType="org.dromara.neutrinoproxy.server.dal.entity.PortMappingDO">
|
|
SELECT pm.* from port_mapping pm left join license on pm.license_id = license.`id`
|
|
<where>
|
|
<if test="req.userId != null">
|
|
AND license.user_id = #{req.userId}
|
|
</if>
|
|
<if test="req.licenseId != null">
|
|
AND pm.license_id = #{req.licenseId}
|
|
</if>
|
|
<if test="req.serverPort != null">
|
|
AND pm.server_port = #{req.serverPort}
|
|
</if>
|
|
<if test="req.isOnline != null">
|
|
AND pm.is_online = #{req.isOnline}
|
|
</if>
|
|
<if test="req.enable != null">
|
|
AND pm.enable = #{req.enable}
|
|
</if>
|
|
<if test="req.protocal != null and req.protocal != ''">
|
|
AND pm.protocal = #{req.protocal}
|
|
</if>
|
|
<if test="req.description != null and req.description != '' ">
|
|
AND pm.description like #{req.description}
|
|
</if>
|
|
</where>
|
|
order by pm.id asc
|
|
</select>
|
|
</mapper> |