|
@@ -2,11 +2,14 @@ package com.smppw.analysis.infrastructure.utils;
|
|
|
|
|
|
import cn.hutool.core.collection.ListUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import cn.hutool.crypto.SignUtil;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
public class CommonUtils {
|
|
|
private static final Logger logger = LoggerFactory.getLogger(CommonUtils.class);
|
|
@@ -44,4 +47,14 @@ public class CommonUtils {
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
+
|
|
|
+ public static void main(String[] args) {
|
|
|
+ String appSecret = "abcdef";
|
|
|
+ String timestamp = "1691991341095";
|
|
|
+ Map<String, Object> params = new HashMap<>();
|
|
|
+ params.put("secId", "MF00005JMD");
|
|
|
+ params.put("indexIds", ListUtil.of("IN00000008", "IN0000000M"));
|
|
|
+ String sign = SignUtil.signParamsMd5(params, appSecret, timestamp);
|
|
|
+ System.out.println(sign);
|
|
|
+ }
|
|
|
}
|