<?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.stylefeng.guns.modular.system.dao.OpenCityMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.OpenCity">
|
<id column="id" property="id"/>
|
<result column="cityId" property="cityId"/>
|
<result column="lon" property="lon"/>
|
<result column="lat" property="lat"/>
|
<result column="isQualifications" property="isQualifications"/>
|
|
<result column="flag" property="flag"/>
|
<result column="insertTime" property="insertTime"/>
|
<result column="insertUser" property="insertUser"/>
|
<result column="updateTime" property="updateTime"/>
|
<result column="updateUser" property="updateUser"/>
|
</resultMap>
|
|
|
|
<select id="queryOpenCity" resultType="OpenCity">
|
select
|
id as id,
|
cityId as cityId,
|
lon as lon,
|
lat as lat,
|
isQualifications as isQualifications,
|
flag as flag,
|
insertTime as insertTime,
|
insertUser as insertUser,
|
updateTime as updateTime,
|
updateUser as updateUser
|
from t_open_city where flag = 1
|
</select>
|
|
|
<select id="queryByCode" resultType="OpenCity">
|
select
|
id as id,
|
cityId as cityId,
|
lon as lon,
|
lat as lat,
|
isQualifications as isQualifications,
|
flag as flag,
|
insertTime as insertTime,
|
insertUser as insertUser,
|
updateTime as updateTime,
|
updateUser as updateUser
|
from t_open_city where flag = 1 and cityId in (
|
select id from t_city where englishName in
|
<foreach collection="city" item="item" index="index" separator="," open="(" close=")">
|
#{item}
|
</foreach>
|
)
|
</select>
|
</mapper>
|