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

import com.pcloud.book.applet.dto.AppletNewsServeDTO;
import com.pcloud.book.applet.entity.AppletNewsServe;
import com.pcloud.book.applet.dao.AppletNewsServeDao;
import com.pcloud.common.core.dao.BaseDaoImpl;
import org.springframework.stereotype.Repository;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
 * (AppletNewsServe)表数据库访问层
 *
 * @author makejava
 * @since 2020-06-30 16:56:08
 */
@Repository("appletNewsServeDaoImpl")
public class AppletNewsServeDaoImpl extends BaseDaoImpl<AppletNewsServe> implements AppletNewsServeDao {

    @Override
    public int deleteByAppletNewsId(Long appletNewsId) {
        return this.sqlSessionTemplate.delete(getStatement("deleteByAppletNewsId"), appletNewsId);
    }

    @Override
    public List<AppletNewsServeDTO> getByAppletNewsId(Long appletNewsId) {
        return this.sqlSessionTemplate.selectList(getStatement("getByAppletNewsId"), appletNewsId);
    }
}
