Browse Source

Merge branch 'master' of http://121.42.53.174:3000/bulomakaka/ekexiu.com.portal.git

happy 8 years ago
parent
commit
a69e62919e

+ 5 - 3
src/main/java/com/ekexiu/portal/dao/WatchDao.java

@ -4,12 +4,14 @@ import java.sql.Connection;
4 4
import java.sql.SQLException;
5 5
import java.util.List;
6 6

7
import org.jfw.apt.annotation.Nullable;
7 8
import org.jfw.apt.orm.annotation.dao.DAO;
8 9
import org.jfw.apt.orm.annotation.dao.method.From;
9 10
import org.jfw.apt.orm.annotation.dao.method.OrderBy;
10 11
import org.jfw.apt.orm.annotation.dao.method.operator.DeleteWith;
11 12
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
12 13
import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
14
import org.jfw.apt.orm.annotation.dao.method.operator.SelectOne;
13 15

14 16
import com.ekexiu.portal.po.Watch;
15 17

@ -30,9 +32,9 @@ public abstract class WatchDao {
30 32
	@From(Watch.class)
31 33
	public abstract int deleteWatch(Connection con, String watchObject) throws SQLException;
32 34
	
33
//	@Nullable
34
//	@SelectOne
35
//	public abstract Watch queryOne(Connection con, String professorId, String watchObject) throws SQLException;
35
	@Nullable
36
	@SelectOne
37
	public abstract Watch queryOne(Connection con, String professorId, String watchObject) throws SQLException;
36 38
	
37 39
	@SelectList
38 40
	@OrderBy(" ORDER BY CREATE_TIME DESC ")

+ 7 - 1
src/main/java/com/ekexiu/portal/pojo/ProfessorInfo.java

@ -15,6 +15,7 @@ import com.ekexiu.portal.po.ResearchAreaLog;
15 15
public class ProfessorInfo extends Professor{
16 16
	
17 17
	private String orgName;
18
	private Integer hasHeadImage;
18 19
	/**
19 20
	 * 研究方向
20 21
	 */
@ -45,13 +46,18 @@ public class ProfessorInfo extends Professor{
45 46
	 */
46 47
	private List<Project> projects;
47 48
	
48
	
49 49
	public String getOrgName() {
50 50
		return orgName;
51 51
	}
52 52
	public void setOrgName(String orgName) {
53 53
		this.orgName = orgName;
54 54
	}
55
	public Integer getHasHeadImage() {
56
		return hasHeadImage;
57
	}
58
	public void setHasHeadImage(Integer hasHeadImage) {
59
		this.hasHeadImage = hasHeadImage;
60
	}
55 61
	public List<ResearchAreaLog> getResearchAreaLogs() {
56 62
		return researchAreaLogs;
57 63
	}

+ 2 - 0
src/main/java/com/ekexiu/portal/service/ProfessorService.java

@ -404,6 +404,7 @@ public class ProfessorService {
404 404
		ProfessorInfo info = this.professorDao.queryInfo(con, id);
405 405
		if(info!=null){
406 406
			info.setOrgName(this.orgDao.query(con, info.getOrgId()).getName());
407
			info.setHasHeadImage(this.imageService.hasProfessorImage(id));
407 408
			info.setEdus(this.professorEduBgDao.query(con, id));
408 409
			info.setHonors(this.honorDao.query(con, id));
409 410
			info.setJobs(this.partTimeJobDao.query(con, id));
@ -412,6 +413,7 @@ public class ProfessorService {
412 413
			info.setProjects(this.projectDao.query(con, id));
413 414
			info.setResearchAreaLogs(this.researchAreaLogDao.query(con, id));
414 415
			info.setResearchAreas(this.researchAreaDao.query(con, id));
416
			info.setResources(this.resourceDao.queryPro(con, id));
415 417
		}
416 418
		return info;
417 419
		

+ 6 - 0
src/main/java/com/ekexiu/portal/service/WatchService.java

@ -76,6 +76,12 @@ public class WatchService {
76 76
		this.watchDao.delete(con, professorId, watchObject);
77 77
	}
78 78
	
79
	@Get
80
	@Path("/hasWatch")
81
	public Watch queryOne(@JdbcConn Connection con, String professorId, String watchObject) throws SQLException {
82
		return this.watchDao.queryOne(con, professorId, watchObject);
83
	}
84
	
79 85
	@Get
80 86
	@Path("/qaPro")
81 87
	public List<Watch> queryPro(@JdbcConn Connection con, String professorId, Integer watchType) throws SQLException{