package com.pcloud.book.group.dao.impl;

import com.pcloud.book.group.dao.ResourcePagePicDao;
import com.pcloud.book.group.entity.ResourcePagePic;
import com.pcloud.common.core.dao.BaseDaoImpl;

import org.springframework.stereotype.Component;

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

/**
 * @ClassName com.pcloud.book.group.dao.impl.ResourcePagePicDaoImpl
 * @Author zhuyajie
 * @Description 图片库
 * @Date 2021/8/24 14:39
 * @Version 1.0
 **/
@Component
public class ResourcePagePicDaoImpl extends BaseDaoImpl<ResourcePagePic> implements ResourcePagePicDao {
    @Override
    public List<ResourcePagePic> getByType(Integer type, Long adviserId) {
        Map<String, Object> map = new HashMap<>();
        map.put("type", type);
        map.put("adviserId", adviserId);
        return getSessionTemplate().selectList(getStatement("getByType"), map);
    }
}
