停车平台计算sign

This commit is contained in:
Guoqs
2025-01-07 15:13:59 +08:00
parent 1632604c88
commit 3433cf053d

View File

@@ -21,11 +21,6 @@ public class ParkingUtil {
.sorted(Map.Entry.comparingByKey())
.forEach(entry -> stringA.append(entry.getKey()).append("=").append(entry.getValue()).append("|"));
// 去除最后的“|”符号
// if (stringA.length() > 0) {
// stringA.deleteCharAt(stringA.length() - 1);
// }
// Step 2: 过滤空值并按照ASCII码排序业务参数
StringBuilder stringB = new StringBuilder();
businessParams.entrySet().stream()
@@ -33,11 +28,6 @@ public class ParkingUtil {
.sorted(Map.Entry.comparingByKey())
.forEach(entry -> stringB.append(entry.getKey()).append("=").append(entry.getValue()).append("|"));
// 去除最后的“|”符号
// if (stringB.length() > 0) {
// stringB.deleteCharAt(stringB.length() - 1);
// }
// Step 3: 拼接字符串A、B和机构密钥
String stringC = stringA.toString() + stringB.toString() + secretKey;