pos机部分逻辑

This commit is contained in:
liuyingfang
2023-04-12 10:27:55 +08:00
parent cb4ec5d64e
commit 403df2b287
4 changed files with 88 additions and 10 deletions

View File

@@ -34,11 +34,11 @@ public class TokenUtil {
* @param requestId 请求ID自定义
* @return
*/
public static Map<String, String> getToken(String timestamp, String requestId) {
public static Map<String, String> getToken(String timestamp, String requestId,String appId) {
String token = "";
String encode = "";
SortedMap<String, Object> map = new TreeMap();
map.put("appId", APP_ID);
map.put("appId", appId);
map.put("timestamp", timestamp);
map.put("requestId", requestId);
Iterator<Map.Entry<String, Object>> iterator = map.entrySet().iterator();
@@ -62,7 +62,7 @@ public class TokenUtil {
System.out.println(s);
String s1 = UUID.randomUUID().toString();
System.out.println(s1);
Map<String, String> token = getToken(s, s1);
Map<String, String> token = getToken(s, s1,APP_SECRET);
System.out.println(token);
}