Pu Zhibing
2025-03-28 8b09fbc19a96b57bf1d0e4d7c79b51a76aeca554
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package com.stylefeng.guns.modular.api;
 
import com.stylefeng.guns.modular.system.model.Phone;
import com.stylefeng.guns.modular.system.service.IDriverService;
import com.stylefeng.guns.modular.system.service.IPhoneService;
import com.stylefeng.guns.modular.system.util.ResultUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
 
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;
 
/**
 * 系统电话控制器
 */
@Api
@RestController
@RequestMapping("/base/phone")
public class PhoneController {
 
    @Autowired
    private IPhoneService phoneService;
    
    @Autowired
    private IDriverService driverService;
 
 
 
    /**
     * 获取个人中心的客服电话
     * @return
     */
    @ResponseBody
    @PostMapping("/queryCustomerPhone")
    @ApiOperation(value = "获取个人中心的客服电话【1.0】", tags = {"司机端-首页"}, notes = "platform(平台电话),company(本地电话),scheduling(调度电话)")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "当前定位纬度", name = "lat", required = true, dataType = "double"),
            @ApiImplicitParam(value = "当前定位经度", name = "lnt", required = true, dataType = "double"),
    })
    public ResultUtil queryCustomerPhone(Double lat, Double lnt, HttpServletRequest request){
        try {
            Integer uid = driverService.getUserIdFormRedis(request);
            Map<String, Object> map = phoneService.queryCustomerPhone(uid, lat, lnt);
            return ResultUtil.success(map);
        }catch (Exception e){
            e.printStackTrace();
            return ResultUtil.runErr();
        }
    }
}