1
- package team .even .jobcrawler .controller ;
1
+ package team .even .jobcrawler .controller ;
2
2
3
3
import java .io .IOException ;
4
4
import java .io .OutputStream ;
@@ -41,7 +41,7 @@ public class MainController
41
41
public String index (HttpServletRequest request )
42
42
{
43
43
String remoteAddr = request .getRemoteAddr ();
44
- logger .info ("网友" + remoteAddr + "访问了首页。" );
44
+ logger .info ("网友" + remoteAddr + "访问了首页。" );
45
45
return "index" ;
46
46
}
47
47
@@ -78,7 +78,7 @@ public String index(HttpServletRequest request)
78
78
HttpServletRequest request ) throws Exception
79
79
{
80
80
String remoteAddr = request .getRemoteAddr ();
81
- logger .info ("网友" + remoteAddr + "启动了爬虫。职业类型:" + kind + ",地区:" + distinct );
81
+ logger .info ("网友" + remoteAddr + "启动了爬虫。职业类型:" + kind + ",地区:" + distinct );
82
82
List <JobTypes > list = JobTypesDAOFactory .getJobTypesDAOInstance ()
83
83
.findByKindandWorkPlace (kind , distinct );
84
84
if (list .isEmpty ())
@@ -116,10 +116,10 @@ public String index(HttpServletRequest request)
116
116
public @ ResponseBody String stopCrawler (HttpServletRequest request )
117
117
{
118
118
String remoteAddr = request .getRemoteAddr ();
119
- logger .info ("网友" + remoteAddr + "停止了爬虫。" );
119
+ logger .info ("网友" + remoteAddr + "停止了爬虫。" );
120
120
Service service = Service .getInstance ();
121
121
service .close ();
122
- String operation = "正在停止运行爬虫程序,请稍等...\n " ;
122
+ String operation = "正在停止运行爬虫程序,请稍等...\n " ;
123
123
return operation ;
124
124
}
125
125
@@ -135,7 +135,7 @@ public String displayData()
135
135
HttpServletRequest request ) throws Exception
136
136
{
137
137
String remoteAddr = request .getRemoteAddr ();
138
- logger .info ("网友" + remoteAddr + "查看了" + workPlace + "地区" + kind + "职业的数据。" );
138
+ logger .info ("网友" + remoteAddr + "查看了" + workPlace + "地区" + kind + "职业的数据。" );
139
139
List <JobData > list = JobDataDAOFactory .getJobDataDAOInstance ()
140
140
.findByKindandWorkPlace (kind , workPlace );
141
141
return list ;
@@ -147,7 +147,7 @@ public String displayData()
147
147
@ RequestParam (value ="inputPassword" )String inputPassword ) throws Exception
148
148
{
149
149
Service service = Service .getInstance ();
150
- if (service .checkPassword (inputPassword ) == true ) //口令正确
150
+ if (service .checkPassword (inputPassword ) == true ) //口令正确
151
151
{
152
152
boolean flag = true ;
153
153
boolean flag1 = JobDataDAOFactory
@@ -165,7 +165,7 @@ public String displayData()
165
165
return String .valueOf (false );
166
166
}
167
167
}
168
- else //口令错误
168
+ else //口令错误
169
169
{
170
170
return "passwordError" ;
171
171
}
@@ -185,7 +185,7 @@ public String generateReport()
185
185
HttpServletRequest request ) throws Exception
186
186
{
187
187
String remoteAddr = request .getRemoteAddr ();
188
- logger .info ("网友" + remoteAddr + "查看了" + district + "地区" + kind + "职业的报告。" );
188
+ logger .info ("网友" + remoteAddr + "查看了" + district + "地区" + kind + "职业的报告。" );
189
189
Map <String , String > dataMap = new HashMap <String , String >();
190
190
DataAnalyzer analyzer = new DataAnalyzer ();
191
191
dataMap = analyzer .analyzeSalary (kind , district );
@@ -241,7 +241,7 @@ public String password()
241
241
String oldPassword = request .getParameter ("oldPassword" );
242
242
String newPassword = request .getParameter ("newPassword" );
243
243
Service service = Service .getInstance ();
244
- if (service .checkPassword (oldPassword ) == true ) //密码正确
244
+ if (service .checkPassword (oldPassword ) == true ) //密码正确
245
245
{
246
246
if (service .updatePassword (newPassword ) == true )
247
247
{
@@ -252,7 +252,7 @@ public String password()
252
252
return "error!" ;
253
253
}
254
254
}
255
- else //密码错误
255
+ else //密码错误
256
256
{
257
257
return "failure" ;
258
258
}
0 commit comments