YxySendSmtpInfoServiceImpl.java
2.2 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
package com.espeed.service.impl;
import java.util.List;
import com.espeed.dao.YxySendSmtpInfoDao;
import com.espeed.dao.YxySmtpListDao;
import com.espeed.pojo.YxySendSmtpInfo;
import com.espeed.pojo.YxySmtpList;
import com.espeed.service.YxySendSmtpInfoService;
public class YxySendSmtpInfoServiceImpl implements YxySendSmtpInfoService{
/**根据用户与域名查询用户SMTP*/
public List<YxySendSmtpInfo> findAllSmtp(String loginid,String domain) throws Exception {
String hql="from YxySendSmtpInfo where smtp_user_loginid='"+loginid+"' and smtp_user_domain='"+domain+"'";
return yxysendsmtpinfodao.findByHql(hql);
}
/**查询SMTP List信息*/
public List<YxySmtpList> findAllList() throws Exception {
return yxysmtplistdao.findAllList();
}
/**添加SMTP基本信息*/
public void addSmtpinfo(YxySendSmtpInfo o) throws Exception {
yxysendsmtpinfodao.addSmtpinfo(o);
}
/**SMTP是否存在*/
public List<YxySendSmtpInfo> findByAccount(String loginid, String domain,
String account) throws Exception {
String hql="from YxySendSmtpInfo where smtp_user_loginid='"+loginid+"' and smtp_user_domain='"+domain+"' and smtp_service_account='"+account+"'";
return yxysendsmtpinfodao.findByHql(hql);
}
/**SMTP删除*/
public void delSmtp(int id) throws Exception {
yxysendsmtpinfodao.delSmtp(id);
}
/**模糊查询SMTP信息*/
public List<YxySendSmtpInfo> findByLike(String loginid, String domain,
String value) throws Exception {
String hql="from YxySendSmtpInfo where smtp_user_loginid='"+loginid+"' and smtp_user_domain='"+domain+"' and (smtp_service_account like'%"+value+"%' or smtp_service_number like '%"+value+"%')";
return yxysendsmtpinfodao.findByHql(hql);
}
private YxySendSmtpInfoDao yxysendsmtpinfodao;//smtp DAO
private YxySmtpListDao yxysmtplistdao;//SMTP List DAO
public YxySendSmtpInfoDao getYxysendsmtpinfodao() {
return yxysendsmtpinfodao;
}
public void setYxysendsmtpinfodao(YxySendSmtpInfoDao yxysendsmtpinfodao) {
this.yxysendsmtpinfodao = yxysendsmtpinfodao;
}
public YxySmtpListDao getYxysmtplistdao() {
return yxysmtplistdao;
}
public void setYxysmtplistdao(YxySmtpListDao yxysmtplistdao) {
this.yxysmtplistdao = yxysmtplistdao;
}
}