<select id="getCityTree" resultMap="areaInfoResult"
parameterType="com.zq.web.domain.basedata.SysChildCity">
select p.area_id as provinceId,p.pid as provincePid ,p.name as provinceName,
c.area_id as cityId,c.pid as cityPid ,c.name as cityName,
a.area_id as areaId,a.pid as areaPid ,a.name as areaName
INNER join zq_area c on c.pid=p.area_id
INNER JOIN zq_area a on a.pid=c.area_id
<resultMap type="com.zq.web.domain.basedata.SysChildCity" id="areaInfoResult">
<id column="provinceId" property="areaId"/>
<result column="provincePid" property="pid"/>
<result column="provinceName" property="name"/>
<collection property="childList" ofType="com.zq.web.domain.basedata.SysChildCity">
<id column="cityId" property="areaId"/>
<result column="cityPid" property="pid"/>
<result column="cityName" property="name"/>
<collection property="childList" ofType="com.zq.web.domain.basedata.SysChildCity">
<id column="areaId" property="areaId"/>
<result column="areaPid" property="pid"/>
<result column="areaName" property="name"/>
package com.zq.web.domain.basedata;
import com.zq.common.annotation.Excel;
import java.io.Serializable;
public class SysChildCity implements Serializable {
private static final long serialVersionUID = -95760719060350719L;
private List<SysChildCity> childList;