记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
89a9c658
Commit
89a9c658
authored
Mar 18, 2022
by
GaoHu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exit
parent
d0594cae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
8 deletions
+21
-8
SmileUserServiceImpl.java
...min/zhengzai/smile/service/impl/SmileUserServiceImpl.java
+21
-8
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/smile/service/impl/SmileUserServiceImpl.java
View file @
89a9c658
...
...
@@ -109,7 +109,7 @@ public class SmileUserServiceImpl extends ServiceImpl<SmileUserMapper, SmileUser
public
AjaxResult
updateUserStateById
(
String
uid
,
Integer
state
)
{
//修改黑名单
smileUserMapper
.
updateUserStateById
(
uid
,
state
);
updateRedisSetUser
(
uid
,
null
,
state
,
null
,
null
,
null
);
updateRedisSetUser
(
uid
,
state
);
return
AjaxResult
.
success
();
}
...
...
@@ -133,7 +133,7 @@ public class SmileUserServiceImpl extends ServiceImpl<SmileUserMapper, SmileUser
if
(
smileUserCheckVo
.
getState
().
equals
(
3
))
{
//申请被驳回
smileUserMapper
.
updateUserCheckByUid
(
smileUserCheckVo
.
getUid
(),
smileUserCheckVo
.
getType
(),
smileUserCheckVo
.
getReason
());
updateRedisSetUser
(
smileUserCheckVo
.
getUid
(),
null
,
null
,
null
,
smileUserCheckVo
.
getReason
(),
null
);
updateRedisSetUser
(
smileUserCheckVo
.
getUid
(),
smileUserCheckVo
.
getReason
()
);
}
else
{
//通过审核
//判断是否是总代
...
...
@@ -154,7 +154,7 @@ public class SmileUserServiceImpl extends ServiceImpl<SmileUserMapper, SmileUser
}
}
//更新redis
updateRedisSetUser
(
smileUserCheckVo
.
getUid
(),
smileUserCheckVo
.
getOrgId
(),
null
,
smileUserCheckVo
.
getType
(),
smileUserCheckVo
.
getReason
(),
1
);
updateRedisSetUser
(
smileUserCheckVo
.
getUid
(),
smileUserCheckVo
.
getOrgId
(),
smileUserCheckVo
.
getType
()
);
//修改user代理 id 开启代理
smileUserMapper
.
updateUserByUid
(
smileUserCheckVo
.
getUid
(),
smileUserCheckVo
.
getOrgId
(),
smileUserCheckVo
.
getType
());
}
...
...
@@ -170,18 +170,31 @@ public class SmileUserServiceImpl extends ServiceImpl<SmileUserMapper, SmileUser
}
//更新redis中的用户数据
private
void
updateRedisSetUser
(
String
uid
,
Long
orgId
,
Integer
state
,
Integer
type
,
String
reason
,
Integer
agent
)
{
private
void
updateRedisSetUser
(
String
uid
,
Long
orgId
,
Integer
type
)
{
SmileUserVO
smileUserVO
=
(
SmileUserVO
)
smileRedisUtils
.
get
(
SmileRedisConst
.
SMILE_USER
+
uid
);
//组织id
if
(
StringUtils
.
isNotNull
(
orgId
))
smileUserVO
.
setOrgId
(
orgId
);
//状态 0:正常,1:黑名单
if
(
StringUtils
.
isNotNull
(
state
))
smileUserVO
.
setState
(
state
);
//代理 代理类型(0:未审核,1:总代,2:普代,3:未认证)
if
(
StringUtils
.
isNotNull
(
type
))
smileUserVO
.
setType
(
type
);
//代理开启标识 type==1 type==2
smileUserVO
.
setAgent
(
1
);
//存入redis中
smileRedisUtils
.
set
(
SmileRedisConst
.
SMILE_USER
+
uid
,
smileUserVO
);
}
//跟新redis中的用户 0:正常,1:黑名单
private
void
updateRedisSetUser
(
String
uid
,
Integer
state
){
SmileUserVO
smileUserVO
=
(
SmileUserVO
)
smileRedisUtils
.
get
(
SmileRedisConst
.
SMILE_USER
+
uid
);
//状态 0:正常,1:黑名单
if
(
StringUtils
.
isNotNull
(
state
))
smileUserVO
.
setState
(
state
);
//存入redis中
smileRedisUtils
.
set
(
SmileRedisConst
.
SMILE_USER
+
uid
,
smileUserVO
);
}
private
void
updateRedisSetUser
(
String
uid
,
String
reason
){
SmileUserVO
smileUserVO
=
(
SmileUserVO
)
smileRedisUtils
.
get
(
SmileRedisConst
.
SMILE_USER
+
uid
);
//审核失败原因
if
(
StringUtils
.
isNotNull
(
reason
))
smileUserVO
.
setErrorReason
(
reason
);
//代理开启标识 type==1 type==2
if
(
StringUtils
.
isNotNull
(
agent
))
smileUserVO
.
setAgent
(
agent
);
//存入redis中
smileRedisUtils
.
set
(
SmileRedisConst
.
SMILE_USER
+
uid
,
smileUserVO
);
}
...
...
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