mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update 平台配置页面
This commit is contained in:
@@ -2,6 +2,7 @@ package com.jsowell.web.controller.thirdparty;
|
||||
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.thirdparty.common.NotificationDTO;
|
||||
import com.jsowell.thirdparty.common.NotificationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -25,6 +26,9 @@ public class ThirdPartyNotificationController extends BaseController {
|
||||
try {
|
||||
notificationService.notificationStationInfo(dto);
|
||||
result = AjaxResult.success();
|
||||
} catch (BusinessException e) {
|
||||
logger.error("充电站信息变化推送失败", e);
|
||||
result = AjaxResult.error(e.getMessage());
|
||||
} catch (Exception e) {
|
||||
logger.error("充电站信息变化推送失败", e);
|
||||
result = AjaxResult.error();
|
||||
@@ -41,6 +45,9 @@ public class ThirdPartyNotificationController extends BaseController {
|
||||
try {
|
||||
notificationService.notificationStationStatus(dto);
|
||||
result = AjaxResult.success();
|
||||
} catch (BusinessException e) {
|
||||
logger.error("设备状态变化推送失败", e);
|
||||
result = AjaxResult.error(e.getMessage());
|
||||
} catch (Exception e) {
|
||||
logger.error("设备状态变化推送失败", e);
|
||||
result = AjaxResult.error();
|
||||
@@ -57,6 +64,9 @@ public class ThirdPartyNotificationController extends BaseController {
|
||||
try {
|
||||
notificationService.notificationConnectorChargeStatus(dto);
|
||||
result = AjaxResult.success();
|
||||
} catch (BusinessException e) {
|
||||
logger.error("设备充电中状态变化推送失败", e);
|
||||
result = AjaxResult.error(e.getMessage());
|
||||
} catch (Exception e) {
|
||||
logger.error("设备充电中状态变化推送失败", e);
|
||||
result = AjaxResult.error();
|
||||
@@ -73,6 +83,9 @@ public class ThirdPartyNotificationController extends BaseController {
|
||||
try {
|
||||
notificationService.notificationChargeOrderInfo(dto);
|
||||
result = AjaxResult.success();
|
||||
} catch (BusinessException e) {
|
||||
logger.error("充电订单信息推送失败", e);
|
||||
result = AjaxResult.error(e.getMessage());
|
||||
} catch (Exception e) {
|
||||
logger.error("充电订单信息推送失败", e);
|
||||
result = AjaxResult.error();
|
||||
@@ -89,6 +102,9 @@ public class ThirdPartyNotificationController extends BaseController {
|
||||
try {
|
||||
notificationService.notificationStationFee(dto);
|
||||
result = AjaxResult.success();
|
||||
} catch (BusinessException e) {
|
||||
logger.error("站点费率变化推送失败", e);
|
||||
result = AjaxResult.error(e.getMessage());
|
||||
} catch (Exception e) {
|
||||
logger.error("站点费率变化推送失败", e);
|
||||
result = AjaxResult.error();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.jsowell.thirdparty.common;
|
||||
|
||||
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.vo.ThirdPartySecretInfoVO;
|
||||
import com.jsowell.thirdparty.platform.ThirdPartyPlatformService;
|
||||
@@ -31,6 +33,9 @@ public class NotificationService {
|
||||
* notification_stationInfo
|
||||
*/
|
||||
public void notificationStationInfo(NotificationDTO dto) {
|
||||
if (StringUtils.isBlank(dto.getStationId())) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
||||
}
|
||||
String stationId = dto.getStationId();
|
||||
// 通过stationId 查询该站点需要对接的平台配置
|
||||
List<ThirdPartySecretInfoVO> secretInfoVOS = thirdpartySecretInfoService.queryStationToPlatformList(stationId);
|
||||
@@ -58,6 +63,9 @@ public class NotificationService {
|
||||
* notification_stationStatus
|
||||
*/
|
||||
public void notificationStationStatus(NotificationDTO dto) {
|
||||
if (StringUtils.isBlank(dto.getStationId()) || StringUtils.isBlank(dto.getPileConnectorCode()) || StringUtils.isBlank(dto.getStatus())) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
||||
}
|
||||
String stationId = dto.getStationId();
|
||||
String pileConnectorCode = dto.getPileConnectorCode();
|
||||
String status = dto.getStatus();
|
||||
@@ -88,6 +96,9 @@ public class NotificationService {
|
||||
* notification_equip_charge_status
|
||||
*/
|
||||
public void notificationConnectorChargeStatus(NotificationDTO dto) {
|
||||
if (StringUtils.isBlank(dto.getStationId()) || StringUtils.isBlank(dto.getOrderCode())) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
||||
}
|
||||
String stationId = dto.getStationId();
|
||||
String orderCode = dto.getOrderCode();
|
||||
// 通过stationId 查询该站点需要对接的平台配置
|
||||
@@ -116,6 +127,9 @@ public class NotificationService {
|
||||
* notification_orderInfo/notification_charge_order_info
|
||||
*/
|
||||
public void notificationChargeOrderInfo(NotificationDTO dto) {
|
||||
if (StringUtils.isBlank(dto.getStationId()) || StringUtils.isBlank(dto.getOrderCode())) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
||||
}
|
||||
String stationId = dto.getStationId();
|
||||
String orderCode = dto.getOrderCode();
|
||||
// 通过stationId 查询该站点需要对接的平台配置
|
||||
@@ -144,6 +158,9 @@ public class NotificationService {
|
||||
* notification_stationFee
|
||||
*/
|
||||
public void notificationStationFee(NotificationDTO dto) {
|
||||
if (StringUtils.isBlank(dto.getStationId())) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
||||
}
|
||||
String stationId = dto.getStationId();
|
||||
// 通过stationId 查询该站点需要对接的平台配置
|
||||
List<ThirdPartySecretInfoVO> secretInfoVOS = thirdpartySecretInfoService.queryStationToPlatformList(stationId);
|
||||
|
||||
Reference in New Issue
Block a user