Browse Source

feat(all): 索菲亚工厂

1 增加华之韵物流对接
pre-production
zhaoqiaobo 3 weeks ago
parent
commit
756078b677
  1. 3
      blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/interceptor/LocalServerLoginAccountsInterceptor.java

3
blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/interceptor/LocalServerLoginAccountsInterceptor.java

@ -72,6 +72,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt
// 获取头中参数
String authTime = request.getHeader("authTime");
if (StrUtil.isEmpty(authTime)) {
log.info("##########preHandle: 时间戳不能为空");
returnJson(response, JSONObject.toJSONString(R.fail(1, "时间戳不能为空")));
return false;
}
@ -84,6 +85,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt
if (StringUtil.isNotBlank(authTime)) {
long authTimeLong = Long.parseLong(authTime);
if (secondTimestamp - authTimeLong > suoFeiYaProperties.getAuthTime()) {
log.info("##########preHandle: 时间戳过期");
returnJson(response, JSONObject.toJSONString(R.fail(1, "认证不通过,时间戳过期")));
return false;
}
@ -93,6 +95,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt
String md5Hex = MD5.create().digestHex(authTime + auth).toUpperCase();
log.info("##########preHandle: md5Hex={}", md5Hex);
if (!StrUtil.equals(md5Hex, sign)) {
log.info("##########preHandle: 签名不正确");
returnJson(response, JSONObject.toJSONString(R.fail(1, "认证不通过,签名不正确")));
return false;
}

Loading…
Cancel
Save