| | |
| | | |
| | | <!--根据条件查询开通城市列表--> |
| | | <select id="getOpenCityList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | | SELECT * FROM (SELECT ocb.str as business,oc.*,b.chineseName FROM t_open_city as oc |
| | | SELECT * FROM ( |
| | | SELECT |
| | | ocb.str as business, |
| | | oc.*, |
| | | b.chineseName |
| | | FROM t_open_city as oc |
| | | left join t_city b on (oc.cityId = b.id) |
| | | LEFT JOIN ( |
| | | SELECT GROUP_CONCAT( |
| | | CONCAT((case when businessType = 1 then '专车' |
| | | when businessType = 4 then '市内小件物流' |
| | | else '' end),' :',sort)) as str,openCityId from t_open_city_business where flag != 3 GROUP BY openCityId |
| | | ) as ocb on ocb.openCityId = oc.id) as o |
| | | ) as ocb on ocb.openCityId = oc.id |
| | | |
| | | <where> |
| | | o.flag != 3 |
| | | oc.flag != 3 |
| | | <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''"> |
| | | AND (o.insertTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')) |
| | | AND (oc.insertTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')) |
| | | </if> |
| | | <if test="condition != null and condition != ''"> |
| | | and (b.chineseName LIKE CONCAT('%',#{condition},'%') or b.englishName LIKE CONCAT('%',#{condition},'%') or b.frenchName LIKE CONCAT('%',#{condition},'%')) |
| | | </if> |
| | | </where> |
| | | ) as o |
| | | order by o.id desc |
| | | </select> |
| | | |