From 74e414e5edb613b1774c801a41219124a264ea0d Mon Sep 17 00:00:00 2001
From: 101captain <237651143@qq.com>
Date: 星期四, 23 六月 2022 11:10:13 +0800
Subject: [PATCH] bug修改

---
 springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 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 5ef445e..f519b28 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
@@ -434,6 +434,13 @@
                 }
                 loginUserInfoVO.setRelationName(acidMember.getRelationName());
             }
+            Integer count=userDao.selectOrgAdmin(phone);
+            if(count>0){
+                loginUserInfoVO.setIsCheckUnitAdmin(1);
+            }
+            else {
+                loginUserInfoVO.setIsCheckUnitAdmin(0);
+            }
             //是否网格员
             int easyPhotoMember = userDao.countEasyPhotoMember(phone, userCommunityId);
             if (easyPhotoMember > 0) {
@@ -2188,7 +2195,7 @@
     @Override
     public R getSysUserVOByPhone(String phone) {
         SysUserDO sysUserDO = userDao
-            .selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getPhone, phone).eq(SysUserDO::getType, 1));
+            .selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getPhone, phone).eq(SysUserDO::getType, 1).orderByDesc(SysUserDO::getCreateAt).last("limit 1"));
         if (ObjectUtils.isEmpty(sysUserDO)) {
             return R.fail("账号或密码错误");
         }

--
Gitblit v1.7.1