package com.sunyard.chsm.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sunyard.chsm.model.entity.KeyCsr;
import org.apache.ibatis.annotations.Mapper;

/**
 * @author liulu
 * @since 2024/10/22
 */
@Mapper
public interface KeyCsrMapper extends BaseMapper<KeyCsr> {

    default KeyCsr selectBySubject(String dn) {
        return selectOne(
                new LambdaQueryWrapper<KeyCsr>().eq(KeyCsr::getSubject, dn)
        );
    }
}
