package com.kxs.user.biz.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kxs.user.api.model.KxsLeader;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;

/**
 * 盟主表(KxsLeader)表数据库访问层
 *
 * @author 系统
 * @since 2024-02-22 15:39:26
 */
@Mapper
public interface KxsLeaderMapper extends BaseMapper<KxsLeader> {

    /**
     * 查询有效盟主
     *
     * @param userId 用户 ID
     * @return {@link KxsLeader}
     */
    KxsLeader selectByLeader(@Param("userId") Integer userId, @Param("expiredDate") LocalDateTime expiredDate);
}

