package com.YuyeTech.HeartRate.game.imageInfo.repository;

import com.YuyeTech.HeartRate.common.repository.CommonRepository;
import com.YuyeTech.HeartRate.game.imageInfo.projo.Pictures;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 图片库相关数据查询
 * @author:slambb
 * @date:2020/1/16
 */
@Repository
public interface PicturesRepository extends CommonRepository<Pictures,Integer> {
    /**
     * 查询图片列表
     * @param ids
     * @return
     */
    List<Pictures> findByPictureIdIn(List<Integer> ids);

    /**
     * 根据图片类型查询图片列表
     * @return
     */
    List<Pictures> findByPictureType(Integer pictureType);

    /**
     * 根据图片类型和游戏id查询
     *
     * @param pictureType
     * @param associatedId
     * @return List<Pictures>
     */
    List<Pictures> findByPictureTypeAndAssociatedId(Integer pictureType,String associatedId);

}
