|
@@ -1,5 +1,6 @@
|
|
|
package com.fjhx.controller;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.fjhx.base.R;
|
|
|
import com.fjhx.config.redis.RedisCache;
|
|
|
import com.fjhx.constants.RedisConstant;
|
|
@@ -33,12 +34,18 @@ public class AccountController {
|
|
|
@GetMapping("getAsyncProgress")
|
|
|
public R getAsyncProgress(@RequestParam("email") String email) {
|
|
|
ProgressVo progressVo = RedisCache.get(RedisConstant.PROGRESS_KEY + email);
|
|
|
+ if (ObjectUtils.isNull(progressVo)) {
|
|
|
+ return R.ok();
|
|
|
+ }
|
|
|
if (progressVo.getPercentage() >= 100) {
|
|
|
RedisCache.delete(RedisConstant.PROGRESS_KEY + email);
|
|
|
}
|
|
|
return R.ok(progressVo);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 监听邮件事件
|
|
|
+ */
|
|
|
@PostMapping("/listener")
|
|
|
public R post(@RequestBody ListenerVo listenerVo) {
|
|
|
accountService.listener(listenerVo);
|