package com.fs.his.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fs.his.domain.FsUserPlayer;
import com.fs.his.vo.FsUserPlayerVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户游戏记录Mapper接口
 *
 * @author fs
 * @date 2026-02-25
 */
public interface FsUserPlayerMapper extends BaseMapper<FsUserPlayer>{
    /**
     * 查询用户游戏记录
     *
     * @param id 用户游戏记录主键
     * @return 用户游戏记录
     */
    FsUserPlayer selectFsUserPlayerById(Long id);

    /**
     * 查询用户游戏记录列表
     *
     * @param fsUserPlayer 用户游戏记录
     * @return 用户游戏记录集合
     */
    List<FsUserPlayer> selectFsUserPlayerList(FsUserPlayer fsUserPlayer);

    /**
     * 新增用户游戏记录
     *
     * @param fsUserPlayer 用户游戏记录
     * @return 结果
     */
    int insertFsUserPlayer(FsUserPlayer fsUserPlayer);

    /**
     * 修改用户游戏记录
     *
     * @param fsUserPlayer 用户游戏记录
     * @return 结果
     */
    int updateFsUserPlayer(FsUserPlayer fsUserPlayer);

    /**
     * 删除用户游戏记录
     *
     * @param id 用户游戏记录主键
     * @return 结果
     */
    int deleteFsUserPlayerById(Long id);

    /**
     * 批量删除用户游戏记录
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    int deleteFsUserPlayerByIds(Long[] ids);

    FsUserPlayerVo selectFsUserByUserIdAndGameId(@Param("userId") Long userId,@Param("gameId") Integer gameId);

    int updateFsUserPlayerByUserIdAndGameId(FsUserPlayer fsUserPlayer);
}
