Commit fef9ea5a by 邓实川

验证码方式登录判空

parent 65283b5b
...@@ -8,6 +8,7 @@ import java.util.List; ...@@ -8,6 +8,7 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -538,6 +539,9 @@ public class LoginController { ...@@ -538,6 +539,9 @@ public class LoginController {
public Result<QyzxEmpLogin> codelogin(@RequestBody EntRegisterDto entRegisterDto, HttpServletRequest request) { public Result<QyzxEmpLogin> codelogin(@RequestBody EntRegisterDto entRegisterDto, HttpServletRequest request) {
String code = entRegisterDto.getCode(); String code = entRegisterDto.getCode();
if (StringUtils.isEmpty(code)) {
return ResultUtil.error("请输入验证码");
}
String phone = entRegisterDto.getPhone(); String phone = entRegisterDto.getPhone();
String codeRedis = session.getAttribute(phone) != null ? session.getAttribute(phone).toString() : ""; String codeRedis = session.getAttribute(phone) != null ? session.getAttribute(phone).toString() : "";
......
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