浏览代码

--update regInviteStaff();

zzy.zhiyuan.foxmail 8 年之前
父节点
当前提交
297b4c76ae
共有 1 个文件被更改,包括 13 次插入2 次删除
  1. 13 2
      src/main/java/com/ekexiu/portal/service/SysService.java

+ 13 - 2
src/main/java/com/ekexiu/portal/service/SysService.java

849
		
849
		
850
	}
850
	}
851
	
851
	
852
	@SetCookie(checkResultNull = true, path = "/", value = { "userid=result.getId()", "userMobilePhone=result.getMobilePhone()", "userType=result.getType()",
853
			"userAuth=String.valueOf(result.isAuth())", "userEmail=result.getEmail()==null?\"\":result.getEmail()",
854
			"userName=result.getName()==null?\"\":java.net.URLEncoder.encode(result.getName(),\"utf-8\")" })
852
	@Post
855
	@Post
853
	@Path("/regInviteStaff")
856
	@Path("/regInviteStaff")
854
	@SuppressWarnings("unchecked")
857
	@SuppressWarnings("unchecked")
855
	public String regInviteStaff(@JdbcConn(true) Connection con,String key,String state,String phone,String validateCode,String name,String passwd)throws SQLException, JfwBaseException{
858
	public SessionUser regInviteStaff(@JdbcConn(true) Connection con,String key,String state,String phone,String validateCode,String name,String passwd)throws SQLException, JfwBaseException{
856
		StateCode<String, String> stateCode = (StateCode<String, String>) JfwAppContext.getCachedObject(key);
859
		StateCode<String, String> stateCode = (StateCode<String, String>) JfwAppContext.getCachedObject(key);
857
		StateCode<String, String> sc = (StateCode<String, String>) JfwAppContext.getCachedObject(state);
860
		StateCode<String, String> sc = (StateCode<String, String>) JfwAppContext.getCachedObject(state);
858
		if (stateCode == null) {
861
		if (stateCode == null) {
880
	        professor.setId(id);
883
	        professor.setId(id);
881
	        professor.setName(name);
884
	        professor.setName(name);
882
	        professor.setOrgId(stateCode.getKey());
885
	        professor.setOrgId(stateCode.getKey());
886
	        professor.setOrgAuth("1");
883
			this.userDao.insert(con, user);
887
			this.userDao.insert(con, user);
884
			this.professorDao.insert(con, professor);
888
			this.professorDao.insert(con, professor);
885
			return id;
889
			SessionUser ret = new SessionUser();
890
			ret.setMobilePhone(phone);
891
			ret.setEmail(user.getEmail());
892
			ret.setName(name);
893
			ret.setId(id);
894
			ret.setType(user.getUserType());
895
			ret.setAuth(true);
896
			return ret;
886
		} finally {
897
		} finally {
887
			JfwAppContext.removeCachedObject(key);
898
			JfwAppContext.removeCachedObject(key);
888
			JfwAppContext.removeCachedObject(state);
899
			JfwAppContext.removeCachedObject(state);