Browse Source

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

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

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

52
	@Update
52
	@Update
53
	public abstract int update(Connection con,Resource resource) throws SQLException;
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
	@UpdateWith
60
	@UpdateWith
56
	@From(Resource.class)
61
	@From(Resource.class)
57
	public abstract int updateSubject(Connection con, String resourceId, @Set String subject) throws SQLException;
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
		return this.resourceDao.queryPro(con, professorId);
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
	@Post
135
	@Post
129
	@Path("/subject")
136
	@Path("/subject")
130
	public void updateSubject(@JdbcConn(true) Connection con, String resourceId, String subject) throws SQLException {
137
	public void updateSubject(@JdbcConn(true) Connection con, String resourceId, String subject) throws SQLException {
149
		this.resourceDao.updateHopePayMethod(con, resourceId, hopePayMethod);
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
	@Delete
165
	@Delete
153
	@Path("/{resourceId}")
166
	@Path("/{resourceId}")
154
	public boolean delete(@JdbcConn(true) Connection con, @PathVar String resourceId) throws SQLException {
167
	public boolean delete(@JdbcConn(true) Connection con, @PathVar String resourceId) throws SQLException {