<?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.OpenCityBusinessMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.OpenCityBusiness">
|
<id column="id" property="id"/>
|
<result column="openCityId" property="openCityId"/>
|
<result column="businessType" property="businessType"/>
|
<result column="sort" property="sort"/>
|
|
<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="queryBusiness" resultType="OpenCityBusiness">
|
select
|
a.id as id,
|
a.openCityId as openCityId,
|
a.businessType as businessType,
|
a.sort as sort,
|
a.flag as flag,
|
a.insertTime as insertTime,
|
a.insertUser as insertUser,
|
a.updateTime as updateTime,
|
a.updateUser as updateUser
|
from t_open_city_business a
|
left join t_open_city b on (a.openCityId = b.id)
|
where a.flag != 3 and b.flag != 3
|
<if test="null != district">
|
and b.provinceName = #{district}
|
</if>
|
<if test="null != city">
|
and b.cityName = #{city}
|
</if>
|
<if test="null != province">
|
and b.areaName = #{province}
|
</if>
|
order by a.sort
|
</select>
|
|
|
<select id="queryBusinessById" resultType="OpenCityBusiness">
|
select
|
id as id,
|
openCityId as openCityId,
|
businessType as businessType,
|
sort as sort,
|
flag as flag,
|
insertTime as insertTime,
|
insertUser as insertUser,
|
updateTime as updateTime,
|
updateUser as updateUser
|
from t_open_city_business
|
where flag != 3 and openCityId = #{id} order by sort
|
</select>
|
</mapper>
|