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

import com.pcloud.book.advertising.dao.AdvertisingCpaPaySettingDao;
import com.pcloud.book.advertising.entity.AdvertisingCpaPaySetting;
import com.pcloud.common.core.dao.BaseDaoImpl;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * (AdvertisingCpaPaySetting)表数据库访问层
 *
 * @author makejava
 * @since 2022-11-25 14:20:46
 */
@Repository("advertisingCpaPaySettingDao")
public class AdvertisingCpaPaySettingDaoImpl extends BaseDaoImpl<AdvertisingCpaPaySetting> implements AdvertisingCpaPaySettingDao {
    public int deleteByCpaId(Long cpaId) {
        return getSessionTemplate().update(getStatement("deleteByCpaId"), cpaId);
    }

    @Override
    public List<AdvertisingCpaPaySetting> getByCpaId(Long cpaId) {
        return getSessionTemplate().selectList(getStatement("getByCpaId"), cpaId);
    }
}
