package com.cm.smartgate.service.impl;

import com.cm.common.exception.SearchException;
import com.cm.smartgate.service.ISmartGateIdCardCheckService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: DefalutSmartGateIdCheckImpl
 * @Description: 智慧闸机默认业务
 * @Author: WangGeng
 * @Date: 2020/8/27 19:06
 * @Version: 1.0
 **/
@Component
public class DefaultSmartGateIdCheckServiceImpl implements ISmartGateIdCardCheckService {

    @Override
    public boolean getPassState(String idCard) throws SearchException {
        if (StringUtils.equals("3723011984021400361", idCard)) {
            System.out.println("3723011984021400361验证通过");
            return true;
        } else if (StringUtils.equals("412726198512043351", idCard)) {
            System.out.println("412726198512043351验证通过");
            return true;
        }
        return false;
    }

}
