package com.tax.user.service.rules.support;

import com.tax.user.service.rules.RuleCheckI;
import com.tax.user.utils.RuleUtils;
import com.yxcheng.token.common.enumutil.ResultEnum;
import com.yxcheng.token.common.model.JsonResult;
import com.yxcheng.token.common.model.RuleModel;
import org.springframework.stereotype.Component;

@Component
public class CheckIfInBlackService implements RuleCheckI {
    @Override
    public boolean check(RuleModel model, JsonResult result) {
        if(!RuleUtils.checkFunctionTaxno(model)){
            return result.errorResponse(ResultEnum.user_not_own_taxno).isSuccess();
        }
        return true;
    }
}
