| | |
| | | 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} |
| | | where 1=1 |
| | | <if test ="query.type==3"> |
| | | and st.id =#{query.id} |
| | | </if> |
| | | <if test="query.provinceCode!=null and query.provinceCode!=''"> |
| | | and ga.provinceCode = #{query.provinceCode} |
| | | |
| | | </if> |
| | | <if test="cityCode!=null and cityCode!=''"> |
| | | and ga.cityCode = #{cityCode} |
| | | <if test="query.cityCode!=null and query.cityCode!=''"> |
| | | and ga.cityCode = #{query.cityCode} |
| | | |
| | | </if> |
| | | <if test="store!=null and store!=''"> |
| | | and st.`name` like concat('%',#{store},'%') |
| | | <if test="query.store!=null and query.store!=''"> |
| | | and st.`name` like concat('%',#{query.store},'%') |
| | | |
| | | </if> |
| | | <if test="site!=null and site!=''"> |
| | | and si.`name` like concat('%',#{site},'%') |
| | | <if test="query.site!=null and query.site!=''"> |
| | | and si.`name` like concat('%',#{query.site},'%') |
| | | |
| | | </if> |
| | | </where> |
| | | |
| | | |
| | | </select> |