diff --git a/nxhs-service/src/main/resources/mapper/RecycleStationMapper.xml b/nxhs-service/src/main/resources/mapper/RecycleStationMapper.xml index fd7a918..73c5b54 100644 --- a/nxhs-service/src/main/resources/mapper/RecycleStationMapper.xml +++ b/nxhs-service/src/main/resources/mapper/RecycleStationMapper.xml @@ -13,9 +13,15 @@ ) AS distance FROM nx_enterprise_recycle_station a - ${ew.customSqlSegment} - AND a.latitude IS NOT NULL + WHERE + a.latitude IS NOT NULL AND a.longitude IS NOT NULL + + + AND + + ${ew.sqlSegment} + HAVING distance <= a.accept_range ORDER BY diff --git a/nxhs-service/src/main/resources/mapper/RecycleStationPriceMapper.xml b/nxhs-service/src/main/resources/mapper/RecycleStationPriceMapper.xml index 1b1b327..47d1e4a 100644 --- a/nxhs-service/src/main/resources/mapper/RecycleStationPriceMapper.xml +++ b/nxhs-service/src/main/resources/mapper/RecycleStationPriceMapper.xml @@ -11,7 +11,12 @@ LEFT JOIN nx_price_recycle b ON a.id = b.price_id WHERE b.recycle_id = #{stationId} - and ${ew.sqlSegment} + + + AND + + ${ew.sqlSegment} + ORDER BY a.f_creator_time DESC LIMIT 1;