update 宁波市平台

This commit is contained in:
Lemon
2024-10-30 14:38:14 +08:00
parent cb9ba2139e
commit f5a2b78fd0

View File

@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.jsowell.common.annotation.Anonymous; import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.core.controller.BaseController; import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.enums.thirdparty.ThirdPartyReturnCodeEnum;
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum; import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
import com.jsowell.common.enums.ykc.ReturnCodeEnum; import com.jsowell.common.enums.ykc.ReturnCodeEnum;
import com.jsowell.common.exception.BusinessException; import com.jsowell.common.exception.BusinessException;
@@ -17,10 +18,12 @@ import com.jsowell.pile.dto.QueryStationInfoDTO;
import com.jsowell.thirdparty.lianlian.common.CommonResult; import com.jsowell.thirdparty.lianlian.common.CommonResult;
import com.jsowell.pile.thirdparty.CommonParamsDTO; import com.jsowell.pile.thirdparty.CommonParamsDTO;
import com.jsowell.thirdparty.lianlian.service.LianLianService; import com.jsowell.thirdparty.lianlian.service.LianLianService;
import com.jsowell.thirdparty.platform.service.ThirdPartyPlatformService;
import com.jsowell.thirdparty.platform.util.Cryptos; import com.jsowell.thirdparty.platform.util.Cryptos;
import com.jsowell.thirdparty.platform.util.Encodes; import com.jsowell.thirdparty.platform.util.Encodes;
import com.jsowell.thirdparty.zhongdianlian.service.ZDLService; import com.jsowell.thirdparty.zhongdianlian.service.ZDLService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
@@ -37,12 +40,18 @@ import java.util.Map;
@Anonymous @Anonymous
@RestController @RestController
@RequestMapping("/zdl") @RequestMapping("/zdl")
public class ZDLController extends BaseController { public class ZDLController extends ThirdPartyBaseController {
@Autowired // @Autowired
private ZDLService zdlService; // private ZDLService zdlService;
private final String platformName = "宁波平台";
@Autowired @Autowired
private LianLianService lianLianService; @Qualifier("zhongDianLianPlatformServiceImpl")
private ThirdPartyPlatformService platformLogic;
// @Autowired
// private LianLianService lianLianService;
/** /**
* 获取token接口 * 获取token接口
@@ -50,13 +59,14 @@ public class ZDLController extends BaseController {
*/ */
@PostMapping("/v1/query_token") @PostMapping("/v1/query_token")
public CommonResult<?> queryToken(@RequestBody CommonParamsDTO dto) { public CommonResult<?> queryToken(@RequestBody CommonParamsDTO dto) {
logger.info("中电联平台请求令牌 params:{}", JSON.toJSONString(dto)); logger.info("宁波平台请求令牌 params:{}", JSON.toJSONString(dto));
try { try {
Map<String, String> map = zdlService.generateToken(dto); // Map<String, String> map = zdlService.generateToken(dto);
logger.info("中电联平台请求令牌 result:{}", JSON.toJSONString(map)); Map<String, String> map = platformLogic.queryToken(dto);
logger.info("宁波平台请求令牌 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "请求令牌成功!", map.get("Data"), map.get("Sig")); return CommonResult.success(0, "请求令牌成功!", map.get("Data"), map.get("Sig"));
} catch (UnsupportedEncodingException e) { } catch (Exception e) {
logger.error("中电联平台 请求令牌接口 异常"); logger.error("宁波平台 请求令牌接口 异常");
return CommonResult.failed("获取token发生异常"); return CommonResult.failed("获取token发生异常");
} }
} }
@@ -67,130 +77,219 @@ public class ZDLController extends BaseController {
* @param dto * @param dto
* @return * @return
*/ */
// @PostMapping("/v1/query_stations_info")
// public CommonResult<?> query_stations_info(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
// logger.info("中电联平台查询充电站信息 params:{}", JSON.toJSONString(dto));
// try {
// // 校验令牌
// String token = request.getHeader("Authorization");
// if (!JWTUtils.checkThirdPartyToken(token)) {
// // 校验失败
// return CommonResult.failed("令牌校验错误");
// }
// // 校验签名
// Map<String, String> resultMap = lianLianService.checkoutSign(dto);
// if (resultMap == null) {
// // 签名错误
// return CommonResult.failed("签名校验错误");
// }
// String operatorSecret = resultMap.get("OperatorSecret");
// String dataString = resultMap.get("Data");
// String dataSecret = resultMap.get("DataSecret");
// String dataSecretIV = resultMap.get("DataSecretIV");
//
// // 解密data
// byte[] plainText = Cryptos.aesDecrypt(Encodes.decodeBase64(dataString), dataSecret.getBytes(), dataSecretIV.getBytes());
// String dataStr = new String(plainText, StandardCharsets.UTF_8);
// // 转换成相应对象
// QueryStationInfoDTO queryStationInfoDTO = JSONObject.parseObject(dataStr, QueryStationInfoDTO.class);
// queryStationInfoDTO.setOperatorId(dto.getOperatorID());
// queryStationInfoDTO.setThirdPlatformType(ThirdPlatformTypeEnum.NING_BO_PLATFORM.getTypeCode());
// Map<String, String> map = zdlService.queryStationsInfo(queryStationInfoDTO);
// logger.info("中电联平台查询充电站信息 result:{}", JSON.toJSONString(map));
// return CommonResult.success(0, "查询充电站信息成功!", map.get("Data"), map.get("Sig"));
// } catch (Exception e) {
// logger.info("中电联平台查询充电站信息 error:", e);
// e.printStackTrace();
// }
// return CommonResult.failed("查询充电站信息发生异常");
// }
@PostMapping("/v1/query_stations_info") @PostMapping("/v1/query_stations_info")
public CommonResult<?> query_stations_info(HttpServletRequest request, @RequestBody CommonParamsDTO dto) { public CommonResult<?> query_stations_info(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("中电联平台查询充电站信息 params:{}", JSON.toJSONString(dto)); logger.info("{}-查询充电站信息 params:{}", platformName, JSON.toJSONString(dto));
try { try {
// 校验令牌 // 校验令牌
String token = request.getHeader("Authorization"); if (!verifyToken(request.getHeader("Authorization"))) {
if (!JWTUtils.checkThirdPartyToken(token)) {
// 校验失败 // 校验失败
return CommonResult.failed("令牌校验错误"); return CommonResult.failed(ThirdPartyReturnCodeEnum.TOKEN_ERROR);
} }
// 校验签名
Map<String, String> resultMap = lianLianService.checkoutSign(dto);
if (resultMap == null) {
// 签名错误
return CommonResult.failed("签名校验错误");
}
String operatorSecret = resultMap.get("OperatorSecret");
String dataString = resultMap.get("Data");
String dataSecret = resultMap.get("DataSecret");
String dataSecretIV = resultMap.get("DataSecretIV");
// 解密data // 校验签名
byte[] plainText = Cryptos.aesDecrypt(Encodes.decodeBase64(dataString), dataSecret.getBytes(), dataSecretIV.getBytes()); if (!verifySignature(dto)) {
String dataStr = new String(plainText, StandardCharsets.UTF_8); // 签名错误
// 转换成相应对象 return CommonResult.failed(ThirdPartyReturnCodeEnum.SIGN_ERROR);
QueryStationInfoDTO queryStationInfoDTO = JSONObject.parseObject(dataStr, QueryStationInfoDTO.class); }
queryStationInfoDTO.setOperatorId(dto.getOperatorID());
queryStationInfoDTO.setThirdPlatformType(ThirdPlatformTypeEnum.NING_BO_PLATFORM.getTypeCode()); // 解析入参
Map<String, String> map = zdlService.queryStationsInfo(queryStationInfoDTO); QueryStationInfoDTO queryStationInfoDTO = parseParamsDTO(dto, QueryStationInfoDTO.class);
logger.info("中电联平台查询充电站信息 result:{}", JSON.toJSONString(map));
// 执行逻辑
Map<String, String> map = platformLogic.queryStationsInfo(queryStationInfoDTO);
return CommonResult.success(0, "查询充电站信息成功!", map.get("Data"), map.get("Sig")); return CommonResult.success(0, "查询充电站信息成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) { } catch (Exception e) {
logger.info("中电联平台查询充电站信息 error:", e); logger.info("{}-查询充电站信息 error:", platformName, e);
e.printStackTrace();
} }
return CommonResult.failed("查询充电站信息发生异常"); return CommonResult.failed("查询充电站信息发生异常");
} }
/** /**
* 中电联平台查询统计信息 * 中电联平台查询统计信息
* http://localhost:8080/zdl/v1/query_stations_stats * http://localhost:8080/zdl/v1/query_stations_stats
* @param dto * @param dto
* @return * @return
*/ */
// @PostMapping("/v1/query_station_stats")
// public CommonResult<?> queryStationStats(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
// logger.info("中电联平台查询统计信息 params:{}", JSON.toJSONString(dto));
// try {
// // 校验令牌
// String token = request.getHeader("Authorization");
// if (!JWTUtils.checkThirdPartyToken(token)) {
// // 校验失败
// return CommonResult.failed("令牌校验错误");
// }
// // 校验签名
// Map<String, String> resultMap = lianLianService.checkoutSign(dto);
// if (resultMap == null) {
// // 签名错误
// return CommonResult.failed("签名校验错误");
// }
// String operatorSecret = resultMap.get("OperatorSecret");
// String dataString = resultMap.get("Data");
// String dataSecret = resultMap.get("DataSecret");
// String dataSecretIV = resultMap.get("DataSecretIV");
//
// // 解密data
// byte[] plainText = Cryptos.aesDecrypt(Encodes.decodeBase64(dataString), dataSecret.getBytes(), dataSecretIV.getBytes());
// String dataStr = new String(plainText, StandardCharsets.UTF_8);
// // 转换成相应对象
// QueryStationInfoDTO queryStationInfoDTO = JSONObject.parseObject(dataStr, QueryStationInfoDTO.class);
// queryStationInfoDTO.setOperatorId(dto.getOperatorID());
// Map<String, String> map = zdlService.queryStationStats(queryStationInfoDTO);
// logger.info("中电联平台查询统计信息 result:{}", JSON.toJSONString(map));
// return CommonResult.success(0, "查询统计信息成功!", map.get("Data"), map.get("Sig"));
// } catch (Exception e) {
// logger.info("中电联平台查询统计信息 error:", e);
// e.printStackTrace();
// }
// return CommonResult.failed("查询统计信息发生异常");
// }
@PostMapping("/v1/query_station_stats") @PostMapping("/v1/query_station_stats")
public CommonResult<?> queryStationStats(HttpServletRequest request, @RequestBody CommonParamsDTO dto) { public CommonResult<?> query_station_stats(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("中电联平台查询统计信息 params:{}", JSON.toJSONString(dto)); logger.info("{}-查询统计信息 params:{}", platformName, JSON.toJSONString(dto));
try { try {
// 校验令牌 // 校验令牌
String token = request.getHeader("Authorization"); if (!verifyToken(request.getHeader("Authorization"))) {
if (!JWTUtils.checkThirdPartyToken(token)) {
// 校验失败 // 校验失败
return CommonResult.failed("令牌校验错误"); return CommonResult.failed(ThirdPartyReturnCodeEnum.TOKEN_ERROR);
} }
// 校验签名
Map<String, String> resultMap = lianLianService.checkoutSign(dto);
if (resultMap == null) {
// 签名错误
return CommonResult.failed("签名校验错误");
}
String operatorSecret = resultMap.get("OperatorSecret");
String dataString = resultMap.get("Data");
String dataSecret = resultMap.get("DataSecret");
String dataSecretIV = resultMap.get("DataSecretIV");
// 解密data // 校验签名
byte[] plainText = Cryptos.aesDecrypt(Encodes.decodeBase64(dataString), dataSecret.getBytes(), dataSecretIV.getBytes()); if (!verifySignature(dto)) {
String dataStr = new String(plainText, StandardCharsets.UTF_8); // 签名错误
// 转换成相应对象 return CommonResult.failed(ThirdPartyReturnCodeEnum.SIGN_ERROR);
QueryStationInfoDTO queryStationInfoDTO = JSONObject.parseObject(dataStr, QueryStationInfoDTO.class); }
queryStationInfoDTO.setOperatorId(dto.getOperatorID());
Map<String, String> map = zdlService.queryStationStats(queryStationInfoDTO); // 解析入参
logger.info("中电联平台查询统计信息 result:{}", JSON.toJSONString(map)); QueryStationInfoDTO queryStationInfoDTO = parseParamsDTO(dto, QueryStationInfoDTO.class);
// 执行逻辑
Map<String, String> map = platformLogic.queryStationStats(queryStationInfoDTO);
return CommonResult.success(0, "查询统计信息成功!", map.get("Data"), map.get("Sig")); return CommonResult.success(0, "查询统计信息成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) { } catch (Exception e) {
logger.info("中电联平台查询统计信息 error:", e); logger.info("{}-查询统计信息 error:", platformName, e);
e.printStackTrace();
} }
return CommonResult.failed("查询统计信息发生异常"); return CommonResult.failed("查询统计信息发生异常");
} }
/** /**
* 中电联平台设备接口状态查询 * 中电联平台设备接口状态查询
* http://localhost:8080/zdl/v1/query_stations_status * http://localhost:8080/zdl/v1/query_stations_status
* @param dto * @param dto
* @return * @return
*/ */
// @PostMapping("/v1/query_station_status")
// public CommonResult<?> queryStationStatus(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
// logger.info("中电联平台设备接口状态查询 params:{}", JSON.toJSONString(dto));
// try {
// // 校验令牌
// String token = request.getHeader("Authorization");
// if (!JWTUtils.checkThirdPartyToken(token)) {
// // 校验失败
// return CommonResult.failed("令牌校验错误");
// }
// // 校验签名
// Map<String, String> resultMap = lianLianService.checkoutSign(dto);
// if (resultMap == null) {
// // 签名错误
// return CommonResult.failed("签名校验错误");
// }
// String operatorSecret = resultMap.get("OperatorSecret");
// String dataString = resultMap.get("Data");
// String dataSecret = resultMap.get("DataSecret");
// String dataSecretIV = resultMap.get("DataSecretIV");
//
// // String dataString = "L31IkD83nw7bm+eWcvfB1U27uIqSBg29+CHyZu6+qlQ=";
// // String dataSecret = "vj3RWNsWIxT5MC2K";
// // String dataSecretIV = "jjkySnGlM3pbOUki";
//
// // 解密data
// byte[] plainText = Cryptos.aesDecrypt(Encodes.decodeBase64(dataString), dataSecret.getBytes(), dataSecretIV.getBytes());
// String dataStr = new String(plainText, StandardCharsets.UTF_8);
// // 转换成相应对象
// QueryStationInfoDTO queryStationInfoDTO = JSONObject.parseObject(dataStr, QueryStationInfoDTO.class);
// queryStationInfoDTO.setOperatorId(dto.getOperatorID());
// Map<String, String> map = zdlService.queryStationStatus(queryStationInfoDTO);
// logger.info("中电联平台设备接口状态查询 result:{}", JSON.toJSONString(map));
// return CommonResult.success(0, "设备接口状态查询成功!", map.get("Data"), map.get("Sig"));
// } catch (Exception e) {
// logger.info("中电联平台设备接口状态查询 error:", e);
// e.printStackTrace();
// }
// return CommonResult.failed("设备接口状态查询发生异常");
// }
@PostMapping("/v1/query_station_status") @PostMapping("/v1/query_station_status")
public CommonResult<?> queryStationStatus(HttpServletRequest request, @RequestBody CommonParamsDTO dto) { public CommonResult<?> query_stations_status(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("中电联平台设备接口状态查询 params:{}", JSON.toJSONString(dto)); logger.info("{}-设备接口状态查询 params:{}", platformName, JSON.toJSONString(dto));
try { try {
// 校验令牌 // 校验令牌
String token = request.getHeader("Authorization"); if (!verifyToken(request.getHeader("Authorization"))) {
if (!JWTUtils.checkThirdPartyToken(token)) {
// 校验失败 // 校验失败
return CommonResult.failed("令牌校验错误"); return CommonResult.failed(ThirdPartyReturnCodeEnum.TOKEN_ERROR);
} }
// 校验签名 // 校验签名
Map<String, String> resultMap = lianLianService.checkoutSign(dto); if (!verifySignature(dto)) {
if (resultMap == null) {
// 签名错误 // 签名错误
return CommonResult.failed("签名校验错误"); return CommonResult.failed(ThirdPartyReturnCodeEnum.SIGN_ERROR);
} }
String operatorSecret = resultMap.get("OperatorSecret");
String dataString = resultMap.get("Data");
String dataSecret = resultMap.get("DataSecret");
String dataSecretIV = resultMap.get("DataSecretIV");
// String dataString = "L31IkD83nw7bm+eWcvfB1U27uIqSBg29+CHyZu6+qlQ="; // 解析入参
// String dataSecret = "vj3RWNsWIxT5MC2K"; QueryStationInfoDTO queryStationInfoDTO = parseParamsDTO(dto, QueryStationInfoDTO.class);
// String dataSecretIV = "jjkySnGlM3pbOUki";
// 执行逻辑
Map<String, String> map = platformLogic.queryStationStatus(queryStationInfoDTO);
// 解密data
byte[] plainText = Cryptos.aesDecrypt(Encodes.decodeBase64(dataString), dataSecret.getBytes(), dataSecretIV.getBytes());
String dataStr = new String(plainText, StandardCharsets.UTF_8);
// 转换成相应对象
QueryStationInfoDTO queryStationInfoDTO = JSONObject.parseObject(dataStr, QueryStationInfoDTO.class);
queryStationInfoDTO.setOperatorId(dto.getOperatorID());
Map<String, String> map = zdlService.queryStationStatus(queryStationInfoDTO);
logger.info("中电联平台设备接口状态查询 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "设备接口状态查询成功!", map.get("Data"), map.get("Sig")); return CommonResult.success(0, "设备接口状态查询成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) { } catch (Exception e) {
logger.info("中电联平台设备接口状态查询 error:", e); logger.info("{}-设备接口状态查询 error:", platformName, e);
e.printStackTrace();
} }
return CommonResult.failed("设备接口状态查询发生异常"); return CommonResult.failed("设备接口状态查询发生异常");
} }
@@ -204,22 +303,23 @@ public class ZDLController extends BaseController {
*/ */
@PostMapping("/pushStationInfo") @PostMapping("/pushStationInfo")
public RestApiResponse<?> pushStationInfo(@RequestBody PushStationInfoDTO dto) { public RestApiResponse<?> pushStationInfo(@RequestBody PushStationInfoDTO dto) {
logger.info("推送中电联平台充电站信息 params:{}", JSON.toJSONString(dto)); logger.info("推送宁波平台充电站信息 params:{}", JSON.toJSONString(dto));
RestApiResponse<?> response = null; RestApiResponse<?> response = null;
try { try {
if (StringUtils.isBlank(String.valueOf(dto.getStationId()))) { if (StringUtils.isBlank(String.valueOf(dto.getStationId()))) {
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR); throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
} }
zdlService.pushStationInfo(dto); // zdlService.pushStationInfo(dto);
response = new RestApiResponse<>(); String result = platformLogic.notificationStationInfo(String.valueOf(dto.getStationId()));
response = new RestApiResponse<>(result);
}catch (BusinessException e) { }catch (BusinessException e) {
logger.error("推送中电联平台充电站信息 error",e); logger.error("推送宁波平台充电站信息 error",e);
response = new RestApiResponse<>(e.getCode(), e.getMessage()); response = new RestApiResponse<>(e.getCode(), e.getMessage());
}catch (Exception e) { }catch (Exception e) {
logger.error("推送中电联平台充电站信息 error", e); logger.error("推送宁波平台充电站信息 error", e);
response = new RestApiResponse<>(e); response = new RestApiResponse<>(e);
} }
logger.info("推送中电联平台充电站信息 result:{}", response); logger.info("推送宁波平台充电站信息 result:{}", response);
return response; return response;
} }
@@ -231,7 +331,7 @@ public class ZDLController extends BaseController {
*/ */
@PostMapping("/pushStationStatus") @PostMapping("/pushStationStatus")
public RestApiResponse<?> pushStationStatus(@RequestBody PushInfoParamDTO dto) { public RestApiResponse<?> pushStationStatus(@RequestBody PushInfoParamDTO dto) {
logger.info("中电联平台设备状态变化推送 params:{}", JSON.toJSONString(dto)); logger.info("宁波平台设备状态变化推送 params:{}", JSON.toJSONString(dto));
RestApiResponse<?> response = null; RestApiResponse<?> response = null;
try { try {
if (StringUtils.isBlank(String.valueOf(dto.getPileConnectorCode())) || if (StringUtils.isBlank(String.valueOf(dto.getPileConnectorCode())) ||
@@ -242,16 +342,17 @@ public class ZDLController extends BaseController {
pushRealTimeInfoDTO.setStatus(dto.getStatus()); pushRealTimeInfoDTO.setStatus(dto.getStatus());
pushRealTimeInfoDTO.setPileConnectorCode(dto.getPileConnectorCode()); pushRealTimeInfoDTO.setPileConnectorCode(dto.getPileConnectorCode());
pushRealTimeInfoDTO.setThirdPartyType(ThirdPlatformTypeEnum.NING_BO_PLATFORM.getTypeCode()); pushRealTimeInfoDTO.setThirdPartyType(ThirdPlatformTypeEnum.NING_BO_PLATFORM.getTypeCode());
String result = zdlService.notificationStationStatus(pushRealTimeInfoDTO); // String result = zdlService.notificationStationStatus(pushRealTimeInfoDTO);
String result = platformLogic.notificationStationStatus(pushRealTimeInfoDTO);
response = new RestApiResponse<>(result); response = new RestApiResponse<>(result);
}catch (BusinessException e) { }catch (BusinessException e) {
logger.error("中电联平台设备状态变化推送 error",e); logger.error("宁波平台设备状态变化推送 error",e);
response = new RestApiResponse<>(e.getCode(), e.getMessage()); response = new RestApiResponse<>(e.getCode(), e.getMessage());
}catch (Exception e) { }catch (Exception e) {
logger.error("中电联平台设备状态变化推送 error", e); logger.error("宁波平台设备状态变化推送 error", e);
response = new RestApiResponse<>(e); response = new RestApiResponse<>(e);
} }
logger.info("中电联平台设备状态变化推送 result:{}", response); logger.info("宁波平台设备状态变化推送 result:{}", response);
return response; return response;
} }
@@ -263,22 +364,23 @@ public class ZDLController extends BaseController {
*/ */
@GetMapping("/pushOrderInfo/{orderCode}") @GetMapping("/pushOrderInfo/{orderCode}")
public RestApiResponse<?> pushOrderInfo(@PathVariable("orderCode")String orderCode) { public RestApiResponse<?> pushOrderInfo(@PathVariable("orderCode")String orderCode) {
logger.info("中电联平台推送订单信息 params:{}", orderCode); logger.info("宁波平台推送订单信息 params:{}", orderCode);
RestApiResponse<?> response = null; RestApiResponse<?> response = null;
try { try {
if (StringUtils.isBlank(orderCode)) { if (StringUtils.isBlank(orderCode)) {
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR); throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
} }
String result = zdlService.pushChargeOrderInfo(orderCode); // String result = zdlService.pushChargeOrderInfo(orderCode);
String result = platformLogic.notificationChargeOrderInfo(orderCode);
response = new RestApiResponse<>(result); response = new RestApiResponse<>(result);
}catch (BusinessException e) { }catch (BusinessException e) {
logger.error("中电联平台推送订单信息 error",e); logger.error("宁波平台推送订单信息 error",e);
response = new RestApiResponse<>(e.getCode(), e.getMessage()); response = new RestApiResponse<>(e.getCode(), e.getMessage());
}catch (Exception e) { }catch (Exception e) {
logger.error("中电联平台推送订单信息 error", e); logger.error("宁波平台推送订单信息 error", e);
response = new RestApiResponse<>(e); response = new RestApiResponse<>(e);
} }
logger.info("中电联平台推送订单信息 result:{}", response); logger.info("宁波平台推送订单信息 result:{}", response);
return response; return response;
} }
} }