Browse Source

关注添加是否关注某个专家或资源的判断接口。

zzy.zhiyuan.foxmail 8 years ago
parent
commit
7fb60f5b3b

+ 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 ")

+ 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{