|
|
|
@ -24,51 +24,32 @@ public class LoginPersonController extends Controller {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 登录
|
|
|
|
|
*
|
|
|
|
|
* @param username 用户名
|
|
|
|
|
* @param password 密码
|
|
|
|
|
* @param platform 平台
|
|
|
|
|
* @param forVue 0:普通登录,1:vue登录
|
|
|
|
|
* @param platform 平台,比如WEB,APP等
|
|
|
|
|
*/
|
|
|
|
|
@Before({POST.class})
|
|
|
|
|
public void doLogin(String username, String password, String platform, int forVue) {
|
|
|
|
|
public void doLogin(String username, String password, String platform) {
|
|
|
|
|
JSONObject jo = lm.doLogin(username, password, platform, getResponse());
|
|
|
|
|
|
|
|
|
|
if (!jo.getBoolean("success")) {
|
|
|
|
|
renderJson(RetKit.renderFail("用户名或密码错误,无法登录!"));
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int identity_id = jo.getInteger("identity_id");
|
|
|
|
|
String person_id = jo.getString("person_id");
|
|
|
|
|
String bureau_id = jo.getString("bureau_id");
|
|
|
|
|
String person_name = jo.getString("person_name");
|
|
|
|
|
if (forVue == 0) {
|
|
|
|
|
if (identity_id <= 0 || identity_id > 4) {
|
|
|
|
|
renderJson(RetKit.renderFail("基础支撑平台只能是管理员登录访问,您的账号不是管理员!"));
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
renderJson(jo);
|
|
|
|
|
} else {
|
|
|
|
|
if (identity_id != 5) {
|
|
|
|
|
renderJson(RetKit.renderFail("业务系统只支持真实人员登录!"));
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
boolean success = jo.getBoolean("success");
|
|
|
|
|
String msg = jo.getString("message");
|
|
|
|
|
if (!success) {
|
|
|
|
|
renderJson(RetKit.renderFail(msg));
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String jwt = jo.getString("jwt");
|
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
|
map.put("identity_id", identity_id);
|
|
|
|
|
map.put("person_id", person_id);
|
|
|
|
|
map.put("bureau_id", bureau_id);
|
|
|
|
|
map.put("person_name", person_name);
|
|
|
|
|
map.put("jwt", jwt);
|
|
|
|
|
renderJson(RetKit.renderSuccess(msg, map));
|
|
|
|
|
}
|
|
|
|
|
String jwt = jo.getString("jwt");
|
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
|
map.put("identity_id", identity_id);
|
|
|
|
|
map.put("person_id", person_id);
|
|
|
|
|
map.put("bureau_id", bureau_id);
|
|
|
|
|
map.put("person_name", person_name);
|
|
|
|
|
map.put("jwt", jwt);
|
|
|
|
|
renderJson(RetKit.renderSuccess("登录成功", map));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -85,6 +66,7 @@ public class LoginPersonController extends Controller {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 重置密码
|
|
|
|
|
*
|
|
|
|
|
* @param person_id 被重置密码的人的ID
|
|
|
|
|
*/
|
|
|
|
|
@Before({POST.class})
|
|
|
|
@ -103,6 +85,7 @@ public class LoginPersonController extends Controller {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 修改密码
|
|
|
|
|
*
|
|
|
|
|
* @param old_pwd 旧密码
|
|
|
|
|
* @param new_pwd 新密码
|
|
|
|
|
*/
|
|
|
|
@ -160,7 +143,8 @@ public class LoginPersonController extends Controller {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取市级管理员的原始帐号和原始密码
|
|
|
|
|
* @param page 页码
|
|
|
|
|
*
|
|
|
|
|
* @param page 页码
|
|
|
|
|
* @param limit 每页条数
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class})
|
|
|
|
@ -195,7 +179,8 @@ public class LoginPersonController extends Controller {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取市级直属单位的帐号和原始密码
|
|
|
|
|
* @param page 页码
|
|
|
|
|
*
|
|
|
|
|
* @param page 页码
|
|
|
|
|
* @param limit 每页条数
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class})
|
|
|
|
@ -230,7 +215,8 @@ public class LoginPersonController extends Controller {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取县区管理员的帐号和原始密码
|
|
|
|
|
* @param page 页码
|
|
|
|
|
*
|
|
|
|
|
* @param page 页码
|
|
|
|
|
* @param limit 每页条数
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class})
|
|
|
|
@ -265,8 +251,9 @@ public class LoginPersonController extends Controller {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取县区下单位及学校的登录帐号和密码
|
|
|
|
|
* @param page 页码
|
|
|
|
|
* @param limit 每页条数
|
|
|
|
|
*
|
|
|
|
|
* @param page 页码
|
|
|
|
|
* @param limit 每页条数
|
|
|
|
|
* @param area_id 县区id
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class})
|
|
|
|
@ -281,6 +268,7 @@ public class LoginPersonController extends Controller {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取县区下单位及学校的登录帐号和密码(导出EXCEL)
|
|
|
|
|
*
|
|
|
|
|
* @param area_id 县区id
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|