|
|
@@ -12,6 +12,7 @@ import shop.alien.entity.store.vo.StoreUserVo;
|
|
|
import shop.alien.mapper.StoreUserMapper;
|
|
|
import shop.alien.storeplatform.service.StorePlatformLoginervice;
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import javax.servlet.http.HttpSession;
|
|
|
import java.io.IOException;
|
|
|
@@ -78,7 +79,7 @@ public class StorePlatformLoginController {
|
|
|
String password,
|
|
|
String code,
|
|
|
String captcha,
|
|
|
- HttpSession session) {
|
|
|
+ HttpServletRequest request) {
|
|
|
log.info("StorePlatformLoginController.login?phone={}&password={}&isPassword={}&code={}&captcha={}", phone, password, isPassword, code, captcha);
|
|
|
if (!isPassword) {
|
|
|
// 2025-11-04 验证码-商户端登录
|
|
|
@@ -90,6 +91,7 @@ public class StorePlatformLoginController {
|
|
|
return R.fail("验证码错误");
|
|
|
}
|
|
|
} else {
|
|
|
+ HttpSession session = request.getSession();
|
|
|
// String cacheCode = baseRedisService.getString("store_platform_captcha_" + phone);
|
|
|
String cacheCode = (String) session.getAttribute("captcha");
|
|
|
if (null == cacheCode) {
|
|
|
@@ -160,9 +162,9 @@ public class StorePlatformLoginController {
|
|
|
@ApiOperation("生成验证码")
|
|
|
@ApiOperationSupport(order = 5)
|
|
|
@GetMapping("/generateCaptcha")
|
|
|
- public void generateCaptcha(HttpServletResponse response, HttpSession session) throws IOException {
|
|
|
- log.info("StorePlatformLoginController.generateCaptcha?session={}", session.toString());
|
|
|
- storePlatformLoginService.generateCaptcha(response, session);
|
|
|
+ public void generateCaptcha(HttpServletResponse response, HttpServletRequest request) throws IOException {
|
|
|
+// log.info("StorePlatformLoginController.generateCaptcha?session={}", session.toString());
|
|
|
+ storePlatformLoginService.generateCaptcha(response, request);
|
|
|
}
|
|
|
|
|
|
}
|