Commit 5ccd7950 authored by shulidong's avatar shulidong

日志打印修改

parent 73864636
......@@ -103,9 +103,9 @@ public class WeiXinController {
@ApiOperation("获取jsapi_ticket")
public BaseResponse<Map> getAccessToken() {
String accessToken = weiXinService.getJsapiTicket();
Map<String, String> rts = new HashMap<>(5);
Map<String, Object> rts = new HashMap<>(5);
rts.put("jsapi_ticket", accessToken);
rts.put("timestamp", (new Date()).getTime() / 1000 + "");
rts.put("timestamp", (new Date()).getTime() / 1000 );
rts.put("noncestr", "Wm3WZYTPz0wzccnW");
rts.put("app_id", "ww348f91b2573c1867");
rts.put("jsApiList","['scanQRCode']");
......@@ -129,6 +129,19 @@ public class WeiXinController {
return BaseResponse.okData(StrUtil.swapCase(tmpStr));
}
public static void main(String[] args) {
MessageDigest md;
String tmpStr = null;
String a = "jsapi_ticket=3d9f449ee34cf97c05644374df4832fb&noncestr=Wm3WZYTPz0wzccnW&timestamp=1619319544&url=https://lab.wisenergy.cn/app-bangye/scanCode";
try {
md = MessageDigest.getInstance("SHA-1");
byte[] digest = md.digest(a.getBytes());
tmpStr = byteToStr(digest);
System.out.println(tmpStr);
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
}
/**
* 将字节数组转换为十六进制字符串
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment