mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
add 后管推送站点信息到联联平台
This commit is contained in:
@@ -3,8 +3,10 @@ package com.jsowell.lianlian;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.jsowell.common.annotation.Anonymous;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.response.RestApiResponse;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.dto.LianLianPushStationInfoDTO;
|
||||
import com.jsowell.pile.dto.QueryEquipmentDTO;
|
||||
import com.jsowell.pile.dto.QueryStartChargeDTO;
|
||||
@@ -33,11 +35,20 @@ public class LianLianController extends BaseController {
|
||||
private LianLianService lianLianService;
|
||||
|
||||
|
||||
/**
|
||||
* 推送充电站信息 notification_stationInfo
|
||||
* http://localhost:8080/LianLian/pushStationInfo
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/pushStationInfo")
|
||||
public RestApiResponse<?> pushStationInfo(@RequestBody LianLianPushStationInfoDTO dto) {
|
||||
logger.info("推送联联平台充电站信息 params:{}", JSONObject.toJSONString(dto));
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
if (StringUtils.isBlank(String.valueOf(dto.getStationId()))) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
||||
}
|
||||
lianLianService.pushStationInfo(dto);
|
||||
response = new RestApiResponse<>();
|
||||
}catch (BusinessException e) {
|
||||
|
||||
@@ -8,16 +8,19 @@ import com.jsowell.common.core.page.TableDataInfo;
|
||||
import com.jsowell.common.enums.BusinessType;
|
||||
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.response.RestApiResponse;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.common.util.poi.ExcelUtil;
|
||||
import com.jsowell.pile.domain.PileStationInfo;
|
||||
import com.jsowell.pile.domain.ThirdPartySettingInfo;
|
||||
import com.jsowell.pile.dto.FastCreateStationDTO;
|
||||
import com.jsowell.pile.dto.LianLianPushStationInfoDTO;
|
||||
import com.jsowell.pile.dto.QueryStationDTO;
|
||||
import com.jsowell.pile.service.IPileStationInfoService;
|
||||
import com.jsowell.pile.service.IThirdPartySettingInfoService;
|
||||
import com.jsowell.pile.vo.web.PileStationVO;
|
||||
import com.jsowell.service.PileService;
|
||||
import com.jsowell.thirdparty.service.LianLianService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -43,6 +46,9 @@ public class PileStationInfoController extends BaseController {
|
||||
@Autowired
|
||||
private IThirdPartySettingInfoService thirdPartySettingInfoService;
|
||||
|
||||
@Autowired
|
||||
private LianLianService lianLianService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询充电站信息列表NEW
|
||||
@@ -204,4 +210,34 @@ public class PileStationInfoController extends BaseController {
|
||||
// public AjaxResult insertSettingInfo(ThirdPartySettingInfo info) {
|
||||
// return AjaxResult.success(thirdPartySettingInfoService.insertThirdPartySettingInfo(info));
|
||||
// }
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 推送充电站信息 notification_stationInfo
|
||||
* http://localhost:8080/LianLian/pushStationInfo
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/pushStationInfo")
|
||||
public RestApiResponse<?> pushStationInfo(@RequestBody LianLianPushStationInfoDTO dto) {
|
||||
logger.info("推送联联平台充电站信息 params:{}", JSONObject.toJSONString(dto));
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
if (StringUtils.isBlank(String.valueOf(dto.getStationId()))) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
||||
}
|
||||
lianLianService.pushStationInfo(dto);
|
||||
response = new RestApiResponse<>();
|
||||
}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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user