|
@ -5,11 +5,12 @@ import java.sql.SQLException;
|
5
|
5
|
import java.util.List;
|
6
|
6
|
|
7
|
7
|
import org.jfw.apt.annotation.Autowrie;
|
|
8
|
import org.jfw.apt.annotation.DefaultValue;
|
8
|
9
|
import org.jfw.apt.web.annotation.Path;
|
9
|
|
import org.jfw.apt.web.annotation.operate.Delete;
|
10
|
10
|
import org.jfw.apt.web.annotation.operate.Get;
|
11
|
11
|
import org.jfw.apt.web.annotation.operate.Post;
|
12
|
12
|
import org.jfw.apt.web.annotation.param.JdbcConn;
|
|
13
|
import org.jfw.util.PageQueryResult;
|
13
|
14
|
|
14
|
15
|
import com.ekexiu.portal.dao.ProfessorDao;
|
15
|
16
|
import com.ekexiu.portal.dao.ResearchAreaDao;
|
|
@ -70,7 +71,7 @@ public class WatchService {
|
70
|
71
|
return watch.getWatchObject();
|
71
|
72
|
}
|
72
|
73
|
|
73
|
|
@Delete
|
|
74
|
@Post
|
74
|
75
|
@Path("/delete")
|
75
|
76
|
public void delete(@JdbcConn(true) Connection con, String professorId, String watchObject) throws SQLException{
|
76
|
77
|
this.watchDao.delete(con, professorId, watchObject);
|
|
@ -84,8 +85,10 @@ public class WatchService {
|
84
|
85
|
|
85
|
86
|
@Get
|
86
|
87
|
@Path("/qaPro")
|
87
|
|
public List<Watch> queryPro(@JdbcConn Connection con, String professorId, Integer watchType) throws SQLException{
|
88
|
|
List<Watch> watchs = this.watchDao.queryPro(con, professorId, watchType);
|
|
88
|
public PageQueryResult<Watch> queryPro(@JdbcConn Connection con, String professorId, Integer watchType,
|
|
89
|
@DefaultValue("10") int pageSize, @DefaultValue("1") int pageNo) throws SQLException {
|
|
90
|
PageQueryResult<Watch> queryResult = this.watchDao.queryPro(con, professorId, watchType, pageSize, pageNo);
|
|
91
|
List<Watch> watchs = queryResult.getData();
|
89
|
92
|
if(1 == watchType){
|
90
|
93
|
for (Watch watch : watchs) {
|
91
|
94
|
EditProfessor professor = this.professorDao.queryBaseInfo(con, watch.getWatchObject());
|
|
@ -101,7 +104,7 @@ public class WatchService {
|
101
|
104
|
watch.setResource(resource);
|
102
|
105
|
}
|
103
|
106
|
}
|
104
|
|
return watchs;
|
|
107
|
return queryResult;
|
105
|
108
|
}
|
106
|
109
|
|
107
|
110
|
@Get
|