package cc.smtweb.system.bpm.web.sys.base.job;

import cc.smtweb.framework.core.annotation.SwCache;
import cc.smtweb.framework.core.cache.AbstractEntityCache;
import cc.smtweb.framework.core.cache.CacheManager;

/**
 * Created by 1 at 2022-09-13 19:35:56
 * 实体【[定时任务](SYS_JOB)】的缓存类
 */
@SwCache(ident = "SYS_JOB", title = "定时任务")
public class JobCache extends AbstractEntityCache<JobEntity> {
    //缓存key：按编码
    public final static String mk_code = "code";

    public static JobCache getInstance() {
        return CacheManager.getIntance().getCache(JobCache.class);
    }

    public JobCache() {
        //缓存key：按编码
        regMap(mk_code, "sj_code");
    }

    //缓存key：按编码
    public final JobEntity getByCode(String key) {
        return getByKey(mk_code, key);
    }

}
