package com.sckw.fleet.repository;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sckw.fleet.dao.KwfDriverConductRulesMapper;
import com.sckw.fleet.model.KwfDriverConductRules;
import org.springframework.stereotype.Repository;

import java.util.Objects;

/**
 * @desc 司机行为规则 Repository接口
 * @author donglang
 * @date 2025-12-04
 */
@Repository
public class KwfDriverConductRulesRepository extends ServiceImpl<KwfDriverConductRulesMapper, KwfDriverConductRules> {

    public KwfDriverConductRules findDriverConductRulesByEntId(Long entId) {
        return getOne(Wrappers.<KwfDriverConductRules>lambdaQuery()
                .eq(Objects.nonNull(entId), KwfDriverConductRules::getEntId, entId));
    }

}
