| | |
| | | and jp.is_nine = #{place.isNine} |
| | | </if> |
| | | |
| | | <if test="place.noExplosionCategory!=null"> |
| | | and jp.no_explosion_category is not null |
| | | <if test="place.noExplosionCategory!=null and place.noExplosionCategory > 0 "> |
| | | and jp.no_explosion_category = #{place.noExplosionCategory} |
| | | </if> |
| | | </if> |
| | | |
| | | |
| | | <if test="place.source!=null"> |
| | | and jp.source = #{place.source} |
| | | </if> |
| | |
| | | order by jp.create_time desc,jp.id desc |
| | | </select> |
| | | |
| | | <select id="getNearbyPlaceList" resultType="org.springblade.modules.place.vo.PlaceVO"> |
| | | SELECT |
| | | jp.id, |
| | | jp.lat, |
| | | jp.lng, |
| | | jp.place_name, |
| | | ( 6371 * acos( cos( radians(#{param1}) ) * cos( radians( jp.lat ) ) |
| | | * cos( radians( jp.lng ) - radians(#{param2}) ) |
| | | + sin( radians(#{param1}) ) * sin( radians( jp.lat ) ) ) ) AS distance |
| | | FROM jczz_place jp |
| | | where jp.place_name is not null |
| | | and jp.lat is not null |
| | | and jp.lng is not null |
| | | and jp.is_deleted = 0 |
| | | HAVING distance <= 1 |
| | | ORDER BY distance limit 30 |
| | | </select> |
| | | |
| | | </mapper> |