|
|
@@ -473,16 +473,18 @@ public class AuthorizationController {
|
|
|
*/
|
|
|
@GetMapping("/get/email/code")
|
|
|
@NoSubmit
|
|
|
- public Result<String> getEmailCode(String email, Integer digit) {
|
|
|
+ public Result<String> getEmailCode(String email, Integer digit, Integer cmt) {
|
|
|
if (email == null || !Validator.isEmail(email)) {
|
|
|
throw BusinessRuntimeException.getInstance("请输入正确邮箱");
|
|
|
}
|
|
|
if (envCommonService.isPrdEnv()) {
|
|
|
//首次注册只能gmail邮箱
|
|
|
if (!email.contains("@gmail")) {
|
|
|
- User user = userService.getOne(Wrappers.lambdaQuery(User.class).eq(User::getEmail, email).last("limit 1"));
|
|
|
- if (user == null) {
|
|
|
- throw BusinessRuntimeException.getInstance("暂只支持使用谷歌邮箱注册");
|
|
|
+ if (cmt == null || cmt != 2) {
|
|
|
+ User user = userService.getOne(Wrappers.lambdaQuery(User.class).eq(User::getEmail, email).last("limit 1"));
|
|
|
+ if (user == null) {
|
|
|
+ throw BusinessRuntimeException.getInstance("暂只支持使用谷歌邮箱注册");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|