曾富康
2026-06-17 916d0f9012590ff4b4eb7ce838f5d69d305fe539
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package com.stylefeng.guns.modular.system.controller;
 
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.stylefeng.guns.modular.system.model.TSysDistanceDisplay;
import com.stylefeng.guns.modular.system.service.ITSysDistanceDisplayService;
import com.stylefeng.guns.modular.system.util.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * 距离展示配置内部接口
 */
@RestController
@RequestMapping("/base/distanceDisplay")
public class DistanceDisplayController {
 
    @Autowired
    private ITSysDistanceDisplayService tSysDistanceDisplayService;
 
    /**
     * 查询企业乘客定位推送距离阈值,供用户端实时定位过滤使用
     */
    @ResponseBody
    @RequestMapping(value = "/passengerLocationDistance", method = RequestMethod.POST)
    public ResultUtil passengerLocationDistance(Integer companyId) {
        if (companyId == null || companyId == 0) {
            return ResultUtil.paranErr();
        }
        TSysDistanceDisplay distanceDisplay = tSysDistanceDisplayService.selectOne(
                new EntityWrapper<TSysDistanceDisplay>().eq("companyId", companyId));
        if (distanceDisplay == null || distanceDisplay.getPassengerLocationDistance() == null) {
            return ResultUtil.success();
        }
        return ResultUtil.success(distanceDisplay.getPassengerLocationDistance());
    }
}