package com.qmth.distributed.print.business.cache;

import com.qmth.teachcloud.common.contant.SpringContextHolder;
import com.qmth.teachcloud.common.util.RedisUtil;

/**
 * @Description: 生成pdf cache
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2021/4/26
 */
public class CreatePdfCacheUtil {
    private static RedisUtil redisUtil = SpringContextHolder.getBean(RedisUtil.class);

    public static void setPaperType(String key, String paperType) {
        redisUtil.set(RedisKeyHelper.paperTypeKey(key), paperType);
    }

    public static String getPaperType(String key) {
        return (String) redisUtil.get(RedisKeyHelper.paperTypeKey(key));
    }

    public static void deletePaperType(String key) {
        redisUtil.delete(RedisKeyHelper.paperTypeKey(key));
    }
}
