From 0fd06170ad250ecfb8d2ed1c2e8ab402e91d20bf Mon Sep 17 00:00:00 2001 From: changpengfei Date: Sat, 11 Sep 2021 08:47:55 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=94=A8=E6=88=B7=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E8=BF=94=E5=9B=9E=E7=8E=AF=E4=BF=A1=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../talkonlineweb/controller/UserContoller.java | 25 ++++++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) 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); -- 1.8.3.1