YxyMailIpAction.java
2.5 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
package com.espeed.action;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.HashMap;
import java.util.Map;
import com.espeed.centre.pojo.YxyUserInfo;
import com.espeed.log.LogClass;
import com.espeed.service.YxyMailIpService;
import com.opensymphony.xwork2.ActionContext;
/**
* ip处理action
* @author 陈南巧
*/
public class YxyMailIpAction extends BaseAction {
public String updateIpOfArea(){
try {
//获取用户session
ActionContext ac = ActionContext.getContext();
Map<String,Object> sess = ac.getSession();
YxyUserInfo user=(YxyUserInfo) sess.get("yxyuser");
loginid=user.getLogin_id();//用户账号
domain=user.getDomain();//用户域名
map=yxymailipservice.updateIpOfArea(id,type,ip);
} catch (Exception e) {
map = new HashMap<String,String>();
map.put("result", "0");
StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw, true));
String str = sw.toString();
LogClass.errolog(str,loginid+"@"+domain);
}
return "map";
}
private static final long serialVersionUID = 1L;
private YxyMailIpService yxymailipservice;//ip处理service
private int id;//主键id
private int type;//1点读,2退订,3回复,4链接
private String ip;
private String loginid="error";//用户账号
private String domain="error";//用户域名
private int result;
private String resultStr;
private Map<String,String> map;
public YxyMailIpService getYxymailipservice() {
return yxymailipservice;
}
public void setYxymailipservice(YxyMailIpService yxymailipservice) {
this.yxymailipservice = yxymailipservice;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public String getLoginid() {
return loginid;
}
public void setLoginid(String loginid) {
this.loginid = loginid;
}
public String getDomain() {
return domain;
}
public void setDomain(String domain) {
this.domain = domain;
}
public int getResult() {
return result;
}
public void setResult(int result) {
this.result = result;
}
public String getResultStr() {
return resultStr;
}
public void setResultStr(String resultStr) {
this.resultStr = resultStr;
}
public Map<String, String> getMap() {
return map;
}
public void setMap(Map<String, String> map) {
this.map = map;
}
}