修改获从金宏网获取用户信息,但是还是获取不到guid
This commit is contained in:
parent
70c706ba73
commit
2d403dcc9e
|
@ -79,4 +79,6 @@ public class SysUserEntity extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
private String guid;
|
private String guid;
|
||||||
|
|
||||||
|
private String ywMobile;
|
||||||
|
|
||||||
}
|
}
|
|
@ -381,7 +381,8 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserDao, SysUserEntit
|
||||||
if (m.get(("username")) != null) {
|
if (m.get(("username")) != null) {
|
||||||
String userName = m.get("username").toString();
|
String userName = m.get("username").toString();
|
||||||
SysUserEntity user = sysUserDao.getUserByName(userName);
|
SysUserEntity user = sysUserDao.getUserByName(userName);
|
||||||
if (user == null) {//用户表中没有该用户,插入
|
SysUserEntity userById = sysUserDao.getById(Long.valueOf(m.get("id").toString()));
|
||||||
|
if (user == null && userById == null) {//用户表中没有该用户,插入
|
||||||
SysUserEntity newUser = new SysUserEntity();
|
SysUserEntity newUser = new SysUserEntity();
|
||||||
newUser.setUsername(userName);
|
newUser.setUsername(userName);
|
||||||
newUser.setSuperAdmin(0);
|
newUser.setSuperAdmin(0);
|
||||||
|
@ -390,6 +391,7 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserDao, SysUserEntit
|
||||||
newUser.setRealName(m.get("real_name") == null ? "" : m.get("real_name").toString());
|
newUser.setRealName(m.get("real_name") == null ? "" : m.get("real_name").toString());
|
||||||
newUser.setEmail(m.get("email") == null ? "" : m.get("email").toString());
|
newUser.setEmail(m.get("email") == null ? "" : m.get("email").toString());
|
||||||
newUser.setMobile(m.get("mobile") == null ? "" : m.get("mobile").toString());
|
newUser.setMobile(m.get("mobile") == null ? "" : m.get("mobile").toString());
|
||||||
|
newUser.setYwMobile(m.get("YwMobile") == null ? "" : m.get("YwMobile").toString());
|
||||||
newUser.setStatus(1);//账号状态 1正常 0停用
|
newUser.setStatus(1);//账号状态 1正常 0停用
|
||||||
//给dept_id赋值
|
//给dept_id赋值
|
||||||
String deptNames = m.get("distinguishedName") == null ? "" : m.get("distinguishedName").toString();
|
String deptNames = m.get("distinguishedName") == null ? "" : m.get("distinguishedName").toString();
|
||||||
|
|
|
@ -100,14 +100,16 @@ public class JhlDAPTool {
|
||||||
user.put("email",next.get().toString());
|
user.put("email",next.get().toString());
|
||||||
}else if("telephoneNumber".equals(next.getID())){
|
}else if("telephoneNumber".equals(next.getID())){
|
||||||
user.put("mobile",next.get().toString());
|
user.put("mobile",next.get().toString());
|
||||||
|
}else if("mobile".equals(next.getID())){
|
||||||
|
user.put("ywMobile",next.get().toString());
|
||||||
}else if("distinguishedName".equals(next.getID())){
|
}else if("distinguishedName".equals(next.getID())){
|
||||||
user.put("distinguishedName",next.get().toString());
|
user.put("distinguishedName",next.get().toString());
|
||||||
}else if("objectGUID".equals(next.getID())){
|
}else if("objectGUID".equals(next.getID())){
|
||||||
String guidStr = next.getID().toString();
|
String guidStr = next.get().toString();
|
||||||
|
//Object o = next.get(0);
|
||||||
user.put("id",SingleID.getSingleID(guidStr));
|
user.put("id",SingleID.getSingleID(guidStr));
|
||||||
String guid = guidStr.substring(1,guidStr.length() - 1);
|
String guid = guidStr.substring(1,guidStr.length() - 1);
|
||||||
user.put("guid",guid);
|
user.put("guid",guid);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lm.add(user);
|
lm.add(user);
|
||||||
|
|
Loading…
Reference in New Issue