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
b8808675
Commit
b8808675
authored
Dec 27, 2021
by
killer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改文案
parent
a2962409
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
8 deletions
+18
-8
UserController.java
...n/quantgroup/xyqb/controller/external/UserController.java
+6
-3
AppController.java
...antgroup/xyqb/controller/internal/user/AppController.java
+3
-3
InnerController.java
...tgroup/xyqb/controller/internal/user/InnerController.java
+3
-0
LoginModule.java
...group/xyqb/controller/middleoffice/login/LoginModule.java
+5
-1
UserServiceImpl.java
...cn/quantgroup/xyqb/service/user/impl/UserServiceImpl.java
+1
-1
No files found.
src/main/java/cn/quantgroup/xyqb/controller/external/UserController.java
View file @
b8808675
...
@@ -637,9 +637,12 @@ public class UserController implements IBaseController {
...
@@ -637,9 +637,12 @@ public class UserController implements IBaseController {
private
JsonResult
loginWithUserId
(
Long
channelId
,
String
appChannel
,
Long
createdFrom
,
String
userId
,
Merchant
merchant
,
String
dimension
,
HttpServletRequest
request
)
{
private
JsonResult
loginWithUserId
(
Long
channelId
,
String
appChannel
,
Long
createdFrom
,
String
userId
,
Merchant
merchant
,
String
dimension
,
HttpServletRequest
request
)
{
//查询用户
//查询用户
User
user
=
userService
.
findByUuidInDb
(
userId
);
User
user
=
userService
.
findByUuidInDb
(
userId
);
if
(
Objects
.
isNull
(
user
)
||
UserStatusEnum
.
isDisable
(
user
).
getKey
())
{
if
(
Objects
.
isNull
(
user
))
{
log
.
error
(
"用户不存在,或者已经冻结注销,userId:{}"
,
userId
);
log
.
error
(
"用户不存在,userId:{}"
,
userId
);
return
JsonResult
.
buildErrorStateResult
(
"登录失败"
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"登录失败, 用户不存在"
,
null
);
}
else
if
(
UserStatusEnum
.
isDisable
(
user
).
getKey
())
{
log
.
error
(
"用户已冻结或注销,userId:{}"
,
userId
);
return
UserStatusEnum
.
isDisable
(
user
).
getValue
();
}
else
if
(!
wechatRelateUserIfNecessary
(
user
,
request
))
{
}
else
if
(!
wechatRelateUserIfNecessary
(
user
,
request
))
{
return
JsonResult
.
buildErrorStateResult
(
"登录时微信关联失败"
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"登录时微信关联失败"
,
null
);
}
}
...
...
src/main/java/cn/quantgroup/xyqb/controller/internal/user/AppController.java
View file @
b8808675
...
@@ -101,7 +101,7 @@ public class AppController implements IBaseController {
...
@@ -101,7 +101,7 @@ public class AppController implements IBaseController {
if
(
user
==
null
)
{
if
(
user
==
null
)
{
result
=
JsonResult
.
buildErrorStateResult
(
USER_ERROR_OR_PASSWORD_ERROR
,
null
);
result
=
JsonResult
.
buildErrorStateResult
(
USER_ERROR_OR_PASSWORD_ERROR
,
null
);
}
else
if
(
UserStatusEnum
.
isDisable
(
user
).
getKey
())
{
}
else
if
(
UserStatusEnum
.
isDisable
(
user
).
getKey
())
{
result
=
JsonResult
.
buildErrorStateResult
(
"登录失败"
,
null
);
result
=
UserStatusEnum
.
isDisable
(
user
).
getValue
(
);
}
else
{
}
else
{
Merchant
merchant
=
merchantService
.
findMerchantByName
(
key
);
Merchant
merchant
=
merchantService
.
findMerchantByName
(
key
);
if
(
merchant
==
null
)
{
if
(
merchant
==
null
)
{
...
@@ -235,7 +235,7 @@ public class AppController implements IBaseController {
...
@@ -235,7 +235,7 @@ public class AppController implements IBaseController {
return
JsonResult
.
buildErrorStateResult
(
USER_ERROR_OR_PASSWORD_ERROR
,
null
);
return
JsonResult
.
buildErrorStateResult
(
USER_ERROR_OR_PASSWORD_ERROR
,
null
);
}
}
if
(
UserStatusEnum
.
isDisable
(
user
).
getKey
())
{
if
(
UserStatusEnum
.
isDisable
(
user
).
getKey
())
{
return
JsonResult
.
buildErrorStateResult
(
"登录失败"
,
null
);
return
UserStatusEnum
.
isDisable
(
user
).
getValue
(
);
}
}
Merchant
merchant
=
merchantService
.
findMerchantByName
(
key
);
Merchant
merchant
=
merchantService
.
findMerchantByName
(
key
);
if
(
merchant
==
null
)
{
if
(
merchant
==
null
)
{
...
@@ -339,7 +339,7 @@ public class AppController implements IBaseController {
...
@@ -339,7 +339,7 @@ public class AppController implements IBaseController {
return
JsonResult
.
buildErrorStateResult
(
USER_ERROR_OR_PASSWORD_ERROR
,
null
);
return
JsonResult
.
buildErrorStateResult
(
USER_ERROR_OR_PASSWORD_ERROR
,
null
);
}
}
if
(
UserStatusEnum
.
isDisable
(
user
).
getKey
())
{
if
(
UserStatusEnum
.
isDisable
(
user
).
getKey
())
{
return
JsonResult
.
buildErrorStateResult
(
"登录失败"
,
null
);
return
UserStatusEnum
.
isDisable
(
user
).
getValue
(
);
}
}
//校验租户ID tenantId
//校验租户ID tenantId
oauthLoginInfoService
.
addLoginInfo
(
user
,
tenantId
);
oauthLoginInfoService
.
addLoginInfo
(
user
,
tenantId
);
...
...
src/main/java/cn/quantgroup/xyqb/controller/internal/user/InnerController.java
View file @
b8808675
...
@@ -1349,6 +1349,9 @@ public class InnerController implements IBaseController {
...
@@ -1349,6 +1349,9 @@ public class InnerController implements IBaseController {
if
(
user
==
null
)
{
if
(
user
==
null
)
{
return
JsonResult
.
buildErrorStateResult
(
"用户名或密码不正确"
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"用户名或密码不正确"
,
null
);
}
}
if
(
UserStatusEnum
.
isDisable
(
user
).
getKey
())
{
return
UserStatusEnum
.
isDisable
(
user
).
getValue
();
}
UserRet
model
=
new
UserRet
(
user
);
UserRet
model
=
new
UserRet
(
user
);
return
JsonResult
.
buildSuccessResult
(
"校验成功"
,
model
);
return
JsonResult
.
buildSuccessResult
(
"校验成功"
,
model
);
}
}
...
...
src/main/java/cn/quantgroup/xyqb/controller/middleoffice/login/LoginModule.java
View file @
b8808675
...
@@ -48,7 +48,7 @@ public class LoginModule implements ILoginModule {
...
@@ -48,7 +48,7 @@ public class LoginModule implements ILoginModule {
}
}
if
(
UserStatusEnum
.
isDisable
(
user
).
getKey
())
{
if
(
UserStatusEnum
.
isDisable
(
user
).
getKey
())
{
log
.
info
(
"用户尝试登录,已冻结或注销:{}"
,
phoneNo
);
log
.
info
(
"用户尝试登录,已冻结或注销:{}"
,
phoneNo
);
throw
new
DataException
(
"用户已冻结或销户"
);
throw
new
DataException
(
UserStatusEnum
.
isDisable
(
user
).
getValue
().
getMsg
()
);
}
}
//验证
//验证
...
@@ -87,6 +87,10 @@ public class LoginModule implements ILoginModule {
...
@@ -87,6 +87,10 @@ public class LoginModule implements ILoginModule {
if
(
null
==
user
){
if
(
null
==
user
){
throw
new
DataException
(
"未找到此用户"
);
throw
new
DataException
(
"未找到此用户"
);
}
}
/* 新增冻结销户拦截 */
if
(
UserStatusEnum
.
isDisable
(
user
).
getKey
())
{
throw
new
DataException
(
UserStatusEnum
.
isDisable
(
user
).
getValue
().
getMsg
());
}
LoginProperties
loginProperties
=
LoginProperties
.
builder
()
LoginProperties
loginProperties
=
LoginProperties
.
builder
()
.
createdFrom
(
user
.
getRegisteredFrom
())
.
createdFrom
(
user
.
getRegisteredFrom
())
.
appChannel
(
appChannel
==
null
?
""
:
appChannel
)
.
appChannel
(
appChannel
==
null
?
""
:
appChannel
)
...
...
src/main/java/cn/quantgroup/xyqb/service/user/impl/UserServiceImpl.java
View file @
b8808675
...
@@ -342,7 +342,7 @@ public class UserServiceImpl implements IUserService, IBaseController {
...
@@ -342,7 +342,7 @@ public class UserServiceImpl implements IUserService, IBaseController {
/* 用户已冻结或销户 */
/* 用户已冻结或销户 */
if
(
user
!=
null
&&
UserStatusEnum
.
isDisable
(
user
).
getKey
())
{
if
(
user
!=
null
&&
UserStatusEnum
.
isDisable
(
user
).
getKey
())
{
log
.
info
(
"用户已经冻结或销户, 登录失败, phoneNo:{}"
,
phoneNo
);
log
.
info
(
"用户已经冻结或销户, 登录失败, phoneNo:{}"
,
phoneNo
);
return
JsonResult
.
buildErrorStateResult
(
"登录失败"
,
null
);
return
UserStatusEnum
.
isDisable
(
user
).
getValue
(
);
}
}
if
(
user
==
null
)
{
if
(
user
==
null
)
{
// Service层会负责发送注册消息到LoanVest
// Service层会负责发送注册消息到LoanVest
...
...
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