<?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.CompanyCityMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.CompanyCity">
|
<id column="id" property="id"/>
|
<result column="companyId" property="companyId"/>
|
<result column="provinceCode" property="provinceCode"/>
|
<result column="cityCode" property="cityCode"/>
|
<result column="areaCode" property="areaCode"/>
|
<result column="state" property="state"/>
|
</resultMap>
|
|
<select id="query" resultType="CompanyCity">
|
select
|
id as id,
|
companyId as companyId,
|
provinceCode as provinceCode,
|
cityCode as cityCode,
|
areaCode as areaCode,
|
state as state
|
from t_company_city where state = 1
|
<if test="null != province">
|
and provinceCode = #{province}
|
</if>
|
<if test="null != city">
|
and cityCode = #{city}
|
</if>
|
<if test="null != code">
|
and areaCode = #{code}
|
</if>
|
</select>
|
</mapper>
|