package com.chinaweal.aiccs.aiccs.abnormal.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.chinaweal.aiccs.aiccs.abnormal.entity.TSBizAbnRevoke;
import com.chinaweal.aiccs.aiccs.abnormal.mapper.TSBizAbnRevokeMapper;
import com.chinaweal.aiccs.aiccs.abnormal.service.TSBizAbnRevokeService;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 经营异常名录撤销业务表 服务实现类
 * </p>
 *
 * @author <a href="https://blog.lroyia.top">lroyia</a>
 * @since 2021-01-19
 */
@Service
public class TSBizAbnRevokeServiceImpl extends ServiceImpl<TSBizAbnRevokeMapper, TSBizAbnRevoke> implements TSBizAbnRevokeService {

    @Override
    public boolean validateBizRevoke(String revokeid, String bizType) {
        List<TSBizAbnRevoke> revokeModelList = baseMapper.selectBizAbnRevokeByStatus(revokeid);
        if(CollectionUtils.isNotEmpty(revokeModelList)){
            return false;
        }
        return true;
    }
}
