30 lines
1.5 KiB
XML
30 lines
1.5 KiB
XML
<?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.zjyr.beidouservice.mapper.LocCountyMapper">
|
|
<resultMap id="location_county" type="com.zjyr.beidouservice.pojo.dataobject.LocCountyDO">
|
|
<result property="id" column="id" jdbcType="BIGINT"/>
|
|
<result property="countyName" column="county_name" jdbcType="VARCHAR"/>
|
|
<result property="countyCode" column="county_code" jdbcType="VARCHAR"/>
|
|
<result property="cityCode" column="city_code" jdbcType="VARCHAR"/>
|
|
<result property="provinceCode" column="province_code" jdbcType="VARCHAR"/>
|
|
<result property="beidouBroadcastId" column="beidou_broadcast_id" jdbcType="VARCHAR"/>
|
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
|
</resultMap>
|
|
|
|
<select id="selectCountyByCity" resultType="com.zjyr.beidouservice.pojo.dataobject.LocCountyDO"
|
|
parameterType="java.lang.String" resultMap="location_county">
|
|
select *
|
|
from location_county
|
|
<where>
|
|
<if test="provinceCode != null and provinceCode != ''">
|
|
and province_code = #{provinceCode}
|
|
</if>
|
|
<if test="cityCode != null and cityCode != ''">
|
|
and city_code = #{cityCode}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
|
|
</mapper> |