| | |
| | | PageInfo<GetSiteListDTO> list = siteService.getSiteList(siteList); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getSiteList/byUserId") |
| | | @ApiOperation(value = "获取站点列表", tags = {"管理后台-站点管理"}) |
| | | public R<List<GetSiteListDTO>> getSiteListByUserId(@RequestParam("userId") Long userId){ |
| | |
| | | return AjaxResult.success(siteService.getSiteListGun()); |
| | | } |
| | | |
| | | @PostMapping("/getSiteListParkLot") |
| | | @GetMapping("/getSiteListParkLot") |
| | | @ApiOperation(value = "获取站点列表不分页", tags = {"管理后台-停车场绑定"}) |
| | | public AjaxResult<List<Site>> getSiteListParkLot(){ |
| | | return AjaxResult.success(siteService.getSiteListParkLot()); |
| | |
| | | @ApiOperation(value = "获取站点详细信息", tags = {"小程序-站点管理-站点详情"}) |
| | | @PostMapping("/getDetailById") |
| | | public AjaxResult<SiteDetailVO> getDetailById(@Validated @RequestBody SiteDetailQuery query){ |
| | | SiteDetailVO siteDetailVO = siteService.getDetailById(query.getSiteId()); |
| | | SiteDetailVO siteDetailVO = siteService.getDetailById(query); |
| | | // 查询合作商名称 |
| | | Partner partner = partnerService.getById(siteDetailVO.getPartnerId()); |
| | | if(Objects.nonNull(partner)){ |
| | | siteDetailVO.setPartnerName(partner.getName()); |
| | | } |
| | | // 计算距离 |
| | | Map<String, Double> distance = GeodesyUtil.getDistance(query.getLat() + "," + query.getLon(), siteDetailVO.getLat() + "," + siteDetailVO.getLon()); |
| | | siteDetailVO.setDistance(distance.get("WGS84")); |
| | | // Map<String, Double> distance = GeodesyUtil.getDistance(query.getLat() + "," + query.getLon(), siteDetailVO.getLat() + "," + siteDetailVO.getLon()); |
| | | // siteDetailVO.setDistance(distance.get("WGS84")); |
| | | // 查询绑定车牌提示文案 |
| | | TParkingLot parkingLot = parkingLotService.getOne(Wrappers.lambdaQuery(TParkingLot.class) |
| | | .eq(TParkingLot::getSiteId, query.getSiteId())); |
| | |
| | | @ResponseBody |
| | | @PostMapping("/getSiteByIds") |
| | | public R<List<Site>> getSiteByIds(@RequestBody List<Integer> ids){ |
| | | List<Site> sites = siteService.listByIds(ids); |
| | | List<Site> sites = siteService.list(new LambdaQueryWrapper<Site>().in(Site::getId, ids).eq(Site::getDelFlag, 0)); |
| | | return R.ok(sites); |
| | | } |
| | | |