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

import com.pcloud.book.rightsSetting.dao.RightsSettingBannerDao;
import com.pcloud.book.rightsSetting.entity.RightsSettingBanner;
import com.pcloud.common.core.dao.BaseDaoImpl;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 权益banner(RightsSettingBanner)表数据库访问层
 *
 * @author makejava
 * @since 2021-03-16 16:17:58
 */
@Repository("rightsSettingBannerDaoImpl")
public class RightsSettingBannerDaoImpl extends BaseDaoImpl<RightsSettingBanner> implements RightsSettingBannerDao {

    @Override
    public void deleteByRightsSettingId(Long rightsSettingId) {
        getSessionTemplate().delete(getStatement("deleteByRightsSettingId"), rightsSettingId);
    }

    @Override
    public List<RightsSettingBanner> getByRightsSettingId(Long rightsSettingId) {
        return getSessionTemplate().selectList(getStatement("getByRightsSettingId"), rightsSettingId);
    }
}