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

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

import java.util.Set;

/**
 * Created by 1 at 2022-08-02 20:45:49
 * 实体【[单据流程分配](SYS_BILL_FLOW)】的缓存类
 */
@SwCache(ident = "SYS_BILL_FLOW", title = "单据流程分配")
public class BillFlowCache extends AbstractEntityCache<BillFlow> {
    //缓存key：按单据类型
    public final static String mk_b = "b";

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

    public BillFlowCache() {
        //缓存key：按单据类型
        regList(mk_b, "sbfl_bill_type");
    }

    //缓存key：按单据类型
    public final Set<BillFlow> getByBillType(long billType) {
        return getListByKey(mk_b, String.valueOf(billType));
    }
}
