package com.red.circle.game.fruit.infrastructure.database.dao;

import com.red.circle.framework.mybatis.dao.BaseDAO;
import com.red.circle.game.fruit.infrastructure.database.entity.GameFruitRoundRecord;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 游戏每轮记录 DAO 接口.
 * </p>
 *
 * @author lisizhe on  2023-11-30 19:18
 */
public interface GameFruitRoundRecordDAO extends BaseDAO<GameFruitRoundRecord> {

  Long countTodayPlayTimes(@Param("userId") Long userId, @Param("date") Integer date);

  @Select("SELECT * FROM game_fruit_round_record WHERE id = #{id}")
  GameFruitRoundRecord getByIdForUpdate(Long id);
}
