Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
customer-service
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
QG
customer-service
Commits
3b87b4a3
Commit
3b87b4a3
authored
Jun 01, 2020
by
xiaozhe.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客服系统对接中台接口,用户修改、修改密码、修改账户状态
parent
d26e35ce
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
0 deletions
+52
-0
IUserService.java
...ain/java/cn/quantgroup/customer/service/IUserService.java
+14
-0
UserServiceImpl.java
.../cn/quantgroup/customer/service/impl/UserServiceImpl.java
+38
-0
No files found.
src/main/java/cn/quantgroup/customer/service/IUserService.java
View file @
3b87b4a3
...
...
@@ -35,4 +35,18 @@ public interface IUserService extends UserDetailsService {
JsonResult
findUserCombination
(
UserCombinationParam
userCombinationParam
);
/**
* 重置用户密码
* @param phoneNo
* @return
*/
String
passwordRest
(
String
phoneNo
);
/**
* 注销账户
* @param userId
* @return
*/
String
modifyAccountStatusDisable
(
Long
userId
);
}
src/main/java/cn/quantgroup/customer/service/impl/UserServiceImpl.java
View file @
3b87b4a3
...
...
@@ -57,6 +57,10 @@ public class UserServiceImpl implements IUserService {
@Value
(
"${passportapi2.http}"
)
private
String
userSysUrl
;
@Value
(
"${sidecar.http}"
)
private
String
sidecarUrl
;
private
final
UserRepo
userRepo
;
private
final
IHttpService
httpService
;
...
...
@@ -567,4 +571,38 @@ public class UserServiceImpl implements IUserService {
}
@Override
public
String
passwordRest
(
String
phoneNo
)
{
String
url
=
sidecarUrl
+
"/middle_office/middle_office/kefu/password/reset"
;
try
{
Map
<
String
,
String
>
header
=
Maps
.
newHashMap
();
header
.
put
(
"Content-type"
,
"application/x-www-form-urlencoded"
);
Map
param
=
Maps
.
newHashMap
();
param
.
put
(
"phoneNo"
,
phoneNo
);
String
result
=
httpService
.
post
(
url
,
header
,
param
);
log
.
info
(
"[user][passwordRest] 请求业务系统返回值:{}"
,
result
);
return
result
;
}
catch
(
Exception
e
)
{
log
.
error
(
"[user][passwordRest] 网络通讯异常,phoneNo:{},ex:{}"
,
phoneNo
,
ExceptionUtils
.
getStackTrace
(
e
));
throw
new
BusinessException
(
ErrorCodeEnum
.
NET_ERROR
);
}
}
@Override
public
String
modifyAccountStatusDisable
(
Long
userId
)
{
String
url
=
sidecarUrl
+
"/middle_office/middle_office/kefu/user/disable"
;
try
{
Map
<
String
,
String
>
header
=
Maps
.
newHashMap
();
header
.
put
(
"Content-type"
,
"application/x-www-form-urlencoded"
);
Map
param
=
Maps
.
newHashMap
();
param
.
put
(
"userId"
,
userId
);
String
result
=
httpService
.
post
(
url
,
header
,
param
);
log
.
info
(
"[user][modifyAccountStatus] 请求业务系统返回值:{}"
,
result
);
return
result
;
}
catch
(
Exception
e
)
{
log
.
error
(
"[user][modifyAccountStatus] 网络通讯异常,userId:{},ex:{}"
,
userId
,
ExceptionUtils
.
getStackTrace
(
e
));
throw
new
BusinessException
(
ErrorCodeEnum
.
NET_ERROR
);
}
}
}
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