From f2be4ed3f71f85f15f2c6bb6ab1d0263c1bd5f3a Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期六, 11 十一月 2023 22:13:47 +0800
Subject: [PATCH] 1、完善一些代码 2、实现了片区管理 3、增加了apache的BeanUtils实现对象转Map

---
 pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/busi/SsoCtrl.java |   24 +++++++++++++++++-------
 1 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/busi/SsoCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/busi/SsoCtrl.java
index 9d20d68..6ca0341 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/busi/SsoCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/busi/SsoCtrl.java
@@ -86,7 +86,7 @@
         try {
             //Boolean flag = cacheManager.getCacheNames().isEmpty() ;
             uuid = UUID.randomUUID().toString();
-            userPo = this.sv.login(uuid, vo.phone, vo.password);
+            userPo = this.sv.loginWithMapperXml(uuid, vo.phone, vo.password);
         } catch (Exception e) {
             log.error("鐢ㄦ埛鐧诲綍寮傚父", e);
             return BaseResponseUtils.buildException(e.getMessage()) ;
@@ -131,7 +131,7 @@
         try {
             //Boolean flag = cacheManager.getCacheNames().isEmpty() ;
             uuid = UUID.randomUUID().toString();
-            userPo = this.sv.login(uuid, vo.phone, vo.password);
+            userPo = this.sv.loginWithMapperXml(uuid, vo.phone, vo.password);
         } catch (Exception e) {
             log.error("鐢ㄦ埛鐧诲綍寮傚父", e);
             return BaseResponseUtils.buildException(e.getMessage()) ;
@@ -205,12 +205,17 @@
             if(userPo.supperAdmin != null && userPo.supperAdmin == 1){
                 vo.hasPower = true ;
             }else{
-                if(userPo.privileges != null && userPo.privileges.size() > 0){
-                    vo.hasPower = this.hasOnePrivilege(privilege, userPo) ;
-                    if(!vo.hasPower){
-                        vo.hasPower = this.hasAllPrivilege(allPrivilege, userPo) ;
+                if(privilege.equals("-1")){
+                    //鏃犻渶鏉冮檺楠岃瘉
+                    vo.hasPower = true ;
+                }else{
+                    if(userPo.privileges != null && userPo.privileges.size() > 0){
+                        vo.hasPower = this.hasOnePrivilege(privilege, userPo) ;
                         if(!vo.hasPower){
-                            vo.hasPower = this.hasAnyPrivilege(anyPrivilege, userPo) ;
+                            vo.hasPower = this.hasAllPrivilege(allPrivilege, userPo) ;
+                            if(!vo.hasPower){
+                                vo.hasPower = this.hasAnyPrivilege(anyPrivilege, userPo) ;
+                            }
                         }
                     }
                 }
@@ -222,6 +227,11 @@
         return vo ;
     }
 
+    /////////////////////////////////////////////////////////////////
+    //
+    // 浠ヤ笅绉佹湁鏂规硶
+    //
+    /////////////////////////////////////////////////////////////////
     /**
      * 鍒ゆ柇鐧诲綍鐢ㄦ埛鏄惁鎷ユ湁鎸囧畾鐨勪竴涓潈闄�
      * @param privilege 鎸囧畾鐨勪竴涓潈闄�

--
Gitblit v1.8.0