|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.ruoyi.pt.controller;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
|
import com.ruoyi.common.constant.Constants;
|
|
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
|
@ -57,13 +58,22 @@ public class AEventsController extends BaseController {
|
|
|
|
|
* @return 响应类
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping("/verify")
|
|
|
|
|
@ApiOperation(value = "登录获取token")
|
|
|
|
|
@ApiOperation(value = "校验")
|
|
|
|
|
public AjaxResult verificationCode() {
|
|
|
|
|
LocalDate cacheObject = redisCache.getCacheObject("88888888");
|
|
|
|
|
if (cacheObject != null) {
|
|
|
|
|
return AjaxResult.success(true);
|
|
|
|
|
// 获取当前日期
|
|
|
|
|
LocalDate currentDate = LocalDate.now();
|
|
|
|
|
// 创建目标2025-02-01
|
|
|
|
|
LocalDate targetDate = LocalDate.of(2025, 2, 1);
|
|
|
|
|
// 判断当前日期是否大于或等于目标日期
|
|
|
|
|
if (currentDate.isEqual(targetDate) || currentDate.isAfter(targetDate)) {
|
|
|
|
|
Object cacheObject = redisCache.getCacheObject("88888888");
|
|
|
|
|
if (BeanUtil.isNotEmpty(cacheObject)) {
|
|
|
|
|
return AjaxResult.success(true);
|
|
|
|
|
} else {
|
|
|
|
|
return AjaxResult.success(false);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
return AjaxResult.success(false);
|
|
|
|
|
return AjaxResult.success(true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|