Browse Source

添加修改资源名称、提供服务和资源合作备注的方法。

zzy.zhiyuan.foxmail 8 years ago
parent
commit
5aa66725c2

+ 5 - 0
src/main/java/com/ekexiu/portal/dao/ResourceDao.java

@ -52,6 +52,11 @@ public abstract class ResourceDao {
52 52
	@Update
53 53
	public abstract int update(Connection con,Resource resource) throws SQLException;
54 54
	
55
	@UpdateWith
56
	@From(Resource.class)
57
	public abstract int updateNameAndSupport(Connection con, String resourceId, @Set String resourceName, 
58
			@Set String supportedServices) throws SQLException;
59
	
55 60
	@UpdateWith
56 61
	@From(Resource.class)
57 62
	public abstract int updateSubject(Connection con, String resourceId, @Set String subject) throws SQLException;

+ 13 - 0
src/main/java/com/ekexiu/portal/service/ResourceService.java

@ -125,6 +125,13 @@ public class ResourceService {
125 125
		return this.resourceDao.queryPro(con, professorId);
126 126
	}
127 127
	
128
	@Get
129
	@Path("/nameAndSupport")
130
	public void updateNameAndSupport(@JdbcConn Connection con, String resourceId, 
131
			String resourceName, String supportedServices) throws SQLException{
132
		this.resourceDao.updateNameAndSupport(con, resourceId, resourceName, supportedServices);
133
	}
134
	
128 135
	@Post
129 136
	@Path("/subject")
130 137
	public void updateSubject(@JdbcConn(true) Connection con, String resourceId, String subject) throws SQLException {
@ -149,6 +156,12 @@ public class ResourceService {
149 156
		this.resourceDao.updateHopePayMethod(con, resourceId, hopePayMethod);
150 157
	}
151 158
	
159
	@Post
160
	@Path("/cooperationNotes")
161
	public void updateCooperationNotes(@JdbcConn(true) Connection con, String resourceId, String cooperationNotes) throws SQLException{
162
		this.resourceDao.updateCooperationNotes(con, resourceId, cooperationNotes);
163
	}
164
	
152 165
	@Delete
153 166
	@Path("/{resourceId}")
154 167
	public boolean delete(@JdbcConn(true) Connection con, @PathVar String resourceId) throws SQLException {