瀏覽代碼

fix: 人员导出-标记生成中的状态

lixuesong 1 周之前
父節點
當前提交
f2fce25bf7

+ 5 - 0
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/service/impl/SysUserExportServiceImpl.java

@@ -112,6 +112,11 @@ public class SysUserExportServiceImpl implements SysUserExportService {
 			throw new BizException("系统繁忙,请稍后再试");
 		}
 
+		// 缓存key
+		String cacheKey = String.format(CacheConstants.ASYNC_EXPORT_CACHE, ExportType.USER.getType(), user.getId());
+		// 更新状态为生成中
+		redisTemplate.opsForValue().set(cacheKey, WmReportOpt.WmReportOptStatus.GENERATING.name(), DEF_REPORT_TTL, TimeUnit.MILLISECONDS);
+
 		SpringContextHolder.getApplicationContext().publishEvent(new UserExportEvent(user, roles, query));
 		return Boolean.TRUE;
 	}