MailDaoImpl.java
999 Bytes
package com.diligrp.website.dao.impl;
import java.util.List;
import org.springframework.stereotype.Component;
import com.diligrp.website.dao.MailDao;
import com.diligrp.website.domain.Mail;
import com.diligrp.website.domain.SysConfig;
import com.diligrp.website.util.dao.BaseQuery;
import com.diligrp.website.util.dao.impl.BaseDaoImpl;
@Component("mailDao")
public class MailDaoImpl extends BaseDaoImpl<Mail> implements MailDao {
private static final String PREFIX = MailDaoImpl.class.getCanonicalName();
@Override
public boolean save(Mail mail) {
return getSqlSessionTemplate().insert(PREFIX + ".save", mail) > 0;
}
@Override
public Integer getMailCount(BaseQuery query) {
return getSqlSessionTemplate().selectOne(PREFIX + ".getMailCount",
query);
}
@Override
public List<SysConfig> getMailList(BaseQuery query) {
return getSqlSessionTemplate().selectList(PREFIX + ".getMailList",
query);
}
}