From e024ca67b9d53d5dacb5fc6a3082e0ae118edb63 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Mon, 27 Sep 2021 11:35:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4diamond?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/HighUserCardController.java | 10 ++++------ .../controller/HighUserCommonController.java | 9 ++++----- .../cweb/controller/HighUserController.java | 19 +++++++++---------- .../com/cweb/controller/WechatController.java | 12 +++++------- 4 files changed, 22 insertions(+), 28 deletions(-) diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighUserCardController.java b/hai-cweb/src/main/java/com/cweb/controller/HighUserCardController.java index 35db9cc9..a982734b 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighUserCardController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighUserCardController.java @@ -156,13 +156,11 @@ public class HighUserCardController { redisUtil.del(body.getString("phone")); // 定义个人所有数据 - HighUser user = highUserService.findByUserId(userInfoModel.getHighUser().getId()); HighUserModel highUserModel = new HighUserModel(); - user.setPassword(null); - user.setIsSetPayPwd(highUserPayPasswordService.isSetPayPwd(user.getId())); - user.setIsSetHltCard(highUserCardService.isBindHtlCard(user.getId())); - highUserModel.setHighUser(user); - SessionObject so = new SessionObject(user.getUnionId(), 1 , highUserModel); + HighUser detailData = highUserService.getDetailDataByUser(userInfoModel.getHighUser().getId()); + detailData.setPassword(null); + highUserModel.setHighUser(detailData); + SessionObject so = new SessionObject(detailData.getUnionId(), 1 , highUserModel); return ResponseMsgUtil.success(so); } throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "验证码错误"); diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighUserCommonController.java b/hai-cweb/src/main/java/com/cweb/controller/HighUserCommonController.java index fcb7347a..42829754 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighUserCommonController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighUserCommonController.java @@ -65,12 +65,11 @@ public class HighUserCommonController { user.setStatus(1); highUserService.insertUser(user); } - // 定义个人所有数据 HighUserModel highUserModel = new HighUserModel(); - user.setPassword(null); - highUserModel.setHighUser(user); - SessionObject so = new SessionObject(Base64Util.encode(user.getId().toString()), 1 , highUserModel); - userCenter.save(request, response, so); + HighUser detailData = highUserService.getDetailDataByUser(user.getId()); + detailData.setPassword(null); + highUserModel.setHighUser(detailData); + SessionObject so = new SessionObject(detailData.getUnionId(), 1 , highUserModel); return ResponseMsgUtil.success(so); } catch (Exception e) { return ResponseMsgUtil.exception(e); diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java b/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java index 01596edd..821d39c5 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java @@ -94,11 +94,12 @@ public class HighUserController { HighUser highUser = highUserService.bindUserPhone(phone, request); + // 定义个人所有数据 HighUserModel highUserModel = new HighUserModel(); - highUser.setPassword(null); - highUserModel.setHighUser(highUser); - SessionObject so = new SessionObject(highUser.getUnionId(), 1 , highUserModel); - userCenter.save(request, response, so); + HighUser detailData = highUserService.getDetailDataByUser(highUser.getId()); + detailData.setPassword(null); + highUserModel.setHighUser(detailData); + SessionObject so = new SessionObject(detailData.getUnionId(), 1 , highUserModel); return ResponseMsgUtil.success(so); } catch (Exception e) { @@ -151,13 +152,11 @@ public class HighUserController { highUserPayPasswordService.editUserPayPwd(userPayPassword); // 定义个人所有数据 - HighUser user = highUserService.findByUserId(userInfoModel.getHighUser().getId()); HighUserModel highUserModel = new HighUserModel(); - user.setPassword(null); - user.setIsSetPayPwd(highUserPayPasswordService.isSetPayPwd(user.getId())); - user.setIsSetHltCard(highUserCardService.isBindHtlCard(user.getId())); - highUserModel.setHighUser(user); - SessionObject so = new SessionObject(user.getUnionId(), 1 , highUserModel); + HighUser detailData = highUserService.getDetailDataByUser(userInfoModel.getHighUser().getId()); + detailData.setPassword(null); + highUserModel.setHighUser(detailData); + SessionObject so = new SessionObject(detailData.getUnionId(), 1 , highUserModel); return ResponseMsgUtil.success(so); } catch (Exception e) { diff --git a/hai-cweb/src/main/java/com/cweb/controller/WechatController.java b/hai-cweb/src/main/java/com/cweb/controller/WechatController.java index a5cf6c71..ba4a7efd 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/WechatController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/WechatController.java @@ -107,7 +107,6 @@ public class WechatController { HighUser detailData = highUserService.getDetailDataByUser(highUser.getId()); detailData.setPassword(null); highUserModel.setHighUser(detailData); - SessionObject so = new SessionObject(highUser.getUnionId(), 1 , highUserModel); userCenter.save(request, response, so); @@ -155,7 +154,6 @@ public class WechatController { HighUser detailData = highUserService.getDetailDataByUser(user.getId()); detailData.setPassword(null); highUserModel.setHighUser(detailData); - SessionObject so = new SessionObject(user.getUnionId(), 1 , highUserModel); userCenter.save(request, response, so); @@ -222,9 +220,9 @@ public class WechatController { HighUser detailData = highUserService.getDetailDataByUser(user.getId()); detailData.setPassword(null); highUserModel.setHighUser(detailData); - SessionObject so = new SessionObject(user.getUnionId(), 1 , highUserModel); userCenter.save(request, response, so); + return ResponseMsgUtil.success(so); } catch (Exception e) { @@ -335,10 +333,10 @@ public class WechatController { // 定义个人所有数据 HighUserModel highUserModel = new HighUserModel(); - user.setPassword(null); - highUserModel.setHighUser(user); - user.setIsSetPayPwd(highUserPayPasswordService.isSetPayPwd(user.getId())); - SessionObject so = new SessionObject(userInfo.getString("unionid"), 1 , highUserModel); + HighUser detailData = highUserService.getDetailDataByUser(user.getId()); + detailData.setPassword(null); + highUserModel.setHighUser(detailData); + SessionObject so = new SessionObject(user.getUnionId(), 1 , highUserModel); userCenter.save(request, response, so); return ResponseMsgUtil.success(so);