diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/ThirdPartyPlatformService.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/ThirdPartyPlatformService.java index c50cbfd78..211ce3a50 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/ThirdPartyPlatformService.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/ThirdPartyPlatformService.java @@ -420,9 +420,10 @@ public interface ThirdPartyPlatformService { Map resultMap = Maps.newLinkedHashMap(); // 加密数据 - byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(vo).getBytes(), - dataSecret.getBytes(), dataSecretIv.getBytes()); - String encryptData = Encodes.encodeBase64(encryptText); + // byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(vo).getBytes(), + // dataSecret.getBytes(), dataSecretIv.getBytes()); + // String encryptData = Encodes.encodeBase64(encryptText); + String encryptData = Cryptos.aesEncrypt(JSON.toJSONString(vo), dataSecret, dataSecretIv); resultMap.put("Data", encryptData); // 生成sig diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/lianlian/service/LianLianPlatformServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/lianlian/service/LianLianPlatformServiceImpl.java index e15196c10..50833f9ce 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/lianlian/service/LianLianPlatformServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/lianlian/service/LianLianPlatformServiceImpl.java @@ -29,7 +29,6 @@ import com.jsowell.pile.vo.uniapp.BillingPriceVO; import com.jsowell.pile.vo.web.PileStationVO; import com.jsowell.thirdparty.lianlian.domain.*; 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 com.jsowell.thirdparty.platform.ThirdPartyPlatformService; @@ -174,18 +173,13 @@ public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService { map.put("ItemSize", resultList.size()); map.put("StationInfos", resultList); - // 加密 Map resultMap = Maps.newLinkedHashMap(); // 加密数据 - byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(), - configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes()); - String encryptData = Encodes.encodeBase64(encryptText); - + String encryptData = Cryptos.aesEncrypt(JSON.toJSONString(map), configInfo.getDataSecret(), configInfo.getDataSecretIv()); resultMap.put("Data", encryptData); // 生成sig String resultSign = GBSignUtils.sign(resultMap, configInfo.getSignSecret()); resultMap.put("Sig", resultSign); - return resultMap; } @@ -266,18 +260,13 @@ public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService { map.put("Total", total); map.put("StationStatusInfos", collect); - // 加密 Map resultMap = Maps.newLinkedHashMap(); // 加密数据 - byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(), - configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes()); - String encryptData = Encodes.encodeBase64(encryptText); - + String encryptData = Cryptos.aesEncrypt(JSON.toJSONString(map), configInfo.getDataSecret(), configInfo.getDataSecretIv()); resultMap.put("Data", encryptData); // 生成sig String resultSign = GBSignUtils.sign(resultMap, configInfo.getSignSecret()); resultMap.put("Sig", resultSign); - return resultMap; } @@ -365,18 +354,13 @@ public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService { Map map = new LinkedHashMap<>(); map.put("StationStats", stationStatsInfo); - // 加密 Map resultMap = Maps.newLinkedHashMap(); // 加密数据 - byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(), - configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes()); - String encryptData = Encodes.encodeBase64(encryptText); - + String encryptData = Cryptos.aesEncrypt(JSON.toJSONString(map), configInfo.getDataSecret(), configInfo.getDataSecretIv()); resultMap.put("Data", encryptData); // 生成sig String resultSign = GBSignUtils.sign(resultMap, configInfo.getSignSecret()); resultMap.put("Sig", resultSign); - return resultMap; }