Commit 5163603a authored by 技术部-任文超's avatar 技术部-任文超

debug:手机号参数判空包含“”

parent af2b9ce7
...@@ -42,7 +42,7 @@ public class CaptchaNewValidateAdvisor { ...@@ -42,7 +42,7 @@ public class CaptchaNewValidateAdvisor {
private void needCaptchaValidate(){} private void needCaptchaValidate(){}
/** /**
* 在受图形验证码保护的接口方法执行前, 执行图形验证码校验 * 在受图形验证码保护的接口方法执行前, 校验图形验证码
* *
* @param pjp pjp * @param pjp pjp
* @return * @return
......
...@@ -11,6 +11,7 @@ import cn.quantgroup.xyqb.util.IPUtil; ...@@ -11,6 +11,7 @@ import cn.quantgroup.xyqb.util.IPUtil;
import cn.quantgroup.xyqb.util.PasswordUtil; import cn.quantgroup.xyqb.util.PasswordUtil;
import cn.quantgroup.xyqb.util.ValidationUtil; import cn.quantgroup.xyqb.util.ValidationUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -39,11 +40,11 @@ public class NewCaptchaController { ...@@ -39,11 +40,11 @@ public class NewCaptchaController {
public JsonResult getCaptcha(String phoneNo, String clientType, HttpServletRequest request) { public JsonResult getCaptcha(String phoneNo, String clientType, HttpServletRequest request) {
String remoteIp = IPUtil.getRemoteIP(request); String remoteIp = IPUtil.getRemoteIP(request);
log.info("获取验证码, phoneNo:{}, clientType:{}, ip:{}, verifyType-qg:{}", phoneNo, clientType, remoteIp, geetestClose); log.info("获取验证码, phoneNo:{}, clientType:{}, ip:{}, verifyType-qg:{}", phoneNo, clientType, remoteIp, geetestClose);
if (Objects.nonNull(phoneNo) && !ValidationUtil.validatePhoneNo(phoneNo)) { if (StringUtils.isNotBlank(phoneNo) && !ValidationUtil.validatePhoneNo(phoneNo)) {
return JsonResult.buildErrorStateResult("手机号格式错误", null); return JsonResult.buildErrorStateResult("手机号格式错误", null);
} }
// 唯一key,用于初始化极验 // 唯一key,用于初始化极验
String key = Optional.ofNullable(phoneNo).orElse(UUID.randomUUID().toString()); String key = StringUtils.isNotBlank(phoneNo) ? phoneNo.trim() : UUID.randomUUID().toString();
// key指纹 // key指纹
String keyMd5 = PasswordUtil.MD5(key); String keyMd5 = PasswordUtil.MD5(key);
log.info("获取验证码, phoneNo:{}, keyMd5:{}, clientType:{}, ip:{}, verifyType-qg:{}", phoneNo, keyMd5, clientType, remoteIp, geetestClose); log.info("获取验证码, phoneNo:{}, keyMd5:{}, clientType:{}, ip:{}, verifyType-qg:{}", phoneNo, keyMd5, clientType, remoteIp, geetestClose);
......
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