From bcbb4514d3790cbc59971cdf1a3fd1e23e1b094e Mon Sep 17 00:00:00 2001 From: Lemon Date: Thu, 27 Mar 2025 08:28:33 +0800 Subject: [PATCH] =?UTF-8?q?update=20=20=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=9F=A5=E8=AF=A2=E7=AB=99=E7=82=B9=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/万车充接口补充.md | 16 ++++++++---- .../api/uniapp/customer/PileController.java | 26 +++++++++++++++++++ 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/doc/万车充接口补充.md b/doc/万车充接口补充.md index c774dbd01..139e1d39c 100644 --- a/doc/万车充接口补充.md +++ b/doc/万车充接口补充.md @@ -1,15 +1,21 @@ # 首页站点筛选 ``` -接口地址: -请求方式: +接口地址:/uniapp/pile/queryStationInfosV2 +请求方式:POST ``` **入参** -| 字段名 | 类型 | 是否必传 | 备注 | -| ------ | ---- | -------- | ---- | -| | | | | +| 字段名 | 类型 | 是否必传 | 备注 | +| ---------------- | ------ | -------- | ---------------------- | +| sortType | String | N | 1-低价优先;2-距离最近 | +| chargeMode | String | N | 1-直流;2-交流 | +| chargeSpeed | String | N | 1-快充;2-慢充;3-超充 | +| canopyFlag | String | N | 是否有雨棚 | +| barrierFlag | String | N | 是否有道闸 | +| parkingLockFlag | String | N | 是否有地锁 | +| myCollectionFlag | String | N | 我的收藏 | **反参** diff --git a/jsowell-admin/src/main/java/com/jsowell/api/uniapp/customer/PileController.java b/jsowell-admin/src/main/java/com/jsowell/api/uniapp/customer/PileController.java index 5385c8f33..310c9e7b1 100644 --- a/jsowell-admin/src/main/java/com/jsowell/api/uniapp/customer/PileController.java +++ b/jsowell-admin/src/main/java/com/jsowell/api/uniapp/customer/PileController.java @@ -103,6 +103,32 @@ public class PileController extends BaseController { return response; } + @PostMapping("/queryStationInfosV2") + public RestApiResponse queryStationInfosV2(HttpServletRequest request, @RequestBody QueryStationDTO queryStationDTO) { + // logger.info("查询充电站信息列表 param:{}", JSON.toJSONString(queryStationDTO)); + RestApiResponse response; + try { + // 获取appid(第三方平台用) + String appId = request.getHeader("appId"); + if (StringUtils.isNotBlank(appId)) { + // 获取deptIds + List deptIds = pileMerchantInfoService.getDeptIdsByAppId(appId); + queryStationDTO.setMerchantDeptIds(deptIds); + } + logger.debug("uniApp查询充电站信息V2 appId:{}, dto:{}", appId, JSON.toJSONString(queryStationDTO)); + PageResponse pageResponse = pileStationInfoService.uniAppQueryStationInfoListV2(queryStationDTO); + response = new RestApiResponse<>(pageResponse); + } catch (BusinessException e) { + logger.warn("查询充电站信息列表V2 warn", e); + response = new RestApiResponse<>(e.getCode(), e.getMessage()); + } catch (Exception e) { + logger.error("查询充电站信息列表V2异常 error", e); + response = new RestApiResponse<>(ReturnCodeEnum.CODE_GET_PILE_STATION_INFO_ERROR); + } + logger.debug("查询充电站信息列表V2 param:{}, result:{}", JSON.toJSONString(queryStationDTO), JSON.toJSONString(response)); + return response; + } + /** * 查询站点收藏状态接口 * @param stationId