mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-22 12:05:05 +08:00
update 打印日志
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.jsowell.thirdparty.amap.util;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -85,7 +86,7 @@ public class AMapUtils {
|
||||
*/
|
||||
public static Map<String, String> generateParamMap(JSONObject bizContent, String SPI) throws Exception {
|
||||
Map<String, String> map = new LinkedHashMap<>();
|
||||
map.put("biz_content", JSONObject.toJSONString(bizContent));
|
||||
map.put("biz_content", JSON.toJSONString(bizContent));
|
||||
map.put("app_id", APP_ID);
|
||||
map.put("utc_timestamp", String.valueOf(System.currentTimeMillis()));
|
||||
map.put("version", "1.0");
|
||||
@@ -121,7 +122,7 @@ public class AMapUtils {
|
||||
JSONObject respObj = JSONObject.parseObject(resp.getBody());
|
||||
logger.info("高德返回结果:{}", respObj);
|
||||
// System.out.println("高德返回结果:" + respObj);
|
||||
return JSONObject.toJSONString(respObj);
|
||||
return JSON.toJSONString(respObj);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.jsowell.thirdparty.common;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.jsowell.common.constant.CacheConstants;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
@@ -23,12 +24,12 @@ import com.jsowell.pile.dto.ruanjie.UseCouponDTO;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
|
||||
import com.jsowell.pile.vo.web.PileStationVO;
|
||||
import com.jsowell.thirdparty.platform.hainan.service.HaiNanPlatformLogic;
|
||||
import com.jsowell.thirdparty.huawei.HuaWeiService;
|
||||
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
||||
import com.jsowell.thirdparty.lianlian.util.HttpRequestUtil;
|
||||
import com.jsowell.thirdparty.lutongyunting.service.LTYTService;
|
||||
import com.jsowell.thirdparty.nanrui.service.NRService;
|
||||
import com.jsowell.thirdparty.platform.hainan.service.HaiNanPlatformLogic;
|
||||
import com.jsowell.thirdparty.ruanjie.service.RJService;
|
||||
import com.jsowell.thirdparty.xindiantu.service.XDTService;
|
||||
import com.jsowell.thirdparty.yongchengboche.dto.YCBCGetTokenDTO;
|
||||
@@ -417,7 +418,7 @@ public class CommonService {
|
||||
json.put("StartChargeSeqStat", 2); // 一定要给 2-充电中
|
||||
json.put("StartTime", DateUtils.getDateTime());
|
||||
|
||||
String jsonString = JSONObject.toJSONString(json);
|
||||
String jsonString = JSON.toJSONString(json);
|
||||
|
||||
String token = "";
|
||||
String result = "";
|
||||
|
||||
@@ -24,13 +24,11 @@ import com.jsowell.pile.domain.*;
|
||||
import com.jsowell.pile.domain.huawei.HWStationInfo;
|
||||
import com.jsowell.pile.domain.huawei.HWStationStatusInfo;
|
||||
import com.jsowell.pile.dto.GenerateOrderDTO;
|
||||
import com.jsowell.pile.dto.PushStationInfoDTO;
|
||||
import com.jsowell.pile.dto.QueryStartChargeDTO;
|
||||
import com.jsowell.pile.dto.huawei.*;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.transaction.dto.OrderTransactionDTO;
|
||||
import com.jsowell.pile.transaction.service.TransactionService;
|
||||
import com.jsowell.pile.vo.huawei.DeliverEquipBusinessPolicyVO;
|
||||
import com.jsowell.pile.vo.huawei.QueryChargeStatusVO;
|
||||
import com.jsowell.pile.vo.huawei.QueryEquipAuthVO;
|
||||
import com.jsowell.pile.vo.huawei.QueryStartChargeVO;
|
||||
@@ -38,16 +36,13 @@ import com.jsowell.pile.vo.uniapp.BillingPriceVO;
|
||||
import com.jsowell.pile.vo.web.PileStationVO;
|
||||
import com.jsowell.thirdparty.lianlian.common.CommonResult;
|
||||
import com.jsowell.thirdparty.lianlian.domain.ConnectorStatusInfo;
|
||||
import com.jsowell.thirdparty.lianlian.domain.StationStatusInfo;
|
||||
import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO;
|
||||
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
||||
import com.jsowell.thirdparty.lianlian.util.Cryptos;
|
||||
import com.jsowell.thirdparty.lianlian.util.Encodes;
|
||||
import com.jsowell.thirdparty.lianlian.util.GBSignUtils;
|
||||
import com.jsowell.thirdparty.lianlian.util.HttpRequestUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -151,7 +146,7 @@ public class HuaweiServiceV2 {
|
||||
String sig = GBSignUtils.sign(request, signSecret);
|
||||
request.put("Sig", sig);
|
||||
|
||||
String tokenRequest = JSONObject.toJSONString(request);
|
||||
String tokenRequest = JSON.toJSONString(request);
|
||||
// 向华为发送请求
|
||||
String response = HttpUtil.post(requestUrl, tokenRequest);
|
||||
|
||||
@@ -214,7 +209,7 @@ public class HuaweiServiceV2 {
|
||||
hwStationInfo.setEquipmentInfoNum(equipmentLogicInfos.size());
|
||||
hwStationInfo.setEquipmentLogicInfos(equipmentLogicInfos);
|
||||
|
||||
String jsonString = JSONObject.toJSONString(hwStationInfo);
|
||||
String jsonString = JSON.toJSONString(hwStationInfo);
|
||||
|
||||
// 获取令牌
|
||||
String token = getHuaWeiToken();
|
||||
@@ -478,7 +473,7 @@ public class HuaweiServiceV2 {
|
||||
params.setSumChargePolicyInfos(pricePolicyInfos.size());
|
||||
params.setChargePolicyInfos(chargePolicyInfos);
|
||||
|
||||
String jsonString = JSONObject.toJSONString(params);
|
||||
String jsonString = JSON.toJSONString(params);
|
||||
|
||||
// 向华为发送请求
|
||||
// 获取令牌
|
||||
@@ -619,7 +614,7 @@ public class HuaweiServiceV2 {
|
||||
}
|
||||
// 将源数据存储至缓存
|
||||
String redisKey = "HUA_WEI_REAL_TIME_INFO_BY_ORDER_CODE:" + startChargeSeq;
|
||||
String jsonMsg = JSONObject.toJSONString(dto);
|
||||
String jsonMsg = JSON.toJSONString(dto);
|
||||
// 在同一分钟内,只保留最后一条实时数据
|
||||
redisCache.hset(redisKey, DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:00", new Date()), jsonMsg);
|
||||
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
package com.jsowell.thirdparty.huawei.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
||||
import com.jsowell.common.enums.ykc.StartModeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.BytesUtil;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.common.util.YKCUtils;
|
||||
import com.jsowell.pile.domain.*;
|
||||
import com.jsowell.pile.domain.huawei.HWStationInfo;
|
||||
import com.jsowell.pile.dto.*;
|
||||
@@ -16,7 +15,6 @@ import com.jsowell.pile.dto.huawei.DeliverEquipBusinessDTO;
|
||||
import com.jsowell.pile.dto.huawei.ReceiveDeliverDTO;
|
||||
import com.jsowell.pile.dto.huawei.VinStartChargeDTO;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.vo.base.ConnectorInfoVO;
|
||||
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
|
||||
import com.jsowell.pile.vo.uniapp.BillingPriceVO;
|
||||
import com.jsowell.pile.vo.web.PileStationVO;
|
||||
@@ -408,7 +406,7 @@ public class HuaWeiServiceImpl implements HuaWeiService {
|
||||
params.setSumChargePolicyInfos(pricePolicyInfos.size());
|
||||
params.setChargePolicyInfos(chargePolicyInfos);
|
||||
|
||||
String jsonString = JSONObject.toJSONString(params);
|
||||
String jsonString = JSON.toJSONString(params);
|
||||
|
||||
// 获取请求参数
|
||||
String operatorId = relationInfo.getOperatorId();
|
||||
@@ -463,7 +461,7 @@ public class HuaWeiServiceImpl implements HuaWeiService {
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(map).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
@@ -528,7 +526,7 @@ public class HuaWeiServiceImpl implements HuaWeiService {
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(paramMap).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(paramMap).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
@@ -578,7 +576,7 @@ public class HuaWeiServiceImpl implements HuaWeiService {
|
||||
hwStationInfo.setEquipmentInfoNum(equipmentLogicInfos.size());
|
||||
hwStationInfo.setEquipmentLogicInfos(equipmentLogicInfos);
|
||||
|
||||
String jsonString = JSONObject.toJSONString(hwStationInfo);
|
||||
String jsonString = JSON.toJSONString(hwStationInfo);
|
||||
|
||||
String url = urlAddress + "notification_operation_system_info";
|
||||
// 获取令牌
|
||||
|
||||
@@ -33,7 +33,6 @@ import com.jsowell.pile.vo.lianlian.AccumulativeInfoVO;
|
||||
import com.jsowell.pile.vo.lianlian.PushStationFeeVO;
|
||||
import com.jsowell.pile.vo.uniapp.BillingPriceVO;
|
||||
import com.jsowell.pile.vo.web.PileConnectorInfoVO;
|
||||
import com.jsowell.pile.vo.web.PileDetailVO;
|
||||
import com.jsowell.pile.vo.web.PileModelInfoVO;
|
||||
import com.jsowell.pile.vo.web.PileStationVO;
|
||||
import com.jsowell.thirdparty.common.CommonService;
|
||||
@@ -56,8 +55,6 @@ import org.springframework.stereotype.Service;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -242,11 +239,11 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
// 调用联联平台接口
|
||||
String url = urlAddress + "notification_stationInfo";
|
||||
|
||||
String jsonStr = JSONObject.toJSONString(info);
|
||||
String jsonStr = JSON.toJSONString(info);
|
||||
JSONObject data = new JSONObject();
|
||||
data.put("StationInfo", jsonStr);
|
||||
|
||||
String jsonString = JSONObject.toJSONString(data);
|
||||
String jsonString = JSON.toJSONString(data);
|
||||
System.out.println("jsonString : " + jsonString);
|
||||
|
||||
// 获取令牌
|
||||
@@ -365,11 +362,11 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
// 调用联联平台接口
|
||||
String url = urlAddress + "notification_stationInfo";
|
||||
|
||||
String jsonStr = JSONObject.toJSONString(info);
|
||||
String jsonStr = JSON.toJSONString(info);
|
||||
JSONObject data = new JSONObject();
|
||||
data.put("StationInfo", jsonStr);
|
||||
|
||||
String jsonString = JSONObject.toJSONString(data);
|
||||
String jsonString = JSON.toJSONString(data);
|
||||
System.out.println("jsonString : " + jsonString);
|
||||
|
||||
// 获取令牌
|
||||
@@ -404,7 +401,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
//
|
||||
// Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
// byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(json).getBytes(),
|
||||
// byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(json).getBytes(),
|
||||
// dataSecret.getBytes(), dataSecretIV.getBytes());
|
||||
// String encryptData = Encodes.encodeBase64(encryptText);
|
||||
//
|
||||
@@ -497,7 +494,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(map).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
@@ -590,7 +587,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(map).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
@@ -689,7 +686,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(map).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
@@ -745,7 +742,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
vo.setFailReasonMsg("未查到该桩的数据");
|
||||
}
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(vo).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(vo).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
@@ -819,7 +816,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(vo).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(vo).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
@@ -906,7 +903,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(vo).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(vo).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
@@ -962,7 +959,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(vo).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(vo).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
@@ -1071,7 +1068,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
// 调用联联平台接口
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("ConnectorStatusInfo", info);
|
||||
String jsonString = JSONObject.toJSONString(json);
|
||||
String jsonString = JSON.toJSONString(json);
|
||||
// 获取令牌
|
||||
String result = "";
|
||||
String token = "";
|
||||
@@ -1216,7 +1213,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
// 调用联联平台接口
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("OrderInfo", orderInfo);
|
||||
String jsonString = JSONObject.toJSONString(json);
|
||||
String jsonString = JSON.toJSONString(json);
|
||||
|
||||
String result = HttpRequestUtil.sendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);
|
||||
|
||||
@@ -1274,7 +1271,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
json.put("StartChargeSeqStat", 2); // 一定要给 2-充电中
|
||||
json.put("StartTime", DateUtils.getDateTime());
|
||||
|
||||
String jsonString = JSONObject.toJSONString(json);
|
||||
String jsonString = JSON.toJSONString(json);
|
||||
|
||||
String token = "";
|
||||
String result = "";
|
||||
@@ -1343,7 +1340,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
|
||||
String url = urlAddress + BusinessInformationExchangeEnum.NOTIFICATION_EQUIP_CHARGE_STATUS.getValue();
|
||||
// 调用联联平台接口
|
||||
String jsonString = JSONObject.toJSONString(vo);
|
||||
String jsonString = JSON.toJSONString(vo);
|
||||
|
||||
// 获取令牌
|
||||
String token = "";
|
||||
@@ -1419,7 +1416,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
json.put("SuccStat", 0);
|
||||
json.put("FailReason", 0);
|
||||
|
||||
String jsonString = JSONObject.toJSONString(json);
|
||||
String jsonString = JSON.toJSONString(json);
|
||||
|
||||
// 获取token
|
||||
String token = "";
|
||||
@@ -1491,7 +1488,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
json.put("TotalMoney", orderDetail.getTotalOrderAmount().setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
json.put("StopReason", 2); // 2:BMS 停止充电
|
||||
|
||||
String jsonString = JSONObject.toJSONString(json);
|
||||
String jsonString = JSON.toJSONString(json);
|
||||
|
||||
// 获取令牌
|
||||
String token = "";
|
||||
@@ -1552,7 +1549,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(map).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(),
|
||||
platformConfig.getDataSecret().getBytes(), platformConfig.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
@@ -1575,7 +1572,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("StartChargeSeq", orderCode);
|
||||
String jsonString = JSONObject.toJSONString(json);
|
||||
String jsonString = JSON.toJSONString(json);
|
||||
|
||||
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
||||
|
||||
@@ -1662,7 +1659,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
if (StringUtils.isBlank(token)) {
|
||||
return null;
|
||||
}
|
||||
String jsonString = JSONObject.toJSONString(json);
|
||||
String jsonString = JSON.toJSONString(json);
|
||||
// 发送请求
|
||||
String result = HttpRequestUtil.sendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);
|
||||
|
||||
@@ -1725,7 +1722,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("ConnectorChargeStatusInfo", info);
|
||||
|
||||
String jsonString = JSONObject.toJSONString(json);
|
||||
String jsonString = JSON.toJSONString(json);
|
||||
// 发送请求
|
||||
String result = HttpRequestUtil.sendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);
|
||||
|
||||
@@ -1792,7 +1789,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
}
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("StationFee", vo);
|
||||
String jsonString = JSONObject.toJSONString(json);
|
||||
String jsonString = JSON.toJSONString(json);
|
||||
// 发送请求
|
||||
String result = HttpRequestUtil.sendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);
|
||||
|
||||
@@ -1854,7 +1851,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(vo).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(vo).getBytes(),
|
||||
dataSecret.getBytes(), dataSecretIv.getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.jsowell.thirdparty.nanrui.service.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.google.common.collect.Lists;
|
||||
@@ -431,7 +432,7 @@ public class NRServiceImpl implements NRService {
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(map).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
@@ -492,7 +493,7 @@ public class NRServiceImpl implements NRService {
|
||||
JSONObject data = new JSONObject();
|
||||
data.put("AlarmInfos", nrAlarmInfos);
|
||||
|
||||
String jsonString = JSONObject.toJSONString(data);
|
||||
String jsonString = JSON.toJSONString(data);
|
||||
System.out.println("jsonString : " + jsonString);
|
||||
|
||||
// 获取令牌
|
||||
@@ -566,7 +567,7 @@ public class NRServiceImpl implements NRService {
|
||||
// 发送请求
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("ConnectorStatusInfo", nrConnectorStatusInfo);
|
||||
String jsonString = JSONObject.toJSONString(json);
|
||||
String jsonString = JSON.toJSONString(json);
|
||||
|
||||
String result = HttpRequestUtil.nrSendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);
|
||||
return result;
|
||||
@@ -648,7 +649,7 @@ public class NRServiceImpl implements NRService {
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(map).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
@@ -698,7 +699,7 @@ public class NRServiceImpl implements NRService {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("OrderInfo", nrOrderInfo);
|
||||
|
||||
String jsonString = JSONObject.toJSONString(jsonObject);
|
||||
String jsonString = JSON.toJSONString(jsonObject);
|
||||
|
||||
String result = HttpRequestUtil.nrSendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);
|
||||
return result;
|
||||
@@ -728,7 +729,7 @@ public class NRServiceImpl implements NRService {
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(resultList).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(resultList).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.jsowell.thirdparty.ningxiajiaotou.service.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
@@ -108,7 +108,7 @@ public class NXJTServiceImpl implements NXJTService {
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(map).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
@@ -155,7 +155,7 @@ public class NXJTServiceImpl implements NXJTService {
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(map).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
@@ -214,7 +214,7 @@ public class NXJTServiceImpl implements NXJTService {
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(map).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
|
||||
@@ -268,7 +268,7 @@ public abstract class AbsInterfaceWithPlatformLogic implements InitializingBean
|
||||
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(vo).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(vo).getBytes(),
|
||||
dataSecret.getBytes(), dataSecretIv.getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ public class HaiNanPlatformLogic extends AbsInterfaceWithPlatformLogic {
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(map).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
@@ -259,7 +259,7 @@ public class HaiNanPlatformLogic extends AbsInterfaceWithPlatformLogic {
|
||||
// 调用联联平台接口
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("ConnectorStatusInfo", info);
|
||||
String jsonString = JSONObject.toJSONString(json);
|
||||
String jsonString = JSON.toJSONString(json);
|
||||
// 获取令牌
|
||||
String token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret);
|
||||
String result = HttpRequestUtil.sendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);
|
||||
@@ -306,7 +306,7 @@ public class HaiNanPlatformLogic extends AbsInterfaceWithPlatformLogic {
|
||||
json.put("TotalMoney", orderDetail.getTotalOrderAmount().setScale(2, RoundingMode.HALF_UP));
|
||||
json.put("StopReason", 2); // 2:BMS 停止充电
|
||||
|
||||
String jsonString = JSONObject.toJSONString(json);
|
||||
String jsonString = JSON.toJSONString(json);
|
||||
|
||||
// 获取令牌
|
||||
String token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret);
|
||||
@@ -393,7 +393,7 @@ public class HaiNanPlatformLogic extends AbsInterfaceWithPlatformLogic {
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(map).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
@@ -493,7 +493,7 @@ public class HaiNanPlatformLogic extends AbsInterfaceWithPlatformLogic {
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(map).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
@@ -547,7 +547,7 @@ public class HaiNanPlatformLogic extends AbsInterfaceWithPlatformLogic {
|
||||
vo.setFailReasonMsg("未查到该桩的数据");
|
||||
}
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(vo).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(vo).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
@@ -610,7 +610,7 @@ public class HaiNanPlatformLogic extends AbsInterfaceWithPlatformLogic {
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(vo).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(vo).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
@@ -672,7 +672,7 @@ public class HaiNanPlatformLogic extends AbsInterfaceWithPlatformLogic {
|
||||
json.put("StartChargeSeqStat", 2); // 一定要给 2-充电中
|
||||
json.put("StartTime", DateUtils.getDateTime());
|
||||
|
||||
String jsonString = JSONObject.toJSONString(json);
|
||||
String jsonString = JSON.toJSONString(json);
|
||||
|
||||
String token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret);
|
||||
String result = HttpRequestUtil.sendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);
|
||||
@@ -733,7 +733,7 @@ public class HaiNanPlatformLogic extends AbsInterfaceWithPlatformLogic {
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(vo).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(vo).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
@@ -816,7 +816,7 @@ public class HaiNanPlatformLogic extends AbsInterfaceWithPlatformLogic {
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(vo).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(vo).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
@@ -873,7 +873,7 @@ public class HaiNanPlatformLogic extends AbsInterfaceWithPlatformLogic {
|
||||
|
||||
String url = urlAddress + BusinessInformationExchangeEnum.NOTIFICATION_EQUIP_CHARGE_STATUS.getValue();
|
||||
// 调用联联平台接口
|
||||
String jsonString = JSONObject.toJSONString(vo);
|
||||
String jsonString = JSON.toJSONString(vo);
|
||||
|
||||
// 获取令牌
|
||||
String token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret);
|
||||
@@ -922,7 +922,7 @@ public class HaiNanPlatformLogic extends AbsInterfaceWithPlatformLogic {
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(vo).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(vo).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
@@ -971,7 +971,7 @@ public class HaiNanPlatformLogic extends AbsInterfaceWithPlatformLogic {
|
||||
json.put("SuccStat", 0);
|
||||
json.put("FailReason", 0);
|
||||
|
||||
String jsonString = JSONObject.toJSONString(json);
|
||||
String jsonString = JSON.toJSONString(json);
|
||||
|
||||
// 获取token
|
||||
String token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret);
|
||||
@@ -1018,7 +1018,7 @@ public class HaiNanPlatformLogic extends AbsInterfaceWithPlatformLogic {
|
||||
json.put("TotalMoney", orderDetail.getTotalOrderAmount().setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
json.put("StopReason", 2); // 2:BMS 停止充电
|
||||
|
||||
String jsonString = JSONObject.toJSONString(json);
|
||||
String jsonString = JSON.toJSONString(json);
|
||||
|
||||
// 获取令牌
|
||||
String token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.jsowell.thirdparty.zhongdianlian.service.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.google.common.collect.Lists;
|
||||
@@ -165,7 +166,7 @@ public class ZDLServiceImpl implements ZDLService {
|
||||
JSONObject data = new JSONObject();
|
||||
data.put("StationInfo", info);
|
||||
|
||||
String jsonString = JSONObject.toJSONString(data);
|
||||
String jsonString = JSON.toJSONString(data);
|
||||
System.out.println("jsonString : " + jsonString);
|
||||
|
||||
// 获取令牌
|
||||
@@ -254,7 +255,7 @@ public class ZDLServiceImpl implements ZDLService {
|
||||
JSONObject data = new JSONObject();
|
||||
data.put("StationInfo", info);
|
||||
|
||||
String jsonString = JSONObject.toJSONString(data);
|
||||
String jsonString = JSON.toJSONString(data);
|
||||
System.out.println("jsonString : " + jsonString);
|
||||
|
||||
// 获取令牌
|
||||
@@ -383,7 +384,7 @@ public class ZDLServiceImpl implements ZDLService {
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(map).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
@@ -520,7 +521,7 @@ public class ZDLServiceImpl implements ZDLService {
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(vo).getBytes(),
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(vo).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user