From 5a88c6ba9108aef9bf7fdfbea34d5b86bbeffba1 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 09 十一月 2023 15:06:33 +0800
Subject: [PATCH] 完善行政区划代码
---
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