浏览代码

rename basic、question cache keys.

deason 2 年之前
父节点
当前提交
50778a6570

+ 0 - 45
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/cache/ExamRecordPropertyCache.java

@@ -1,45 +0,0 @@
-package cn.com.qmth.examcloud.core.oe.admin.service.cache;
-
-import cn.com.qmth.examcloud.core.oe.admin.dao.ExamRecordDataRepo;
-import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordDataEntity;
-import cn.com.qmth.examcloud.support.cache.bean.ExamRecordPropertyCacheBean;
-import cn.com.qmth.examcloud.web.cache.RandomObjectRedisCache;
-import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-@Service
-public class ExamRecordPropertyCache extends RandomObjectRedisCache<ExamRecordPropertyCacheBean> {
-
-    @Autowired
-    ExamRecordDataRepo examRecordDataRepo;
-
-    @Override
-    public ExamRecordPropertyCacheBean loadFromResource(Object... keys) {
-        if (keys == null) {
-            return null;
-        }
-        Long examRecordDataId = (Long) keys[0];
-        ExamRecordDataEntity examRecordData = GlobalHelper.getEntity(examRecordDataRepo, examRecordDataId, ExamRecordDataEntity.class);
-
-        if (null == examRecordData) {
-            return null;
-        }
-        ExamRecordPropertyCacheBean b = new ExamRecordPropertyCacheBean();
-        b.setExamId(examRecordData.getExamId());
-        b.setOrgId(examRecordData.getOrgId());
-        return b;
-    }
-
-    @Override
-    protected String getKeyPrefix() {
-        return "OE_EXAM_RECORD_PROP:";
-    }
-
-    @Override
-    protected int getTimeout() {
-        // 2分钟
-        return 60 * 2;
-    }
-
-}