From eb6b6dbb35a9f029e0b7d269773685c19fd40976 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期四, 11 七月 2024 10:47:51 +0800
Subject: [PATCH] 玩湃微信商户认证代码

---
 cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/util/SignUtil.java |   38 +++-----------------------------------
 1 files changed, 3 insertions(+), 35 deletions(-)

diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/util/SignUtil.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/util/SignUtil.java
index 72a4b79..da99632 100644
--- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/util/SignUtil.java
+++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/util/SignUtil.java
@@ -73,47 +73,15 @@
     private static String byteArrayToString(byte[] byteArray){
         StringBuilder strBuilder = new StringBuilder();
         for (int i = 0; i < byteArray.length; i++) {
-            if (Integer.toHexString(0xFF & byteArray[i]).length() == 1)
+            if (Integer.toHexString(0xFF & byteArray[i]).length() == 1) {
                 strBuilder.append("0").append(Integer.toHexString(0xFF & byteArray[i]));
-            else
+            } else {
                 strBuilder.append(Integer.toHexString(0xFF & byteArray[i]));
+            }
         }
         return strBuilder.toString();
     }
 
-//    public static void main(String[] args) {
-        //Get
-        /*Long time = new Date().getTime();
-        Map<String, Object> map = new HashMap<>();
-        map.put("client_id","f168c651bf86f2c1");
-        map.put("timestamp",time);
-        map.put("longitude","120.10");
-        map.put("latitude","30.19");
-        String url = "https://sandbox-cop.caocaokeji.cn/v2/common/queryCity";
-        String response = PlatformUtil.doGet(url,"client_id=f168c651bf86f2c1&timestamp="+time+"&sign="+SignUtil.sign(map)+"&longitude=120.10&latitude=30.19",null,100000);
-        com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(response);
-        System.out.println(jsonObject.toJSONString());*/
-        //Post
-       /* Map<String,Object> map = new HashMap<>();
-        map.put("client_id","f168c651bf86f2c1");
-        map.put("timestamp",new Date().getTime());
-        map.put("order_id",1);
-        map.put("score","3");
-        map.put("content","测试数据");
-        map.put("sign",SignUtil.sign(map));
-        String jsonMsg =JSONObject.toJSONString(map);
-        String url = "/v2/common/evaluateOrder";
-        TokenUtil.RequestEntity req = new TokenUtil.RequestEntity();
-        req.setReqMethod(TokenUtil.REQ_METHOD_POST);
-        req.setUri(url);
-        req.setContent(jsonMsg);
-        DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        req.setReqTime(dateFormat.format(new Date()));
-        String response = PlatformUtil.doPostJson1("https://sandbox-cop.caocaokeji.cn"+url,req.getContent(),null);
-        System.out.println(JSONObject.parseObject(response));*/
 
-//        System.out.println(new Date().getTime());
-//
-//    }
 
 }

--
Gitblit v1.7.1