| | |
| | | SELECT * FROM (SELECT rr.chineseName as provinceName,aa.* FROM t_advertisement as aa |
| | | LEFT JOIN t_city as rr on rr.id = aa.cityId) as o |
| | | <where> |
| | | 1=1 |
| | | type in (1, 2) |
| | | <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')) |
| | | </if> |
| | |
| | | order by o.id desc |
| | | </select> |
| | | |
| | | <select id="getAdvertisementList1" resultType="java.util.Map"> |
| | | SELECT * FROM (SELECT rr.chineseName as provinceName,aa.* FROM t_advertisement as aa |
| | | LEFT JOIN t_city as rr on rr.id = aa.cityId) as o where o.type=3 order by o.id desc |
| | | </select> |
| | | |
| | | <select id="getAdvertisementList2" resultType="java.util.Map"> |
| | | SELECT * FROM (SELECT rr.chineseName as provinceName,aa.* FROM t_advertisement as aa |
| | | LEFT JOIN t_city as rr on rr.id = aa.cityId) as o where o.type=4 order by o.id desc |
| | | |
| | | </select> |
| | | </mapper> |