no message
parent
c56d4a3f80
commit
4aa9bbc534
|
|
@ -1,5 +1,6 @@
|
|||
package com.youchain.utils;
|
||||
|
||||
import com.youchain.exception.BadRequestException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
|
@ -28,7 +29,7 @@ public class PostRequestSigner {
|
|||
Map<String, String> allParams = new TreeMap<>(); // TreeMap会自动按key升序排序
|
||||
|
||||
// 添加JSON Body参数
|
||||
if (jsonBody != null && !jsonBody.isEmpty()) {
|
||||
if (StringUtils.isNotBlank(jsonBody)) {
|
||||
allParams.put("jsonBody", jsonBody);
|
||||
}
|
||||
|
||||
|
|
@ -55,7 +56,7 @@ public class PostRequestSigner {
|
|||
return sha256(signSource.toString());
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("生成签名失败: " + e.getMessage(), e);
|
||||
throw new BadRequestException("生成签名失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue