mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-19 18:45:03 +08:00
update 小程序首页查询站点列表接口
This commit is contained in:
@@ -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 | 我的收藏 |
|
||||||
|
|
||||||
**反参**
|
**反参**
|
||||||
|
|
||||||
|
|||||||
@@ -103,6 +103,32 @@ public class PileController extends BaseController {
|
|||||||
return response;
|
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<String> 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
|
* @param stationId
|
||||||
|
|||||||
Reference in New Issue
Block a user