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 | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 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 f3de5d6..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); @@ -635,7 +640,7 @@ * @return 人员详情 */ @Override - public R detailUser(Long userId) { + public R<LoginUserInfoVO> detailUser(Long userId) { LoginUserInfoVO loginUserInfoVO = new LoginUserInfoVO(); if (userId < 100000000l) { SysUserDO sysUserDO = userDao.selectById(userId); @@ -861,7 +866,7 @@ } sysUserDO.setFaceState(null); SysUserDO sysUserDO1 = - userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getIdCard, idCard)); + userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getIdCard, idCard).eq(SysUserDO::getCommunityId,loginUserInfoVO.getCommunityId())); if (!ObjectUtils.isEmpty(sysUserDO1)) { return R.fail("身份证已经存在"); } -- Gitblit v1.7.1