Browse Source

专家和资源信息修改可为空的字段可以修改为空。

zzy.zhiyuan.foxmail 8 years ago
parent
commit
78d72bdefb

+ 5 - 4
src/main/java/com/ekexiu/portal/service/ProfessorService.java

@ -330,24 +330,25 @@ public class ProfessorService {
330 330
	
331 331
	@Post
332 332
	@Path("/subject")
333
	public void updateSubject(@JdbcConn(true) Connection con,String id, String subject) throws SQLException{
333
	public void updateSubject(@JdbcConn(true) Connection con,String id,@Nullable String subject) throws SQLException{
334 334
		this.professorDao.updateSubject(con, id, subject);
335 335
	}
336 336
	
337 337
	@Post
338 338
	@Path("/industry")
339
	public void updateIndustry(@JdbcConn(true) Connection con, String id, String industry) throws SQLException{
339
	public void updateIndustry(@JdbcConn(true) Connection con,String id,@Nullable String industry) throws SQLException{
340 340
		this.professorDao.updateIndustry(con, id, industry);
341 341
	}
342 342
	@Post
343 343
	@Path("/address")
344
	public void updateAddress(@JdbcConn(true) Connection con, String id, String province, String address) throws SQLException{
344
	public void updateAddress(@JdbcConn(true) Connection con, String id,
345
			@Nullable String province,@Nullable String address) throws SQLException{
345 346
		this.professorDao.updateProvince(con, id, province);
346 347
		this.professorDao.updateAddress(con, id, address);
347 348
	}
348 349
	@Post
349 350
	@Path("/descp")
350
	public void updateDescp(@JdbcConn(true) Connection con, String id, String descp) throws SQLException{
351
	public void updateDescp(@JdbcConn(true) Connection con,String id,@Nullable String descp) throws SQLException{
351 352
		this.professorDao.updateDescp(con, id, descp);
352 353
	}
353 354
	

+ 8 - 6
src/main/java/com/ekexiu/portal/service/ResourceService.java

@ -187,31 +187,31 @@ public class ResourceService {
187 187
	
188 188
	@Post
189 189
	@Path("/subject")
190
	public void updateSubject(@JdbcConn(true) Connection con, String resourceId, String subject) throws SQLException {
190
	public void updateSubject(@JdbcConn(true) Connection con,String resourceId,@Nullable String subject) throws SQLException {
191 191
		this.resourceDao.updateSubject(con, resourceId, subject);
192 192
	}
193 193

194 194
	@Post
195 195
	@Path("/industry")
196
	public void updateIndustry(@JdbcConn(true) Connection con, String resourceId, String industry) throws SQLException {
196
	public void updateIndustry(@JdbcConn(true) Connection con,String resourceId,@Nullable String industry) throws SQLException {
197 197
		this.resourceDao.updateIndustry(con, resourceId, industry);
198 198
	}
199 199

200 200
	@Post
201 201
	@Path("/descp")
202
	public void updateDescp(@JdbcConn(true) Connection con, String resourceId, String descp) throws SQLException {
202
	public void updateDescp(@JdbcConn(true) Connection con,String resourceId,@Nullable String descp) throws SQLException {
203 203
		this.resourceDao.updateDescp(con, resourceId, descp);
204 204
	}
205 205
	
206 206
	@Post
207 207
	@Path("/hopePayMethod")
208
	public void updateHopePayMethod(@JdbcConn(true) Connection con, String resourceId, String hopePayMethod) throws SQLException {
208
	public void updateHopePayMethod(@JdbcConn(true) Connection con,String resourceId,@Nullable String hopePayMethod) throws SQLException {
209 209
		this.resourceDao.updateHopePayMethod(con, resourceId, hopePayMethod);
210 210
	}
211 211
	
212 212
	@Post
213 213
	@Path("/cooperationNotes")
214
	public void updateCooperationNotes(@JdbcConn(true) Connection con, String resourceId, String cooperationNotes) throws SQLException{
214
	public void updateCooperationNotes(@JdbcConn(true) Connection con,String resourceId,@Nullable String cooperationNotes) throws SQLException{
215 215
		this.resourceDao.updateCooperationNotes(con, resourceId, cooperationNotes);
216 216
	}
217 217
	
@ -245,7 +245,9 @@ public class ResourceService {
245 245
	
246 246
	@Get
247 247
	@Path("/pq")
248
	public PageQueryResult<Resource> queryPage(@JdbcConn(false) Connection con, @Nullable String key, @Nullable String subject, @Nullable String industry, @Nullable String address, @DefaultValue("10") int pageSize, @DefaultValue("1") int pageNo) throws SQLException {
248
	public PageQueryResult<Resource> queryPage(@JdbcConn(false) Connection con, @Nullable String key, 
249
			@Nullable String subject, @Nullable String industry, @Nullable String address, 
250
			@DefaultValue("10") int pageSize, @DefaultValue("1") int pageNo) throws SQLException {
249 251
		if(key!=null) key="%"+key+"%";
250 252
		if(subject!=null) subject ="%"+subject+"%";
251 253
		if(industry!=null)industry="%"+industry+"%";