运营区筛选
This commit is contained in:
parent
ed46729559
commit
2dcd1f3c12
@ -29,7 +29,7 @@ public interface EbikeRegionMapper extends BaseMapper<EbikeRegion> {
|
|||||||
* @param point 用户当前位置
|
* @param point 用户当前位置
|
||||||
* @return 列表
|
* @return 列表
|
||||||
*/
|
*/
|
||||||
List<EbikeRegion> findAllRegionsOrderByDistance(Point point);
|
List<EbikeRegion> findAllRegionsOrderByDistance(Point point,Long operatorId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据当前位置查询当前运营区及站点
|
* 根据当前位置查询当前运营区及站点
|
||||||
|
|||||||
@ -759,7 +759,7 @@ public class EbikeBikeOrderServiceImpl extends ServiceImpl<EbikeBikeOrderMapper,
|
|||||||
public List<EbikeRegion> regionList(OrderRegionVo orderRegionVo) {
|
public List<EbikeRegion> regionList(OrderRegionVo orderRegionVo) {
|
||||||
Point point = orderRegionVo.getPoint();
|
Point point = orderRegionVo.getPoint();
|
||||||
if (point != null) {
|
if (point != null) {
|
||||||
return regionMapper.findAllRegionsOrderByDistance(point);
|
return regionMapper.findAllRegionsOrderByDistance(point,StpUtil.getLoginIdAsLong());
|
||||||
} else {
|
} else {
|
||||||
return regionMapper.selectAll();
|
return regionMapper.selectAll();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,6 +27,7 @@
|
|||||||
ebike_region
|
ebike_region
|
||||||
WHERE
|
WHERE
|
||||||
is_deleted IS NOT TRUE
|
is_deleted IS NOT TRUE
|
||||||
|
AND operator_id = #{operatorId}
|
||||||
ORDER BY
|
ORDER BY
|
||||||
is_within_region DESC,
|
is_within_region DESC,
|
||||||
distance_meters
|
distance_meters
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user