package com.ningdatech.kqapi.common.helper.impl;

import com.ningdatech.kqapi.common.helper.MatterCacheHelper;
import com.ningdatech.kqapi.common.helper.basic.AbstractMatterCacheHelper;
import com.ningdatech.kqapi.zzsfw.model.entity.KqZzsfwMattersDeduplicate;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author ZPF
 * @date 2024/1/3 上午8:58
 */
@Slf4j
@Component
public class MattersCacheHelperImpl extends AbstractMatterCacheHelper implements MatterCacheHelper {


    @Override
    public KqZzsfwMattersDeduplicate getMatter(String qlName, String webapplyurl) {
        if (StringUtils.isBlank(qlName) || StringUtils.isBlank(webapplyurl)) {
            return null;
        }
        return super.get(qlName, webapplyurl);
    }

    @Override
    public String getUrl(String qlName) {
        if (StringUtils.isBlank(qlName)) {
            return null;
        }
        return super.getUrl(qlName);
    }

    @Override
    public List<KqZzsfwMattersDeduplicate> all() {
        return super.all();
    }

    @Override
    public Boolean refreshAll() {
        return super.init();
    }
}
