Quellcode durchsuchen

专家所属机构修改。

bulomakaka vor 8 Jahren
Ursprung
Commit
c22c6b9cca

+ 17 - 0
src/main/java/com/ekexiu/portal/pojo/EditProfessor.java

1
package com.ekexiu.portal.pojo;
2

3
import com.ekexiu.portal.po.Professor;
4

5
public class EditProfessor extends Professor {
6
	private String orgName;
7

8
	public String getOrgName() {
9
		return orgName;
10
	}
11

12
	public void setOrgName(String orgName) {
13
		this.orgName = orgName;
14
	}
15
	
16

17
}

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

31
import com.ekexiu.portal.dao.ResearchAreaDao;
31
import com.ekexiu.portal.dao.ResearchAreaDao;
32
import com.ekexiu.portal.dao.ResearchAreaLogDao;
32
import com.ekexiu.portal.dao.ResearchAreaLogDao;
33
import com.ekexiu.portal.po.Professor;
33
import com.ekexiu.portal.po.Professor;
34
import com.ekexiu.portal.pojo.EditProfessor;
34
import com.ekexiu.portal.pojo.ProfessorInfo;
35
import com.ekexiu.portal.pojo.ProfessorInfo;
35

36

36
@Path("/professor")
37
@Path("/professor")
179

180

180
	@Put
181
	@Put
181
	@Path
182
	@Path
182
	public void update(@JdbcConn(true) Connection con, @RequestBody Professor professor) throws SQLException {
183
	public void update(@JdbcConn(true) Connection con, @RequestBody EditProfessor professor) throws SQLException, IOException {
184
		if(professor.getOrgName()!=null)
185
			professor.setOrgId(this.orgService.createOrganization(con, professor.getOrgName()));
183
		this.professorDao.update(con, professor);
186
		this.professorDao.update(con, professor);
184
	}
187
	}
185

188