|
|
@@ -37,29 +37,33 @@ public class UuzcController extends BaseController {
|
|
|
UserView user = SystemSession.getUser();
|
|
|
ModelMap map = new ModelMap();
|
|
|
//先判断个人账户类型
|
|
|
- String personalUrl = "http://job.uutest.com/index.php?m=&c=ubtob&a=check_user&uc_uid=" + user.getDialectUID();
|
|
|
+ String personalUrl = "http://job.uuzcc.com/index.php?m=&c=ubtob&a=check_user&uc_uid=" + user.getDialectUID();
|
|
|
HttpUtil.ResponseWrap responseWrap = HttpUtil.doGet(personalUrl);
|
|
|
- ResultInfo userInfo = JSONObject.parseObject(responseWrap.getContent(), ResultInfo.class);
|
|
|
- if(null != userInfo.getData()) {
|
|
|
- if(userInfo.getData().getCode().equals("2")) {//个人用户
|
|
|
- UuzcUserInfo info = getUserInfo(user, false);
|
|
|
- JSONObject formData = JSON.parseObject(JSON.toJSONString(info));
|
|
|
- map.put("user", formData);
|
|
|
- map.put("usertype", "personal");
|
|
|
- return map;
|
|
|
- } else if(userInfo.getData().getCode().equals("1")) {// 企业用户
|
|
|
- UuzcUserInfo info = getUserInfo(user, true);
|
|
|
- JSONObject formData = JSON.parseObject(JSON.toJSONString(info));
|
|
|
- //判断是否设置了hr
|
|
|
- String result = AccountUtils.getHrAccount(info.getLicense());
|
|
|
- ResultInfo resInfo = JSONObject.parseObject(result, ResultInfo.class);
|
|
|
- map.put("hr", resInfo.getExistHr() ? true : false);
|
|
|
- if(user.getName().equals(user.getUserSpaceDetail().getAdminName())) {
|
|
|
- map.put("manager", true);
|
|
|
+ if(responseWrap.isSuccess()) {
|
|
|
+ ResultInfo userInfo = JSONObject.parseObject(responseWrap.getContent(), ResultInfo.class);
|
|
|
+ if(null != userInfo.getData()) {
|
|
|
+ if(userInfo.getData().getCode().equals("2")) {//个人用户
|
|
|
+ UuzcUserInfo info = getUserInfo(user, false);
|
|
|
+ JSONObject formData = JSON.parseObject(JSON.toJSONString(info));
|
|
|
+ map.put("user", formData);
|
|
|
+ map.put("usertype", "personal");
|
|
|
+ return map;
|
|
|
+ } else if(userInfo.getData().getCode().equals("1")) {// 企业用户
|
|
|
+ UuzcUserInfo info = getUserInfo(user, true);
|
|
|
+ JSONObject formData = JSON.parseObject(JSON.toJSONString(info));
|
|
|
+ //判断是否设置了hr
|
|
|
+ String result = AccountUtils.getHrAccount(info.getLicense());
|
|
|
+ ResultInfo resInfo = JSONObject.parseObject(result, ResultInfo.class);
|
|
|
+ map.put("hr", resInfo.getExistHr() ? true : false);
|
|
|
+ if(user.getName().equals(user.getUserSpaceDetail().getAdminName())) {
|
|
|
+ map.put("manager", true);
|
|
|
+ }
|
|
|
+ map.put("user", info);
|
|
|
+ map.put("usertype", "company");
|
|
|
}
|
|
|
- map.put("user", info);
|
|
|
- map.put("usertype", "company");
|
|
|
}
|
|
|
+ } else {
|
|
|
+ map.put("info", "信息验证失败");
|
|
|
}
|
|
|
return map;
|
|
|
}
|