MailManagerImpl.java
893 Bytes
package com.diligrp.website.manager.impl;
import java.util.List;
import javax.annotation.Resource;
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.manager.MailManager;
import com.diligrp.website.util.dao.BaseQuery;
import com.diligrp.website.util.web.PageTemplate;
@Component("mailManager")
public class MailManagerImpl implements MailManager {
@Resource
private MailDao mailDao;
@Override
public boolean saveMail(Mail mh) {
return mailDao.save(mh);
}
@Override
public PageTemplate queryMail(BaseQuery query) {
Integer totalSize = mailDao.getMailCount(query);
List<SysConfig> list = mailDao.getMailList(query);
return PageTemplate.create(query, totalSize, list);
}
}