|
@ -849,10 +849,13 @@ public class SysService {
|
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
|
855
|
@Post
|
853
|
856
|
@Path("/regInviteStaff")
|
854
|
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
|
859
|
StateCode<String, String> stateCode = (StateCode<String, String>) JfwAppContext.getCachedObject(key);
|
857
|
860
|
StateCode<String, String> sc = (StateCode<String, String>) JfwAppContext.getCachedObject(state);
|
858
|
861
|
if (stateCode == null) {
|
|
@ -880,9 +883,17 @@ public class SysService {
|
880
|
883
|
professor.setId(id);
|
881
|
884
|
professor.setName(name);
|
882
|
885
|
professor.setOrgId(stateCode.getKey());
|
|
886
|
professor.setOrgAuth("1");
|
883
|
887
|
this.userDao.insert(con, user);
|
884
|
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
|
897
|
} finally {
|
887
|
898
|
JfwAppContext.removeCachedObject(key);
|
888
|
899
|
JfwAppContext.removeCachedObject(state);
|