IDrawlineUserQueueDAO.java 1.64 KB
package com.yoho.queue.dal;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.yoho.queue.dal.model.DrawlineUserQueue;

public interface IDrawlineUserQueueDAO {
	int deleteByPrimaryKey(Integer id);

	int insert(DrawlineUserQueue record);

	int insertSelective(DrawlineUserQueue record);

	DrawlineUserQueue selectByPrimaryKey(Integer id);

	int updateByPrimaryKeySelective(DrawlineUserQueue record);

	int updateByPrimaryKey(DrawlineUserQueue record);

	DrawlineUserQueue selectByUidAndActivityIdAndUserType(@Param("uid") int uid, @Param("activityId") int activityId, @Param("userType") byte userType);

	int insertAutoSort(DrawlineUserQueue record);

	int selectCountBy(@Param("activityId") int activityId, @Param("sort") int sort);

	List<DrawlineUserQueue> selectBy(@Param("activityId") int activityId, @Param("sort") int sort, @Param("limit") int limit);

	List<DrawlineUserQueue> selectByActIdAndUids(@Param("activityId") int activityId, @Param("uidList") List<Integer> uidList);

	List<DrawlineUserQueue> selectRealUserQueueByActIdAndUids(@Param("activityId") int activityId, @Param("uids") String uids);

	List<DrawlineUserQueue> selectRealUserQueueByRand(@Param("activityId") int activityId, @Param("uids") String uids, @Param("limit") int limit);

	List<DrawlineUserQueue> selectByRand(@Param("activityId") int activityId, @Param("userType") byte userType, @Param("limit") int limit);
	
	List<DrawlineUserQueue> selectByTypeAndActivityIds(@Param("activityIds") String activityIds, @Param("userType") int userType);
	
	List<Map<String, Object>> selectRealUserCountByActivityIds(@Param("activityIds") String activityIds);
}