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
c09d065a
Commit
c09d065a
authored
Aug 26, 2022
by
李健华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加冻结msg返回
parent
3d94f0ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
6 deletions
+28
-6
UserConstant.java
src/main/java/cn/quantgroup/xyqb/constant/UserConstant.java
+2
-0
AppletServiceImpl.java
...b/service/middleoffice/applet/impl/AppletServiceImpl.java
+26
-6
No files found.
src/main/java/cn/quantgroup/xyqb/constant/UserConstant.java
View file @
c09d065a
...
...
@@ -4,4 +4,6 @@ public class UserConstant {
public
static
final
String
USER_ERROR_OR_PASSWORD_ERROR
=
"帐号或密码错误"
;
public
static
final
String
USER_ERROR_OR_ENABLE_ERROR
=
"账号异常,请联系平台客服。"
;
public
static
final
String
USER_FREEZE_ERROR
=
"账号异常,已冻结。"
;
}
src/main/java/cn/quantgroup/xyqb/service/middleoffice/applet/impl/AppletServiceImpl.java
View file @
c09d065a
...
...
@@ -18,7 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
static
cn
.
quantgroup
.
xyqb
.
constant
.
UserConstant
.
USER_
ERROR_OR_ENABL
E_ERROR
;
import
static
cn
.
quantgroup
.
xyqb
.
constant
.
UserConstant
.
USER_
FREEZ
E_ERROR
;
/**
* @author :dongjianhua
...
...
@@ -87,6 +87,10 @@ public class AppletServiceImpl implements IAppletService {
if
(
null
==
user
)
{
user
=
iUserRegisterService
.
register
(
appletParamEntry
.
getChannelId
(),
appletParamEntry
.
getMobile
());
}
if
(!
user
.
getEnable
())
{
log
.
warn
(
"已冻结 userId--{}"
,
user
.
getId
());
throw
new
AppletException
(
USER_FREEZE_ERROR
,
"0401"
);
}
iOauthLoginInfoService
.
addRegisterInfo
(
user
,
appletParamEntry
);
wechatUserInfo
.
setUserId
(
user
.
getId
());
}
...
...
@@ -100,6 +104,12 @@ public class AppletServiceImpl implements IAppletService {
if
(
null
==
user
)
{
user
=
iUserRegisterService
.
register
(
appletParamEntry
.
getChannelId
(),
appletParamEntry
.
getMobile
(),
appletParamEntry
.
getTenantId
());
}
if
(!
user
.
getEnable
())
{
log
.
warn
(
"已冻结 userId--{}"
,
user
.
getId
());
throw
new
AppletException
(
USER_FREEZE_ERROR
,
"0401"
);
}
iOauthLoginInfoService
.
addRegisterInfo
(
user
,
appletParamEntry
);
return
user
.
getId
();
}
...
...
@@ -126,9 +136,15 @@ public class AppletServiceImpl implements IAppletService {
}
user
=
userService
.
findById
(
wechatUserInfo
.
getUserId
());
if
(
null
==
user
||
!
user
.
getEnable
())
{
log
.
warn
(
"未找到此用户或冻结,appName:{} ,openId:{}"
,
appName
,
openId
);
throw
new
AppletException
(
USER_ERROR_OR_ENABLE_ERROR
,
"0401"
);
log
.
warn
(
"未找到此用户,appName:{} ,openId:{}"
,
appName
,
openId
);
throw
new
AppletException
(
"未找到此用户"
,
"0401"
);
}
if
(!
user
.
getEnable
())
{
log
.
warn
(
"已冻结,appName:{} ,openId:{}"
,
appName
,
openId
);
throw
new
AppletException
(
USER_FREEZE_ERROR
,
"0401"
);
}
iOauthLoginInfoService
.
addLoginInfo
(
user
,
tenantId
);
if
(
unionId
!=
null
&&
!
unionId
.
equals
(
wechatUserInfo
.
getUnionId
())
)
{
...
...
@@ -143,9 +159,13 @@ public class AppletServiceImpl implements IAppletService {
throw
new
AppletException
(
"未找到此用户"
,
"0401"
);
}
user
=
userService
.
findById
(
userId
);
if
(
null
==
user
||
!
user
.
getEnable
())
{
log
.
warn
(
"未找到此用户或冻结,appName:{} ,openId:{}"
,
appName
,
openId
);
throw
new
AppletException
(
USER_ERROR_OR_ENABLE_ERROR
,
"0401"
);
if
(
null
==
user
)
{
log
.
warn
(
"未找到此用户,appName:{} ,openId:{}"
,
appName
,
openId
);
throw
new
AppletException
(
"未找到此用户"
,
"0401"
);
}
if
(!
user
.
getEnable
())
{
log
.
warn
(
"已冻结,appName:{} ,openId:{}"
,
appName
,
openId
);
throw
new
AppletException
(
USER_FREEZE_ERROR
,
"0401"
);
}
}
...
...
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