diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/UserContoller.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/UserContoller.java index 32ffb35..e04357d 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/UserContoller.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/UserContoller.java @@ -58,6 +58,11 @@ public class UserContoller { private String clientId; @Value("${hx.ClientSecret}") private String clientSecret; + @Value("${hx.hxuser}") + private String hxuser; + + @Value("${hx.hxpasswd}") + private String hxpasswd; @RequestMapping(value = "login",method = {RequestMethod.GET,RequestMethod.POST,RequestMethod.OPTIONS}) public BaseResponse login(String username, String passwd){ @@ -74,15 +79,21 @@ public class UserContoller { String JWT = JwtUtils.createJWT("1", user.getLogin(), Constant.JWT_TTL); tMap.put("token",JWT); - if(user.getHxid()==null && user.getHid()==null){ - JSONObject json=hxService.addUser(user.getLogin(),Constant.COMMON_PASSWD,"sys_"+user.getUname()); - JSONArray rArr=json.getJSONArray("entities"); - if(rArr.size()>0){ - user.setHxid(rArr.getJSONObject(0).getString("uuid")); - } - } +// if(user.getHxid()==null && user.getHid()==null){ +// JSONObject json=hxService.addUser(user.getLogin(),Constant.COMMON_PASSWD,"sys_"+user.getUname()); +// JSONArray rArr=json.getJSONArray("entities"); +// if(rArr.size()>0){ +// user.setHxid(rArr.getJSONObject(0).getString("uuid")); +// } +// } lymsUserService.saveOrUpdate(user); user.setPasswd(null); + + Map hxMap=new HashMap<>(); + hxMap.put("hxuser",hxuser); + hxMap.put("hxpasswd",hxpasswd); + + tMap.put("hx",hxMap); tMap.put("user",user); } baseResponse.setObject(tMap);