Browse Source

专家信息表添加联系方式phone和联系邮箱email字段。

zzy.zhiyuan.foxmail 8 years ago
parent
commit
00fb16d89a

+ 21 - 3
src/main/java/com/ekexiu/portal/po/Professor.java

46
	private Integer authentication;
46
	private Integer authentication;
47
	private Integer authType;
47
	private Integer authType;
48
	private Integer authStatus;
48
	private Integer authStatus;
49
	private String phone;
50
	private String email;
49
	
51
	
50
	private Organization organization;
52
	private Organization organization;
51
	private List<Resource> resources;
53
	private List<Resource> resources;
226
		this.starAvg = starAvg;
228
		this.starAvg = starAvg;
227
	}
229
	}
228
230
229
	@Column(handlerClass=WIntHandler.class,dbType="INT",insertable=false,nullable=false,renewable=false,queryable=true)
231
	@Column(handlerClass=WIntHandler.class,dbType="INT",insertable=true,nullable=false,renewable=false,queryable=true)
230
	public Integer getAuthentication() {
232
	public Integer getAuthentication() {
231
		return authentication;
233
		return authentication;
232
	}
234
	}
252
	public void setAuthStatus(Integer authStatus) {
254
	public void setAuthStatus(Integer authStatus) {
253
		this.authStatus = authStatus;
255
		this.authStatus = authStatus;
254
	}
256
	}
255
	
256
	
257
258
	@Column(value=DE.String_de,dbType="VARCHAR(20)")
259
	public String getPhone() {
260
		return phone;
261
	}
262
263
	public void setPhone(String phone) {
264
		this.phone = phone;
265
	}
266
267
	@Column(DE.Email_de)
268
	public String getEmail() {
269
		return email;
270
	}
271
272
	public void setEmail(String email) {
273
		this.email = email;
274
	}
257
275
258
}
276
}

+ 17 - 0
src/main/java/com/ekexiu/portal/service/ProfessorService.java

32
import com.ekexiu.portal.dao.ResearchAreaDao;
32
import com.ekexiu.portal.dao.ResearchAreaDao;
33
import com.ekexiu.portal.dao.ResearchAreaLogDao;
33
import com.ekexiu.portal.dao.ResearchAreaLogDao;
34
import com.ekexiu.portal.dao.ResourceDao;
34
import com.ekexiu.portal.dao.ResourceDao;
35
import com.ekexiu.portal.dao.UserDao;
35
import com.ekexiu.portal.dao.WatchDao;
36
import com.ekexiu.portal.dao.WatchDao;
36
import com.ekexiu.portal.po.Professor;
37
import com.ekexiu.portal.po.Professor;
38
import com.ekexiu.portal.po.User;
37
import com.ekexiu.portal.pojo.EditProfessor;
39
import com.ekexiu.portal.pojo.EditProfessor;
38
import com.ekexiu.portal.pojo.EditResearchAreaLog;
40
import com.ekexiu.portal.pojo.EditResearchAreaLog;
39
import com.ekexiu.portal.pojo.ProfessorInfo;
41
import com.ekexiu.portal.pojo.ProfessorInfo;
41

43

42
@Path("/professor")
44
@Path("/professor")
43
public class ProfessorService {
45
public class ProfessorService {
46
	@Autowrie
47
	private UserDao userDao;
44
	@Autowrie
48
	@Autowrie
45
	private WatchDao watchDao;
49
	private WatchDao watchDao;
46
	@Autowrie
50
	@Autowrie
73
	private ProjectDao projectDao;
77
	private ProjectDao projectDao;
74

78

75
	
79
	
80
	public UserDao getUserDao() {
81
		return userDao;
82
	}
83

84
	public void setUserDao(UserDao userDao) {
85
		this.userDao = userDao;
86
	}
87

76
	public WatchDao getWatchDao() {
88
	public WatchDao getWatchDao() {
77
		return watchDao;
89
		return watchDao;
78
	}
90
	}
210
				professor.setOrgId(this.orgService.createOrganization(con, orgName));
222
				professor.setOrgId(this.orgService.createOrganization(con, orgName));
211
			}
223
			}
212
		}
224
		}
225
		User user = this.userDao.query(con, professor.getId());
226
		if(user != null){
227
			professor.setPhone(user.getMobilePhone());
228
			professor.setEmail(user.getEmail());
229
		}
213
		this.professorDao.insert(con, professor);
230
		this.professorDao.insert(con, professor);
214
		return professor.getId();
231
		return professor.getId();
215
	}
232
	}