ea193b11e1fa437fcbdf6f22b04b7d16cdbea541.svn-base
2.0 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
package yxy.timer.service.impl;
import java.util.List;
import yxy.timer.dao.YxySendMailDetailDao;
import yxy.timer.dao.YxyUserAddressDao;
import yxy.timer.dao.YxyUserSetDao;
import yxy.timer.pojo.YxyUserSet;
import yxy.timer.service.YxyAddressService;
public class YxyAddressServiceImpl implements YxyAddressService{
/**查询所有用户设置信息*/
public List<YxyUserSet> findAllSet() throws Exception {
return yxyusersetdao.findAllSet();
}
/**删除7天前的地址(默认未分类的)*/
public void delAddress(String timer) throws Exception {
String hql="delete YxyUserAddress where user_addr_type_id=0 and user_addr_add_date<'"+timer+"'";
yxyuseraddressdao.delByHql(hql);
}
/**根据用户与域名删除*/
public void delAddressByUser(String timer, String loginid, String domain)
throws Exception {
String hql="delete YxyUserAddress where user_loginid='"+loginid+"' and user_domain='"+domain+"' and user_addr_type_id!=0 and user_addr_add_date<'"+timer+"'";
yxyuseraddressdao.delByHql(hql);
}
/**删除待发地址*/
public void delDetail() throws Exception {
String hql="delete YxySendMailDetail where status=1";
yxysendmaildetaildao.updateDelByHql(hql);
}
private YxyUserSetDao yxyusersetdao;//用户设置dao
private YxyUserAddressDao yxyuseraddressdao;//用户地址dao
private YxySendMailDetailDao yxysendmaildetaildao;//待发地址dao
public YxyUserSetDao getYxyusersetdao() {
return yxyusersetdao;
}
public void setYxyusersetdao(YxyUserSetDao yxyusersetdao) {
this.yxyusersetdao = yxyusersetdao;
}
public YxyUserAddressDao getYxyuseraddressdao() {
return yxyuseraddressdao;
}
public void setYxyuseraddressdao(YxyUserAddressDao yxyuseraddressdao) {
this.yxyuseraddressdao = yxyuseraddressdao;
}
public YxySendMailDetailDao getYxysendmaildetaildao() {
return yxysendmaildetaildao;
}
public void setYxysendmaildetaildao(YxySendMailDetailDao yxysendmaildetaildao) {
this.yxysendmaildetaildao = yxysendmaildetaildao;
}
}