From fca18d30a38e6f1559663db4cc69de785451f22c Mon Sep 17 00:00:00 2001
From: 101captain <237651143@qq.com>
Date: 星期五, 19 八月 2022 13:22:24 +0800
Subject: [PATCH] bug修改

---
 springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/LoginApi.java |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/LoginApi.java b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/LoginApi.java
index f43b425..c6b2991 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/LoginApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/LoginApi.java
@@ -3,7 +3,9 @@
 import javax.annotation.Resource;
 
 import com.panzhihua.common.model.vos.user.UuLoginVO;
+import me.chanjar.weixin.common.error.WxErrorException;
 import org.apache.commons.lang3.StringUtils;
+import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.util.ObjectUtils;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -87,8 +89,8 @@
         if (ObjectUtils.isEmpty(unionid)) {
             unionid = "无";
         }
-        userService.addOrUpdate(openid, sessionKey, unionid);
-        return tokenService.loginApplets(openid);
+        userService.addOrUpdate(openid, sessionKey, unionid,this.getAppId());
+        return tokenService.loginApplets(openid,this.getAppId());
     }
 
     @ApiOperation(value = "H5登录", response = LoginReturnVO.class)
@@ -128,7 +130,7 @@
         R r1 = userService.getUserInfoByUnionId(unionId);
         if (R.isOk(r1)) {
             LoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(JSONObject.toJSONString(r1.getData()), LoginUserInfoVO.class);
-            return tokenService.loginApplets(loginUserInfoVO.getOpenid());
+            return tokenService.loginApplets(loginUserInfoVO.getOpenid(),this.getAppId());
         }
         return r1;
     }
@@ -163,8 +165,8 @@
         if (ObjectUtils.isEmpty(unionid)) {
             unionid = "无";
         }
-        userService.addOrUpdate(openid, sessionKey, unionid);
-        return tokenService.loginApplets(openid);
+        userService.addOrUpdate(openid, sessionKey, unionid,this.getAppId());
+        return tokenService.loginApplets(openid,this.getAppId());
     }
 
     @ApiOperation(value = "维护用户基本信息(昵称、性别、头像)")
@@ -305,4 +307,12 @@
     public R uuLogin(@RequestBody UuLoginVO uuLoginVO){
         return userService.uuLogin(uuLoginVO);
     }
+
+    @ApiOperation("天府通办登录")
+    @PostMapping("tfLogin")
+    public R tfLogin(@RequestBody UuLoginVO uuLoginVO){
+        userService.tfLogin(uuLoginVO);
+        R r=tokenService.tfLogin(uuLoginVO.getMobile(),"Huacheng@123","wx118de8a734d269f0");
+        return r;
+    }
 }

--
Gitblit v1.7.1