记得上下班打卡 | git大法好,push需谨慎

Commit ff1223ab authored by jiangxiulong's avatar jiangxiulong

顺丰判断dev test不验签

parent 209a4d17
package com.liquidnet.service.platform.utils;
import com.liquidnet.commons.lang.constant.LnsEnum;
import com.liquidnet.commons.lang.util.CurrentUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
/**
* <p>
......@@ -30,6 +35,9 @@ public class ShunfengSignUtils {
*/
private final static Long CHECK_TIME = 600000L;
@Autowired
Environment environment;
/**
* 生成签名
* @param timestamp 时间戳
......@@ -59,6 +67,9 @@ public class ShunfengSignUtils {
* @return
*/
public boolean receiveRequestAndCheckSign(String params, HttpServletRequest request) {
if (Arrays.asList(LnsEnum.ENV.dev.name(), LnsEnum.ENV.test.name()).contains(environment.getProperty(CurrentUtil.CK_ENV_ACTIVE))) {
return true;
}
log.debug("params {}", params);
// 请求方APPID
String sendAppId = request.getHeader("sendAppId");
......
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