From c7370c61d564dd0eab5387f176b8d8de5011ee23 Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Fri, 23 Oct 2020 16:10:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E6=89=8B=E6=9C=BA=E5=8F=B7?= =?UTF-8?q?=E4=B9=8B=E5=90=8E=E8=BF=94=E5=9B=9E=E5=BE=AE=E4=BF=A1=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E6=89=80=E9=9C=80=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrauth/controller/UserLoginController.java | 12 ++++++++++-- .../src/main/resources/bootstrap.properties | 5 ----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java index c2d1bcd2..1436cc9c 100644 --- a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java @@ -128,7 +128,7 @@ public class UserLoginController implements UserLoginControllerApi { //生成jwt String token = JwtUtils.createJWT(user.getId()+"","token", times); // state 当前用户的页面地址,需要拼接 http:// 这样才不会站内跳转 - response.sendRedirect("http://www.huorantech.cn/dq/index.html#/Dashboard?token="+token); + response.sendRedirect("http://www.huorantech.cn/dq/index.html#/Dashboard?token="+token+"&account="+user.getAccount()); //response.sendRedirect(state+"?token="+token+"&head_img="+user.getHeadImg()+"&name="+URLEncoder.encode(user.getName(),"UTF-8")); } } @@ -141,7 +141,15 @@ public class UserLoginController implements UserLoginControllerApi { @PostMapping("/bindPhoneAndOpenId") public ResponseResult bindPhoneAndOpenId(@RequestBody @Valid BindOpenIdRequest bindOpenIdRequest){ boolean result = userLoginService.bindPhoneAndOpenId(bindOpenIdRequest); - return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL(); + LoginRequest loginRequest = new LoginRequest(); + if(result){ + //绑定手机号成功调登录接口需要的参数 + loginRequest.setWechatId(bindOpenIdRequest.getWechatId()); + loginRequest.setTenDayEffective(2); + loginRequest.setType(2); + loginRequest.setPhone(bindOpenIdRequest.getPhoneAccount()); + } + return result ? ResponseResult.SUCCESS(loginRequest) : ResponseResult.FAIL(); } /** diff --git a/dq-financial-hrms-auth/src/main/resources/bootstrap.properties b/dq-financial-hrms-auth/src/main/resources/bootstrap.properties index 1ab68e8e..a2d45a96 100644 --- a/dq-financial-hrms-auth/src/main/resources/bootstrap.properties +++ b/dq-financial-hrms-auth/src/main/resources/bootstrap.properties @@ -27,11 +27,6 @@ #spring.redis.jedis.pool.max-idle=8 #spring.redis.jedis.pool.min-idle=0 -##微信开放平台配置 -#wxopen.appid=wx3b7bca679da34921 -#wxopen.appsecret=c8de113c18052b4e2173d913511e486d -##回调地址 -#wxopen.redirect_url=http://www.occupationlab.com/apiHrmsAuth/hrms/auth/userlogin/user/callback # ##正式环境(prod) spring.application.name=dq-financial-hrms-auth