<?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.iailab.module.data.gateway.dao.ApiInfoDao">
|
<resultMap id="ApiInfoEntity" type="com.iailab.module.data.gateway.entity.ApiInfoEntity">
|
<result property="id" column="id"/>
|
<result property="apiName" column="api_name"/>
|
<result property="apiGroupId" column="api_group_id"/>
|
<result property="groupName" column="group_name"/>
|
<result property="apiServerId" column="api_server_id"/>
|
<result property="serverName" column="server_name"/>
|
<result property="apiDesc" column="api_desc"/>
|
<result property="apiAddress" column="api_address"/>
|
<result property="status" column="status"/>
|
<result property="createTime" column="create_time"/>
|
</resultMap>
|
<select id="queryList" parameterType="map" resultMap="ApiInfoEntity">
|
SELECT t1.*,
|
t2.group_name,
|
t3.server_name
|
FROM t_api_info t1
|
LEFT JOIN t_api_group t2 ON t2.id = t1.api_group_id
|
LEFT JOIN t_api_server t3 ON t3.id = t1.api_server_id
|
<where>
|
<if test="params.apiName != null and params.apiName != ''">
|
AND t1.api_name LIKE CONCAT('%', #{params.apiName}, '%')
|
</if>
|
<if test="params.groupName != null and params.groupName != ''">
|
AND t2.group_name LIKE CONCAT('%', #{params.groupName}, '%')
|
</if>
|
<if test="params.serverName != null and params.serverName != ''">
|
AND t3.server_name LIKE CONCAT('%', #{params.serverName}, '%')
|
</if>
|
</where>
|
ORDER BY t1.create_time DESC
|
</select>
|
|
</mapper>
|