|
@@ -6,6 +6,7 @@ import com.jfinal.aop.Inject;
|
|
|
import com.jfinal.kit.HashKit;
|
|
import com.jfinal.kit.HashKit;
|
|
|
import com.jfinal.kit.StrKit;
|
|
import com.jfinal.kit.StrKit;
|
|
|
import common.interceptor.LoginInterceptor;
|
|
import common.interceptor.LoginInterceptor;
|
|
|
|
|
+import common.interceptor.empty.EmptyInterceptor;
|
|
|
import common.interceptor.empty.EmptyInterface;
|
|
import common.interceptor.empty.EmptyInterface;
|
|
|
import common.model.User;
|
|
import common.model.User;
|
|
|
import common.utils.http.MyController;
|
|
import common.utils.http.MyController;
|
|
@@ -13,11 +14,14 @@ import common.utils.http.MyRet;
|
|
|
import common.utils.http.VerifyCode;
|
|
import common.utils.http.VerifyCode;
|
|
|
|
|
|
|
|
public class UserController extends MyController {
|
|
public class UserController extends MyController {
|
|
|
- // 验证码发送延时
|
|
|
|
|
- private static final long SEND_VERIFY_CODE_DELAY = 60 * 1000;
|
|
|
|
|
-
|
|
|
|
|
- // 验证码有效期,5 分钟 (300 秒)
|
|
|
|
|
- private static final long VERIFY_CODE_EXPIRATION_TIME = 5 * 60 * 1000; // 毫秒
|
|
|
|
|
|
|
+ // 验证码相关的常量
|
|
|
|
|
+ private static final long SEND_VERIFY_CODE_DELAY = 60 * 1000; // 验证码发送间隔
|
|
|
|
|
+ private static final long VERIFY_CODE_EXPIRATION_TIME = 5 * 60 * 1000; // 验证码有效期,5 分钟 (300 秒)
|
|
|
|
|
+
|
|
|
|
|
+ // 角色相关常量
|
|
|
|
|
+ public static final int ROLE_SUPER_ADMIN = 0; // 超级管理员
|
|
|
|
|
+ public static final int ROLE_CHECK_ADMIN = 1; // 审核管理员
|
|
|
|
|
+ public static final int ROLE_USER = 2; // 普通用户
|
|
|
|
|
|
|
|
@Inject
|
|
@Inject
|
|
|
private UserService service;
|
|
private UserService service;
|
|
@@ -25,7 +29,7 @@ public class UserController extends MyController {
|
|
|
public void hello() {
|
|
public void hello() {
|
|
|
renderText(service.hello());
|
|
renderText(service.hello());
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
@EmptyInterface(keyArray = {"mobile_number"})
|
|
@EmptyInterface(keyArray = {"mobile_number"})
|
|
|
public void sendVerifyCode() {
|
|
public void sendVerifyCode() {
|
|
|
// --- 核心修改部分 ---
|
|
// --- 核心修改部分 ---
|