Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
property-management
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
property-management
Commits
280f8c26
Commit
280f8c26
authored
Mar 31, 2021
by
zhangdaiscott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
online报表配置支持多租户系统变量 issues/I3CL75
parent
4e05eaa4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/DataBaseConstant.java
+10
-0
jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/util/JwtUtil.java
+13
-5
No files found.
jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/DataBaseConstant.java
View file @
280f8c26
...
...
@@ -111,4 +111,14 @@ public interface DataBaseConstant {
*/
public
static
final
String
BPM_STATUS_TABLE
=
"bpm_status"
;
//*********系统建表标准字段****************************************
/**
* 租户ID 实体字段名
*/
String
TENANT_ID
=
"tenantId"
;
/**
* 租户ID 数据库字段名
*/
String
TENANT_ID_TABLE
=
"tenant_id"
;
}
jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/util/JwtUtil.java
View file @
280f8c26
...
...
@@ -6,12 +6,8 @@ import com.auth0.jwt.algorithms.Algorithm;
import
com.auth0.jwt.exceptions.JWTDecodeException
;
import
com.auth0.jwt.interfaces.DecodedJWT
;
import
com.google.common.base.Joiner
;
import
java.util.Date
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpSession
;
import
org.apache.shiro.SecurityUtils
;
import
org.jeecg.common.constant.CommonConstant
;
import
org.jeecg.common.constant.DataBaseConstant
;
import
org.jeecg.common.exception.JeecgBootException
;
import
org.jeecg.common.system.vo.LoginUser
;
...
...
@@ -20,6 +16,10 @@ import org.jeecg.common.util.DateUtils;
import
org.jeecg.common.util.SpringContextUtils
;
import
org.jeecg.common.util.oConvertUtils
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpSession
;
import
java.util.Date
;
/**
* @Author Scott
* @Date 2018-07-12 14:23
...
...
@@ -197,6 +197,14 @@ public class JwtUtil {
else
if
(
key
.
equals
(
DataBaseConstant
.
BPM_STATUS
)||
key
.
toLowerCase
().
equals
(
DataBaseConstant
.
BPM_STATUS_TABLE
))
{
returnValue
=
"1"
;
}
//update-begin-author:taoyan date:20210330 for:多租户ID作为系统变量
else
if
(
key
.
equals
(
DataBaseConstant
.
TENANT_ID
)
||
key
.
toLowerCase
().
equals
(
DataBaseConstant
.
TENANT_ID_TABLE
)){
returnValue
=
sysUser
.
getRelTenantIds
();
if
(
oConvertUtils
.
isEmpty
(
returnValue
)
||
(
returnValue
!=
null
&&
returnValue
.
indexOf
(
","
)>
0
)){
returnValue
=
SpringContextUtils
.
getHttpServletRequest
().
getHeader
(
CommonConstant
.
TENANT_ID
);
}
}
//update-end-author:taoyan date:20210330 for:多租户ID作为系统变量
if
(
returnValue
!=
null
){
returnValue
=
returnValue
+
moshi
;}
return
returnValue
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment