PC
2024-03-31 8c9ba6667b89cc0494d05b5da4355dde205b8d4a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package com.qianwen.smartman.common.cache;
 
import com.qianwen.smartman.common.constant.ExtCacheConstant;
import com.qianwen.core.cache.utils.CacheUtil;
import com.qianwen.core.tool.utils.SpringUtil;
import com.qianwen.smartman.modules.system.service.IBasCoderuleService;
 
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/common/cache/CodeRuleCache.class */
public class CodeRuleCache {
    private static final String BILL_FORM_ID_EXIST = "codeRule:billFormId:exist:";
    private static final IBasCoderuleService basCoderuleService = (IBasCoderuleService) SpringUtil.getBean(IBasCoderuleService.class);
 
    public static boolean existCodeRule(String billFormId) {
        return ((Boolean) CacheUtil.get(ExtCacheConstant.CODE_RULE_CACHE, BILL_FORM_ID_EXIST, billFormId, () -> {
            return Boolean.valueOf(basCoderuleService.isExistCodeRule(billFormId));
        }, ExtCacheConstant.TENANT_MODE)).booleanValue();
    }
}