<?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="cn.wisenergy.chnmuseum.party.mapper.TAreaMapper"> <!-- 通用查询映射结果 --> <resultMap id="BaseResultMap" type="cn.wisenergy.chnmuseum.party.model.TArea"> <id column="id" property="id" /> <result column="name" property="name" /> <result column="sname" property="sname" /> <result column="code" property="code" /> <result column="type" property="type" /> <result column="parent_id" property="parentId" /> <result column="sort_position" property="sortPosition" /> <result column="longitude" property="longitude" /> <result column="latitude" property="latitude" /> <result column="full_name" property="fullName" /> <result column="remarks" property="remarks" /> </resultMap> <!-- 通用查询结果列 --> <sql id="Base_Column_List"> id, name, sname, code, type, parent_id, sort_position, longitude, latitude, full_name, remarks </sql> <select id="languageInfo" resultType="java.util.HashMap"> select id,name,code from t_language </select> <select id="selectParent" resultType="java.lang.String"> select concat(ifnull(concat(a1.parent_id,','),''),ifnull(concat(a.parent_id,','),''),a.id) from t_area a left join t_area a1 on a.parent_id = a1.id where a.id = #{areaId} </select> </mapper>