Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
head_group
xyqb-user2
Commits
fc1373dc
Commit
fc1373dc
authored
Nov 15, 2021
by
gaoguangjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
租户ID类型比较
parent
322c5b2d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
4 deletions
+5
-4
AppController.java
...antgroup/xyqb/controller/internal/user/AppController.java
+1
-1
AppletServiceImpl.java
...b/service/middleoffice/applet/impl/AppletServiceImpl.java
+1
-1
SessionServiceImpl.java
...ntgroup/xyqb/service/session/impl/SessionServiceImpl.java
+2
-1
UserServiceImpl.java
...cn/quantgroup/xyqb/service/user/impl/UserServiceImpl.java
+1
-1
No files found.
src/main/java/cn/quantgroup/xyqb/controller/internal/user/AppController.java
View file @
fc1373dc
...
...
@@ -317,7 +317,7 @@ public class AppController implements IBaseController {
return
JsonResult
.
buildErrorStateResult
(
"登录失败"
,
null
);
}
//校验租户ID tenantId
if
(
TenantUtil
.
TENANT_DEFAULT
!=
null
&&
TenantUtil
.
TENANT_DEFAULT
!=
0
&&
TenantUtil
.
TENANT_DEFAULT
!=
tenantId
)
{
if
(
TenantUtil
.
TENANT_DEFAULT
!=
null
&&
TenantUtil
.
TENANT_DEFAULT
!=
0
&&
!
TenantUtil
.
TENANT_DEFAULT
.
equals
(
tenantId
)
)
{
oauthLoginInfoService
.
addLoginInfo
(
user
,
tenantId
);
}
LoginProperties
loginProperties
=
new
LoginProperties
(
""
,
4
,
channelId
,
registerFrom
,
appChannel
,
null
,
""
,
tenantId
);
...
...
src/main/java/cn/quantgroup/xyqb/service/middleoffice/applet/impl/AppletServiceImpl.java
View file @
fc1373dc
...
...
@@ -103,7 +103,7 @@ public class AppletServiceImpl implements IAppletService {
throw
new
AppletException
(
"未找到此用户"
,
"0401"
);
}
//校验租户ID tenantId
if
(
TenantUtil
.
TENANT_DEFAULT
!=
null
&&
TenantUtil
.
TENANT_DEFAULT
!=
0
&&
TenantUtil
.
TENANT_DEFAULT
!=
tenantId
)
{
if
(
TenantUtil
.
TENANT_DEFAULT
!=
null
&&
TenantUtil
.
TENANT_DEFAULT
!=
0
&&
!
TenantUtil
.
TENANT_DEFAULT
.
equals
(
tenantId
)
)
{
iOauthLoginInfoService
.
addLoginInfo
(
user
,
tenantId
);
}
LoginVo
loginVo
=
loginModule
.
loginByUserId
(
user
.
getRegisteredFrom
(),
...
...
src/main/java/cn/quantgroup/xyqb/service/session/impl/SessionServiceImpl.java
View file @
fc1373dc
...
...
@@ -19,6 +19,7 @@ import org.springframework.cache.annotation.Caching;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
javax.annotation.Resource
;
import
java.sql.Timestamp
;
...
...
@@ -104,7 +105,7 @@ public class SessionServiceImpl implements ISessionService {
* @return redisKey. 用来标识这个渠道的用户 Session 是否存在
*/
private
String
generateLoginPropertiesKey
(
Long
userId
,
LoginProperties
properties
)
{
if
(
properties
.
getTenantId
()
==
null
||
properties
.
getTenantId
()
==
0
||
TenantUtil
.
TENANT_DEFAULT
==
properties
.
getTenantId
(
))
{
if
(
ObjectUtils
.
isEmpty
(
properties
.
getTenantId
())
||
properties
.
getTenantId
()
==
0
||
TenantUtil
.
TENANT_DEFAULT
.
equals
(
properties
.
getTenantId
()
))
{
return
Constants
.
Session
.
USER_SESSION_ID_CACHE
+
":"
+
userId
+
":"
+
properties
.
getMerchantName
()
+
":"
+
properties
.
getCreatedFrom
();
}
else
{
return
Constants
.
Session
.
USER_SESSION_ID_CACHE
+
":"
+
userId
+
":"
+
properties
.
getMerchantName
()
+
":"
+
properties
.
getCreatedFrom
()
+
":"
+
properties
.
getTenantId
();
...
...
src/main/java/cn/quantgroup/xyqb/service/user/impl/UserServiceImpl.java
View file @
fc1373dc
...
...
@@ -390,7 +390,7 @@ public class UserServiceImpl implements IUserService, IBaseController {
log
.
info
(
"神策埋点出现问题"
,
e
);
}
//校验租户ID tenantId
if
(
TenantUtil
.
TENANT_DEFAULT
!=
null
&&
TenantUtil
.
TENANT_DEFAULT
!=
0
&&
TenantUtil
.
TENANT_DEFAULT
!=
tenantId
)
{
if
(
TenantUtil
.
TENANT_DEFAULT
!=
null
&&
TenantUtil
.
TENANT_DEFAULT
!=
0
&&
!
TenantUtil
.
TENANT_DEFAULT
.
equals
(
tenantId
)
)
{
oauthLoginInfoService
.
addLoginInfo
(
user
,
tenantId
);
}
LoginProperties
loginProperties
=
new
LoginProperties
(
""
,
3
,
channelId
,
createdFrom
,
appChannel
,
merchant
.
getId
(),
merchant
.
getName
(),
null
);
...
...
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