update 联联

This commit is contained in:
Lemon
2023-05-30 14:22:34 +08:00
parent ce6661c206
commit 94506744aa
3 changed files with 59 additions and 28 deletions

View File

@@ -269,17 +269,21 @@ public class LianLianServiceImpl implements LianLianService {
resultList.add(stationInfo);
}
LianLianPageResponse pageResponse = LianLianPageResponse.builder()
.PageNo(pageInfo.getPageNum())
.PageCount(pageInfo.getPages())
.ItemSize(resultList.size())
.list(resultList)
.build();
Map<String, Object> map = new LinkedHashMap<>();
map.put("PageNo", pageInfo.getPageNum());
map.put("PageCount", pageInfo.getPages());
map.put("ItemSize", resultList.size());
map.put("StationInfos", resultList);
// LianLianPageResponse pageResponse = LianLianPageResponse.builder()
// .PageNo(pageInfo.getPageNum())
// .PageCount(pageInfo.getPages())
// .ItemSize(resultList.size())
// .list(resultList)
// .build();
// 加密
Map<String, String> resultMap = Maps.newLinkedHashMap();
// 加密数据
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(pageResponse).getBytes(),
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(map).getBytes(),
configInfo.getOperatorSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
String encryptData = Encodes.encodeBase64(encryptText);
@@ -361,16 +365,19 @@ public class LianLianServiceImpl implements LianLianService {
int total = StationStatusInfos.size();
int pages = PageUtil.totalPage(total, pageSize);
LianLianPageResponse response = LianLianPageResponse.builder()
.PageCount(pages)
.PageNo(pageNum)
.list(collect)
.ItemSize(total)
.build();
Map<String, Object> map = new LinkedHashMap<>();
map.put("Total", total);
map.put("StationStatusInfos", collect);
// LianLianPageResponse response = LianLianPageResponse.builder()
// .PageCount(pages)
// .PageNo(pageNum)
// .list(collect)
// .ItemSize(total)
// .build();
// 加密
Map<String, String> resultMap = Maps.newLinkedHashMap();
// 加密数据
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(response).getBytes(),
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(map).getBytes(),
configInfo.getOperatorSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
String encryptData = Encodes.encodeBase64(encryptText);