package cn.pluss.platform.mapper;

import cn.pluss.platform.entity.BankCodeYs;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import lombok.val;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Djh
 * @since 2021-07-07
 */
public interface BankCodeYsMapper extends BaseMapper<BankCodeYs> {

    /**
     * 根据支行联行号获取对应的银行信息
     * @param contactLine   联行号
     * @return
     */
    default BankCodeYs selectByContactLine(String contactLine) {
        val qWrapper = new LambdaQueryWrapper<BankCodeYs>().eq(BankCodeYs::getContactLine, contactLine);
        return selectOne(qWrapper);
    }
}
