From fc127750a0fb5433cc4bf12700ffe0482ce819c9 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期五, 25 十月 2024 10:33:33 +0800 Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV --- pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/client/ClientCtrl.java | 26 +++++++++++++++++++++++--- 1 files changed, 23 insertions(+), 3 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/client/ClientCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/client/ClientCtrl.java index 6194926..b01084c 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/client/ClientCtrl.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/client/ClientCtrl.java @@ -191,7 +191,7 @@ String sessionKey = job.getString("session_key"); Long clientId = clientSv.getClientIdByPhone(phoneNumber); - String SessionId = ""; + String sessionId = ""; if(clientId != null) { // 娣诲姞寰俊鐢ㄦ埛璐︽埛璁板綍 SeOpenId seOpenId = new SeOpenId(); @@ -202,12 +202,12 @@ //Long SessionId = clientSv.addOpenId(seOpenId); Long rec = clientSv.addOpenId(seOpenId); if(rec != null) { - SessionId = String.valueOf(rec); + sessionId = String.valueOf(rec); } JSONObject job_result = new JSONObject(); job_result.put("clientId", clientId); - job_result.put("SessionId", SessionId); + job_result.put("sessionId", sessionId); return BaseResponseUtils.buildSuccess(job_result); } else { @@ -216,6 +216,26 @@ } /** + * 瑙g粦鍐滄埛涓庡井淇$殑缁戝畾锛屾牴鎹畇essionId鍒犻櫎缁戝畾璁板綍 + * @param sessionId + * @return + */ + @PostMapping(path = "unbind") + @Transactional(rollbackFor = Exception.class) + public BaseResponse<Boolean> unbindWechat(@RequestParam("sessionId")Long sessionId) { + if(sessionId == null || sessionId <=0) { + return BaseResponseUtils.buildErrorMsg("sessionId鏃犳晥"); + } + + Integer rec = clientSv.unbindWechat(sessionId); + if(rec == null || rec == 0) { + return BaseResponseUtils.buildErrorMsg("sessionId閿欒"); + } + + return BaseResponseUtils.buildSuccess(); + } + + /** * 鑾峰彇鍐滄埛鍩烘湰淇℃伅锛屽皬绋嬪簭棣栭〉浣跨敤 * @param sessionId * @return -- Gitblit v1.8.0