2e88d173985729fa9884e42e8309c78c9b935c2e.svn-base
6.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
package com.espeed.dao.impl;
import java.util.List;
import com.espeed.dao.YxyUserAddressDao;
import com.espeed.pojo.YxyUserAddress;
import com.espeed.vo.PageBean;
/**
* 程序名称: EspeedMail_时速邮箱
* 程序版本: V1.0
* 作 者: 深圳市科飞时速网络技术有限公司(0755-88843776)
* 版权所有: 深圳市科飞时速网络技术有限公司
* 技术支持: Tech@21gmail.com
* 单元名称: 用户地址库dao实现类(营销游)
* 开始时间: 2013.12.09
* 程 序 员: 谢勇
* 最后修改:
* 备 注: 如需修改请通知程序员
*/
public class YxyUserAddressDaoImpl extends HibernateBaseDAOImpl<YxyUserAddress, Long> implements YxyUserAddressDao{
/**实体插入*/
public int addPojo(YxyUserAddress o)throws Exception{
return super.add(o);
}
/**实体编辑*/
public void updatePojo(YxyUserAddress o)throws Exception{
super.update(o);
}
/**HQL查询*/
public List<YxyUserAddress> findByHql(String hql)throws Exception{
return super.getAll(hql);
}
/**指定条记录*/
public List<YxyUserAddress> findByHqlSet(String hql,int num)throws Exception{
return super.findBySet(hql, num);
}
/**HQL查询分页*/
public List<YxyUserAddress> 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);
}
/**实体批量插入*/
public void addPojoPi(List<YxyUserAddress> o) throws Exception {
super.addPi(o);
}
/**HQL数量查询*/
public int findByHqlCount(String hql)throws Exception{
return super.count(hql);
}
// /**批量添加地址库*/
// public void addAddress(List<YxyUserAddress> o) throws Exception {
// super.addPi(o);
// }
//
// /**批量更新地址*/
// public void updateAddress(List<YxyUserAddress> o) throws Exception {
// super.updatePiAddress(o);
// }
//
// /**查询用户地址库*/
// public List<YxyUserAddress> findAddress(String loginid,String domain) throws Exception {
// String hql="from YxyUserAddress where user_loginid='"+loginid+"' and user_domain='"+domain+"'";
// return super.getAll(hql);
// }
// /**用户查询地址库*/
// public List<YxyUserAddress> findAddressAll(String loginid, String domain)throws Exception{
// String hql="from YxyUserAddress where user_loginid='"+loginid+"' and user_domain='"+domain+"'";
// return super.getAll(hql);
// }
// /**分页查询用户地址库*/
// public List<YxyUserAddress> findAddressPage(String loginid,String domain, PageBean pb,int addrTypeID)
// throws Exception {
// String hql="from YxyUserAddress where user_loginid='"+loginid+"' and user_domain='"+domain+"' and user_addr_type_id="+addrTypeID+" order by user_addr_add_date desc";
// String hqlCount="select count(user_addr_id) from YxyUserAddress where user_loginid='"+loginid+"' and user_domain='"+domain+"' and user_addr_type_id="+addrTypeID+" order by user_addr_add_date desc";
// return super.findByPage(hql, hqlCount,pb);
// }
//
// /**分类查询用户地址库*/
// public List<YxyUserAddress> findAddressByType(String loginid,
// String domain, int addrTypeID) throws Exception {
// String hql="from YxyUserAddress where user_loginid='"+loginid+"' and user_domain='"+domain+"' and user_addr_type_id="+addrTypeID;
// return super.getAll(hql);
// }
//
// /**单个添加地址库*/
// public void addAddressSign(YxyUserAddress o) throws Exception {
// super.saveOrUpdate(o);
//
// }
// /**删除类别下的所有地址*/
// public void delYxyAddressByType(String loginID, String domain, int typeID)throws Exception {
// String sql="delete YxyUserAddress where user_loginid='"+loginID+"' and user_domain='"+domain+"' and user_addr_type_id="+typeID;
// super.updateorDelBySql(sql);
// }
// /**删除地址*/
// public void delYxyAddress(String loginID, String domain, String addressID)
// throws Exception {
// String sql="delete YxyUserAddress where user_loginid='"+loginID+"' and user_domain='"+domain+"' and user_addr_id in ("+addressID+")";
// super.updateorDelBySql(sql);
//
// }
// /**根据用户与时间删除*/
// public void delYxyAddByTimer(String loginID, String domain, String date)
// throws Exception {
// String sql="delete YxyUserAddress where user_loginid='"+loginID+"' and user_domain='"+domain+"' and user_addr_add_date<'"+date+"'";
// super.updateorDelBySql(sql);
//
// }
// /**更新地址所属类别*/
// public void updateYxyAddressType(String addressID, int typeID)
// throws Exception {
// String sql="update YxyUserAddress set user_addr_type_id="+typeID+" where user_addr_id in ("+addressID+")";
// super.updateorDelBySql(sql);
//
// }
// /**模糊查询地址*/
// public List<YxyUserAddress> findAddressLike(String loginid, String domain,
// String likeValue) throws Exception {
// String hql="from YxyUserAddress where user_loginid='"+loginid+"' and user_domain='"+domain+"' and (user_addr_name like '%"+likeValue+"%' or user_addr_email like '%"+likeValue+"%')";
// return super.getAll(hql);
// }
//
// /**查询地址所属类别的数量*/
// public List findAddrTypeNum(String loginid, String domain) throws Exception {
// String sql="SELECT user_addr_type_id, COUNT(user_addr_id) FROM yxy_user_address WHERE user_loginid='"+loginid+"' AND user_domain='"+domain+"' GROUP BY user_addr_type_id";
// return super.findBySql(sql);
// }
//
// /**查询地址统计数据根据用户与时间*/
// public List findAddressCountByDate(String loginid, String domain,
// String date) throws Exception {
// String sql="";
// if(date.equals("all")){
// sql="SELECT COUNT(*) FROM yxy_user_address WHERE user_domain='"+domain+"' AND user_loginid='"+loginid+"'";
// }else{
// sql="SELECT COUNT(*) FROM yxy_user_address WHERE user_domain='"+domain+"' AND user_loginid='"+loginid+"' and user_addr_add_date like '%"+date+"%'";
// }
// return super.findBySql(sql);
// }
// /**判断该地址是否存在*/
// public List findAddressIsexits(String loginid, String domain, String address)
// throws Exception {
// String sql="SELECT COUNT(*) FROM yxy_user_address WHERE user_loginid='"+loginid+"' AND user_domain='"+domain+"' and user_addr_email='"+address+"'";
// return super.findBySql(sql);
// }
//
// /**HQL查询*/
// public List<YxyUserAddress> findByHQL(String hql) throws Exception {
//
// return super.getAll(hql);
// }
}