From 10b9d2f33c8fd9f3d47998b2672bba60bb1c2251 Mon Sep 17 00:00:00 2001 From: puhanshu <a9236326> Date: 星期二, 25 一月 2022 11:00:34 +0800 Subject: [PATCH] 商业街反馈问题修改 --- springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java index fb240bf..2a6ff6b 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java @@ -305,8 +305,13 @@ new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getType, type).eq(SysUserDO::getOpenid, name)); } else { LambdaQueryWrapper<SysUserDO> wrapper = new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getType, type); - wrapper.and(sysUserDOLambdaQueryWrapper -> sysUserDOLambdaQueryWrapper.eq(SysUserDO::getAccount, name).or() - .eq(SysUserDO::getPhone, name)); + if (type == 11) { + //只允许通过account登录 + wrapper.and(sysUserDOLambdaQueryWrapper -> sysUserDOLambdaQueryWrapper.eq(SysUserDO::getAccount, name)); + } else { + wrapper.and(sysUserDOLambdaQueryWrapper -> sysUserDOLambdaQueryWrapper.eq(SysUserDO::getAccount, name).or() + .eq(SysUserDO::getPhone, name)); + } sysUserDO = userDao.selectOne(wrapper); } boolean empty = ObjectUtils.isEmpty(sysUserDO); -- Gitblit v1.7.1