<?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.dsh.other.mapper.GameMapper">
|
|
<select id="queryAll" resultType="com.dsh.other.entity.Game">
|
SELECT
|
ga.*,st.`name` as store,op.`name` as operation,si.`name` as site
|
FROM
|
t_game ga
|
LEFT JOIN t_store st ON ga.storeId = st.id
|
LEFT JOIN t_operator op ON ga.operationId = op.id
|
LEFT JOIN t_site si on ga.siteId = si.id
|
<where>
|
<if test="provinceCode!=null and provinceCode!=''">
|
ga.provinceCode = #{provinceCode}
|
|
</if>
|
<if test="cityCode!=null and cityCode!=''">
|
and ga.cityCode = #{cityCode}
|
|
</if>
|
<if test="store!=null and store!=''">
|
and st.`name` = #{store}
|
|
</if>
|
<if test="site!=null and site!=''">
|
and si.`name` = #{site}
|
|
</if>
|
</where>
|
|
|
</select>
|
</mapper>
|