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

import com.pcloud.book.applet.dao.AppletBooklistClassifyDao;
import com.pcloud.book.applet.dto.AppletBooklistClassifyDTO;
import com.pcloud.book.applet.entity.AppletBooklistClassify;
import com.pcloud.common.core.dao.BaseDaoImpl;
import org.springframework.stereotype.Component;

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


@Component
public class AppletBooklistClassifyDaoImpl extends BaseDaoImpl<AppletBooklistClassify> implements AppletBooklistClassifyDao {

    @Override
    public Integer getMaxSeq() {
        return getSessionTemplate().selectOne(getStatement("getMaxSeq"));
    }

    @Override
    public List<AppletBooklistClassifyDTO> getAllBooklistClassify(Boolean showState) {
        Map<String,Object>map=new HashMap<>();
        map.put("showState", showState);
        return getSessionTemplate().selectList(getStatement("getAllBooklistClassify"), map);
    }
}
