新增 绑定停车平台接口

This commit is contained in:
Lemon
2023-08-25 14:23:35 +08:00
parent 454022c553
commit 9c3c80ca3f
12 changed files with 406 additions and 159 deletions

View File

@@ -1,5 +1,6 @@
package com.jsowell.web.controller.pile;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.jsowell.common.annotation.Log;
import com.jsowell.common.core.controller.BaseController;
@@ -19,7 +20,9 @@ import com.jsowell.pile.dto.FastCreateStationDTO;
import com.jsowell.pile.dto.LianLianPushStationInfoDTO;
import com.jsowell.pile.dto.QueryStationDTO;
import com.jsowell.pile.dto.amap.EditAmapFlagDTO;
import com.jsowell.pile.dto.lutongyunting.BindParkingPlatformDTO;
import com.jsowell.pile.service.IPileStationInfoService;
import com.jsowell.pile.service.IThirdPartyParkingConfigService;
import com.jsowell.pile.service.IThirdPartyStationRelationService;
import com.jsowell.pile.service.IThirdPartySettingInfoService;
import com.jsowell.pile.vo.web.PileStationVO;
@@ -56,6 +59,9 @@ public class PileStationInfoController extends BaseController {
@Autowired
private IThirdPartyStationRelationService thirdPartyStationRelationService;
@Autowired
private IThirdPartyParkingConfigService parkingConfigService;
/**
* 查询充电站信息列表NEW
@@ -280,4 +286,43 @@ public class PileStationInfoController extends BaseController {
return response;
}
/**
* 绑定停车平台(停车充电下发优惠券)
* @param dto
* @return
*/
@PostMapping("/bindParkingPlatform")
public RestApiResponse<?> bindParkingPlatform(BindParkingPlatformDTO dto) {
logger.info("绑定停车平台 params:{}", JSON.toJSONString(dto));
RestApiResponse<?> response = null;
try {
pileStationInfoService.bindParkingPlatform(dto);
}catch (BusinessException e) {
logger.error("绑定停车平台 error,", e);
response = new RestApiResponse<>(e.getCode(), e.getMessage());
} catch (Exception e) {
logger.error("绑定停车平台 error", e);
response = new RestApiResponse<>(e);
}
logger.info("绑定停车平台 result:{}", response);
return response;
}
/**
* 获取停车平台列表
* @return
*/
@GetMapping("/getParkingInfoList")
public RestApiResponse<?> getParkingInfoList() {
logger.info("获取停车平台列表");
RestApiResponse<?> response = null;
try {
} catch (Exception e) {
logger.error("获取停车平台列表 error,", e);
response = new RestApiResponse<>(e);
}
logger.info("获取停车平台列表 result:{}", response);
return response;
}
}