fc9b08cc6d9cb7d00b9f3567ccb1daacddb042bb.svn-base
1.7 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
package yxy.timer.service.impl;
import java.util.List;
import yxy.timer.dao.YxyMailDayCountDao;
import yxy.timer.dao.YxyMailNumCountDao;
import yxy.timer.dao.YxyReplyInfoDao;
import yxy.timer.pojo.YxyMailNumCount;
import yxy.timer.pojo.YxyReplyInfo;
import yxy.timer.service.YxyReplyInfoService;
public class YxyReplyInfoServiceImpl implements YxyReplyInfoService{
/**批量插入*/
public void addReply(YxyReplyInfo reply)throws Exception{
yxyreplyinfodao.addPojo(reply);
}
/**查询指定量数据*/
public List<YxyReplyInfo> findByHqlSet(String hql,int num)throws Exception{
return yxyreplyinfodao.findByHqlSet(hql, num);
}
/**查询邮件对应的统计数据*/
public YxyMailNumCount getYxyMailNumCount(String mail_uid)throws Exception{
String hql = "from YxyMailNumCount where mail_uid = '"+mail_uid+"'";
List<YxyMailNumCount> counts = yxymailnumcountdao.findByHql(hql);
if(counts.size() > 0){
return counts.get(0);
}else{
return null;
}
}
/**添加或更新邮件对应的统计数据*/
public void addEditYxyMailNumCount(YxyMailNumCount count)throws Exception{
if(count.getId() == 0){//添加
yxymailnumcountdao.addPojo(count);
}else{//编辑
yxymailnumcountdao.updatePojo(count);
}
}
private YxyReplyInfoDao yxyreplyinfodao;//回复dao
private YxyMailNumCountDao yxymailnumcountdao;//链接数dao
public YxyReplyInfoDao getYxyreplyinfodao() {
return yxyreplyinfodao;
}
public void setYxyreplyinfodao(YxyReplyInfoDao yxyreplyinfodao) {
this.yxyreplyinfodao = yxyreplyinfodao;
}
public YxyMailNumCountDao getYxymailnumcountdao() {
return yxymailnumcountdao;
}
public void setYxymailnumcountdao(YxyMailNumCountDao yxymailnumcountdao) {
this.yxymailnumcountdao = yxymailnumcountdao;
}
}