|
|
|
@ -154,15 +154,9 @@ public class LoginPersonController extends Controller {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//写入Session信息
|
|
|
|
|
// SessionKit.set(getRequest(), getResponse(), "identity_id", loginMap.get("identity_id").toString());
|
|
|
|
|
// SessionKit.set(getRequest(), getResponse(), "person_id", loginMap.get("person_id").toString());
|
|
|
|
|
// SessionKit.set(getRequest(), getResponse(), "bureau_id", loginMap.get("bureau_id").toString());
|
|
|
|
|
// SessionKit.set(getRequest(), getResponse(), "org_code", loginMap.get("org_code").toString());
|
|
|
|
|
// SessionKit.set(getRequest(), getResponse(), "city_id", loginMap.get("city_id").toString());
|
|
|
|
|
// SessionKit.set(getRequest(), getResponse(), "area_id", loginMap.get("area_id").toString());
|
|
|
|
|
//TODO
|
|
|
|
|
|
|
|
|
|
//生成JWT的Token,并且写入到Cookie中
|
|
|
|
|
String token = JwtUtil.generateToken(Integer.parseInt(loginMap.get("identity_id").toString()), loginMap.get("person_id").toString(), loginMap.get("bureau_id").toString());
|
|
|
|
|
CookieUtil.set(getResponse(), "jwt-token", token, false, true);
|
|
|
|
|
//返回相关信息
|
|
|
|
|
resultJson.put("success", true);
|
|
|
|
|
resultJson.put("identity_id", loginMap.get("identity_id").toString());
|
|
|
|
@ -539,7 +533,7 @@ public class LoginPersonController extends Controller {
|
|
|
|
|
* @param email 邮箱
|
|
|
|
|
*/
|
|
|
|
|
@Before(POST.class)
|
|
|
|
|
|
|
|
|
|
@EmptyInterface({"telephone", "email"})
|
|
|
|
|
public void updateTelephoneEmail(String telephone, String email) {
|
|
|
|
|
Record rPerson = JwtUtil.getPersonInfo(getRequest());
|
|
|
|
|
String personId = rPerson.getStr("person_id");
|
|
|
|
|