4c2a92105d5bf1575f29f93d2d700b43459d7721.svn-base 5.1 KB
package com.espeed.dao.impl;

import java.util.List;

import com.espeed.dao.YxyUnsubscribeInfoDao;
import com.espeed.pojo.YxyUnsubscribeInfo;
import com.espeed.vo.PageBean;

/**
 * 程序名称:    	EspeedMail_时速邮箱
 * 程序版本:    	V1.0
 * 作    者:    	深圳市科飞时速网络技术有限公司(0755-88843776)
 * 版权所有:    	深圳市科飞时速网络技术有限公司
 * 技术支持:    	Tech@21gmail.com
 * 单元名称:     退订实现类(营销游)
 * 开始时间:    	2013.12.09
 * 程 序 员:    	谢勇
 * 最后修改:    
 * 备    注:		如需修改请通知程序员    
 */
public class YxyUnsubscribeInfoDaoImpl extends HibernateBaseDAOImpl<YxyUnsubscribeInfo, Long> implements YxyUnsubscribeInfoDao{

//	/**插入退订信息*/
//	public void insertUnsubscribeinfo(List<YxyUnsubscribeInfo>  o) throws Exception {
//		super.addPi(o);
//	}
//	/**查询退订信息(根据用户ID)*/
//	public List<YxyUnsubscribeInfo> findUnsubscribeByID(String loginid,String domain,PageBean pb) throws Exception {
//		String hql="from YxyUnsubscribeInfo where unsubscribe_loginid='"+loginid+"' and unsubscribe_domain='"+domain+"'";
//		String hqlCount="select count(unsubscribe_id) from YxyUnsubscribeInfo  where unsubscribe_loginid='"+loginid+"' and unsubscribe_domain='"+domain+"'";
//		return super.findByPage(hql, hqlCount, pb);
//	}
//	
//	/**查询退订信息(根据地址)*/
//	public List<YxyUnsubscribeInfo> findUnsubscribeByEmail(String loginid,String domain,String email) throws Exception {
//		String hql="from YxyUnsubscribeInfo where unsubscribe_loginid='"+loginid+"' and unsubscribe_domain='"+ domain+"' and unsubscribe_email like '%"+email+"%'";
//		return super.getAll(hql);
//	}
//	
//	/**查询退订地址(用户不分页)*/
//	public List<YxyUnsubscribeInfo> findUnAddress(String loginid,String domain) throws Exception {
//		String hql="from YxyUnsubscribeInfo where unsubscribe_loginid='"+loginid+"' and unsubscribe_domain='"+domain+"'";
//		return super.getAll(hql);
//	}
//	
//	/**删除退订*/
//	public void delUnsubscribeByID(int unid) throws Exception {
//		String sql="delete YxyUnsubscribeInfo where unsubscribe_id="+unid;
//		super.updateorDelBySql(sql);
//	}
//	
//	/**查询退订地址(根据邮件UID)*/
//	public List<YxyUnsubscribeInfo> findUnsubscribeByUID(String loginid,
//			String domain, String mailUID) throws Exception {
//		String hql="from YxyUnsubscribeInfo where unsubscribe_loginid='"+loginid+"' and unsubscribe_domain='"+domain+"' and unsubscribe_mail_uid='"+mailUID+"'";
//		return super.getAll(hql);
//	}
//	
//	/**查询退订地址量*/
//	public List findUnTol(String loginid, String domain) throws Exception {
//		String sql="select count(*) from yxy_unsubscribe_info where unsubscribe_loginid='"+loginid+"' and unsubscribe_domain='"+domain+"'";
//		return super.findBySql(sql);
//	}
//	/**查询域总退订地址量*/
//	public List findUnTolDomain(String domain) throws Exception {
//		String sql="select count(*) from yxy_unsubscribe_info where unsubscribe_domain='"+domain+"'";
//		return super.findBySql(sql);
//	}
//	/**查询退订地址量根据时间*/
//	public List findUnByDate(String loginid, String domain, String date)
//			throws Exception {
//		String sql="";
//		if(date.equals("all")){
//			sql="select count(*) from yxy_unsubscribe_info where unsubscribe_loginid='"+loginid+"' and unsubscribe_domain='"+domain+"'";
//		}else{
//			sql="select count(*) from yxy_unsubscribe_info where unsubscribe_loginid='"+loginid+"' and unsubscribe_domain='"+domain+"' and unsubscribe_date like '%"+date+"%'";
//		}
//		return super.findBySql(sql);
//	}
//	/**删除退订地址退过地址*/
//	public void delUnsubscribeByAddress(String loginid, String domain, String address)
//			throws Exception {
//		String hql="delete YxyUnsubscribeInfo where unsubscribe_loginid='"+loginid+"' and unsubscribe_domain='"+domain+"' and unsubscribe_email='"+address+"'";
//		super.updateorDelBySql(hql);
//	}
//	
//	/**hql查询*/
//	public List findByHql(String hql) throws Exception {
//		
//		return super.getAll(hql);
//	}
//	/**sql查询*/
//	public List findBySqlQuery(String sql) throws Exception {
//		
//		return super.findBySql(sql);
//	}
	
	/**实体插入*/
	public int addPojo(YxyUnsubscribeInfo o)throws Exception{
		return super.add(o);
	}
	/**实体编辑*/
	public void updatePojo(YxyUnsubscribeInfo o)throws Exception{
		super.update(o);
	}
	/**HQL查询*/
	public List<YxyUnsubscribeInfo> findByHql(String hql)throws Exception{
		return super.getAll(hql);
	}
	/**HQL数量查询*/
	public int findByHqlCount(String hql)throws Exception{
		return super.count(hql);
	}
	/**指定条记录*/
	public List<YxyUnsubscribeInfo> findByHqlSet(String hql,int num)throws Exception{
		return super.findBySet(hql, num);
	}
	/**HQL查询分页*/
	public List<YxyUnsubscribeInfo> 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);
	}
	

}