You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.2 KiB
Java
40 lines
1.2 KiB
Java
package com.glxp.api.controller.auth;
|
|
|
|
import java.util.Map;
|
|
|
|
import javax.servlet.http.HttpSession;
|
|
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
import com.glxp.api.common.res.BaseResponse;
|
|
import com.glxp.api.util.CaptchaUtils;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
@RestController
|
|
@Slf4j
|
|
public class RegisterController {
|
|
private static final Logger logger = LoggerFactory.getLogger(RegisterController.class);
|
|
|
|
|
|
@PostMapping("/admin/auth/register/getCheckcode")
|
|
public BaseResponse getCheckcode(@RequestBody Map<String,Object> params, HttpSession httpSession) {
|
|
logger.info("---------------"+JSON.toJSONString(params));
|
|
return CaptchaUtils.getCheckcode(params,httpSession);
|
|
}
|
|
|
|
@PostMapping("/admin/auth/register/checkCode")
|
|
public BaseResponse checkCode(@RequestBody Map<String,Object> params) {
|
|
logger.info("---------------"+JSON.toJSONString(params));
|
|
return CaptchaUtils.checkCode(params);
|
|
}
|
|
|
|
|
|
|
|
}
|