<?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.springblade.modules.remoteType.mapper.TypeMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="typeResultMap" type="org.springblade.modules.remoteType.entity.Type">
|
<result column="id" property="id"/>
|
<result column="name" property="name"/>
|
<result column="longtitude" property="longtitude"/>
|
<result column="latitude" property="latitude"/>
|
</resultMap>
|
|
|
<select id="selectTypePage" resultMap="typeResultMap">
|
select * from sys_remote_type where is_deleted = 0
|
</select>
|
|
<resultMap id="typeDTO" type="org.springblade.modules.remoteType.dto.TypeDTO">
|
<id column="id" property="id" jdbcType="INTEGER"/>
|
<result column="name" property="name" jdbcType="VARCHAR"/>
|
<result column="longitude" property="longitude" jdbcType="VARCHAR"/>
|
<result column="latitude" property="latitude" jdbcType="VARCHAR"/>
|
<collection property="remoteList" javaType="java.util.List" ofType="org.springblade.modules.remote.entity.Remote">
|
<result column="rid" property="id"/>
|
<result column="re_name" property="reName"/>
|
<result column="re_url" property="reUrl"/>
|
<result column="re_type" property="reType"/>
|
</collection>
|
</resultMap>
|
|
<select id="getRemoteDetailsList" resultMap="typeDTO">
|
select t.id,t.name,t.longitude,t.latitude,r.id rid,r.re_name,r.re_url,r.re_type
|
FROM sys_remote_type t
|
LEFT JOIN sys_remote r ON r.type = t.id
|
WHERE r.is_deleted = 0
|
</select>
|
|
|
</mapper>
|