|
@@ -1,13 +1,9 @@
|
|
|
package cn.com.qmth.examcloud.core.basic.api.controller;
|
|
|
|
|
|
-import java.io.IOException;
|
|
|
-
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -20,7 +16,6 @@ import cn.com.qmth.examcloud.commons.exception.StatusException;
|
|
|
import cn.com.qmth.examcloud.core.basic.dao.StudentRepo;
|
|
|
import cn.com.qmth.examcloud.core.basic.dao.entity.StudentEntity;
|
|
|
import cn.com.qmth.examcloud.core.basic.service.AuthService;
|
|
|
-import cn.com.qmth.examcloud.core.basic.service.ImgCodeService;
|
|
|
import cn.com.qmth.examcloud.core.basic.service.SmsCodeService;
|
|
|
import cn.com.qmth.examcloud.core.basic.service.StudentService;
|
|
|
import cn.com.qmth.examcloud.core.basic.service.bean.LoginInfo;
|
|
@@ -66,9 +61,6 @@ public class AuthController extends ControllerSupport {
|
|
|
@Autowired
|
|
|
StudentService studentService;
|
|
|
|
|
|
- @Autowired
|
|
|
- ImgCodeService imgCodeService;
|
|
|
-
|
|
|
@Autowired
|
|
|
StudentCache studentCache;
|
|
|
|
|
@@ -227,13 +219,4 @@ public class AuthController extends ControllerSupport {
|
|
|
studentCache.remove(saved.getId());
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "获取验证码图片", notes = "")
|
|
|
- @GetMapping("code.jpg")
|
|
|
- public void getCodeImg(@RequestParam(required = true) String sessionId,
|
|
|
- HttpServletRequest request, HttpServletResponse response) throws IOException {
|
|
|
- response.setContentType("image/jpg");
|
|
|
- String code = imgCodeService.generate(response.getOutputStream());
|
|
|
- redisClient.set("$_IMG_" + sessionId, code, 30);
|
|
|
- }
|
|
|
-
|
|
|
}
|