eed2a2b428af043cd98af53e5a32ef2cf7ce4617.svn-base 5.5 KB
package com.espeed.dao.impl;

import java.util.List;

import com.espeed.dao.YxySendMailMasterBaseDao;
import com.espeed.pojo.YxySendMailMasterBase;
import com.espeed.vo.PageBean;
/**
 * 程序名称:    	EspeedMail_时速邮箱
 * 程序版本:    	V1.0
 * 作    者:    	深圳市科飞时速网络技术有限公司(0755-88843776)
 * 版权所有:    	深圳市科飞时速网络技术有限公司
 * 技术支持:    	Tech@21gmail.com
 * 单元名称:     邮件基本信息DAO(营销游)
 * 开始时间:    	2013.12.09
 * 程 序 员:    	谢勇
 * 最后修改:    
 * 备    注:		如需修改请通知程序员    
 */
public class YxySendMailMasterBaseDaoImpl extends HibernateBaseDAOImpl<YxySendMailMasterBase, Long> implements YxySendMailMasterBaseDao{

	/**实体插入*/
	public int addPojo(YxySendMailMasterBase o)throws Exception{
		return super.add(o);
	}
	/**实体编辑*/
	public void updatePojo(YxySendMailMasterBase o)throws Exception{
		super.update(o);
	}
	/**HQL查询*/
	public List<YxySendMailMasterBase> findByHql(String hql)throws Exception{
		return super.getAll(hql);
	}
	/**指定条记录*/
	public List<YxySendMailMasterBase> findByHqlSet(String hql,int num)throws Exception{
		return super.findBySet(hql, num);
	}
	/**HQL查询分页*/
	public List<YxySendMailMasterBase> findByHqlPage(String hql,String hqlcount,PageBean pb)throws Exception{
		return super.findByPage(hql, hqlcount, pb);
	}
	/**SQL查询*/
	public List<Object> findBySqlQuery(String sql)throws Exception{
		return super.findBySql(sql);
	}
	/**HQL更新*/
	public void updateByHql(String hql)throws Exception{
		super.updateorDelByHql(hql);
	}
	
	/**HQL数量查询*/
	public int findByHqlCount(String hql)throws Exception{
		return super.count(hql);
	}
	
//	/**添加邮件信息返回ID*/
//	public int addMaster(YxySendMailMasterBase o) throws Exception {
//		
//		return super.add(o);
//	}
//	/**分页查询待发邮件列表(根据状态)*/
//	public List<YxySendMailMasterBase> findByStatus(int status, PageBean pb,String loginid,String domain) throws Exception {
//		String hql="";
//		String hqlCount="";
//		if(loginid.equals("all")){
//			hql="from YxySendMailMasterBase where status="+status +" and user_domain='"+domain+"' order by create_time desc";
//			hqlCount="select count(send_mail_id) from YxySendMailMasterBase where status="+status +" and user_domain='"+domain+"' order by create_time desc";
//		}else{
//			hql="from YxySendMailMasterBase where status="+status +" and user_loginid='"+loginid+"' and user_domain='"+domain+"' order by create_time desc";
//			hqlCount="select count(send_mail_id) from YxySendMailMasterBase where status="+status +" and user_loginid='"+loginid+"' and user_domain='"+domain+"' order by create_time desc";
//		}		
//		return super.findByPage(hql, hqlCount,pb);
//	}
//	
//	/**分页查询待发邮件列表(根据类别)*/
//	public List<YxySendMailMasterBase> findByType(int typeID, PageBean pb,String loginid, String domain) throws Exception {		
//		String hql="from YxySendMailMasterBase where folder_id="+typeID +" and status=1 and user_loginid='"+loginid+"' and user_domain='"+domain+"' order by create_time desc";
//		String hqlCount="select count(send_mail_id) from YxySendMailMasterBase where folder_id="+typeID +" and status=1 and user_loginid='"+loginid+"' and user_domain='"+domain+"' order by create_time desc";
//		return super.findByPage(hql, hqlCount,pb);
//	}
//	/**查询邮件详细信息(根据邮件ID)*/
//	public YxySendMailMasterBase findMasterBaseByID(int mailID)
//			throws Exception {
//		String hql="from YxySendMailMasterBase where send_mail_id="+mailID;
//		List<YxySendMailMasterBase> resultList=super.getAll(hql);
//		if(resultList.size()>0){
//			return resultList.get(0);
//		}else{
//			return null;
//		}
//	}
//	/**更新base表为已发送状态*/
//	public void updateMasterBase(String sql) throws Exception {
//		super.updateorDelBySql(sql);		
//	}
//	/**通过邮件ID删除邮件*/
//	public void delMailByID(int mailID) throws Exception {
//		String sql="delete YxySendMailMasterBase where send_mail_id="+mailID;
//		super.updateorDelBySql(sql);		
//	}
//	
//	
//	/**根据状态查询邮件量*/
//	public List findMailNumByStatus(String loginid, String domain, int status)
//			throws Exception {
//		String sql="select sum(send_num) from yxy_send_mail_master_base where user_loginid='"+loginid+"' and user_domain='"+domain+"' and status="+status;
//		return super.findBySql(sql);
//	}
//	
//	/**查询邮件信息*/
//	public YxySendMailMasterBase findMail(String loginid, String domain,
//			String mailUID) throws Exception {
//		String hql="from YxySendMailMasterBase where user_loginid='"+loginid+"' and user_domain='"+domain+"' and mail_uid='"+mailUID+"'";
//		List<YxySendMailMasterBase> result=super.getAll(hql);
//		if(result.size()>0){
//			return result.get(0);
//		}else{
//			return null;
//		}
//		
//	}
//	
//	/**查询该类别下的邮件*/
//	public List<YxySendMailMasterBase> findByTypeAll(int typeID,String loginid, String domain) throws Exception {
//		String hql="from YxySendMailMasterBase where folder_id="+typeID +" and user_loginid='"+loginid+"' and user_domain='"+domain+"' order by create_time desc";
//		return super.getAll(hql);
//	}
//	/**查询所有已发邮件*/
//	public List<YxySendMailMasterBase> findBySendMail() throws Exception {
//		String hql="from YxySendMailMasterBase where status=1";
//		return super.getAll(hql);
//	}
//	/**更新邮件列表点击量*/
//	public void updateBaseClick(List<YxySendMailMasterBase> o) throws Exception {
//		super.updatePiBase(o);
//		
//	}
	
}