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
dae80c4a
Commit
dae80c4a
authored
Mar 19, 2022
by
吴琼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改调用用户中心参数
parent
4293ad11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
24 deletions
+19
-24
UserServiceImpl.java
.../cn/quantgroup/customer/service/impl/UserServiceImpl.java
+19
-24
No files found.
src/main/java/cn/quantgroup/customer/service/impl/UserServiceImpl.java
View file @
dae80c4a
...
...
@@ -835,32 +835,27 @@ public class UserServiceImpl implements IUserService {
*/
@Override
public
JsonResult
deleteAccount
(
Long
userId
)
{
//调用kdsp接口
Map
<
String
,
String
>
header
=
Maps
.
newHashMap
();
header
.
put
(
"Content-type"
,
"application/x-www-form-urlencoded"
);
header
.
put
(
"qg-tenant-id"
,
"560761"
);
String
kdspUrl
=
kdspOperationUrl
+
"/api/kdsp/customer/logged-off"
;
Map
param
=
Maps
.
newHashMap
();
param
.
put
(
"userId"
,
userId
.
toString
());
String
result
=
httpService
.
post
(
kdspUrl
,
header
,
param
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
result
);;
String
businessCode
=
jsonObject
.
getString
(
"businessCode"
);
if
(!
"0000"
.
equals
(
businessCode
)){
return
JsonResult
.
buildErrorStateResult
(
jsonObject
.
getString
(
"msg"
),
jsonObject
.
get
(
"data"
));
}
//删除用户相关信息
String
userUrl
=
userSysUrl
+
"/innerapi/user/delete/"
+
userId
;
String
userResult
=
httpService
.
get
(
userUrl
,
header
);
if
(
userResult
!=
null
){
JSONObject
userJsonObject
=
JSONObject
.
parseObject
(
userResult
);;
String
userBusinessCode
=
jsonObject
.
getString
(
"businessCode"
);
if
(
"0000"
.
equals
(
userBusinessCode
)){
return
JsonResult
.
buildSuccessResult
(
userJsonObject
.
getString
(
"msg"
),
jsonObject
.
get
(
"data"
));
try
{
//调用kdsp接口
Map
<
String
,
String
>
header
=
Maps
.
newHashMap
();
header
.
put
(
"Content-type"
,
"application/x-www-form-urlencoded"
);
header
.
put
(
"qg-tenant-id"
,
"560761"
);
String
kdsp
=
kdspUrl
+
"/api/kdsp/user/customer/logged-off"
;
Map
param
=
Maps
.
newHashMap
();
param
.
put
(
"userId"
,
userId
.
toString
());
param
.
put
(
"tenantId"
,
"560761"
);
String
result
=
httpService
.
post
(
kdsp
,
header
,
param
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
result
);;
String
businessCode
=
jsonObject
.
getString
(
"businessCode"
);
if
(!
"0000"
.
equals
(
businessCode
)){
return
JsonResult
.
buildErrorStateResult
(
jsonObject
.
getString
(
"msg"
),
jsonObject
.
get
(
"data"
));
}
else
{
return
JsonResult
.
build
ErrorStateResult
(
userJsonObject
.
getString
(
"msg"
),
jsonObject
.
get
(
"data"
)
);
return
JsonResult
.
build
SuccessResult
(
"注销成功"
,
null
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"[user][modifyAccountStatusDisableNew] 网络通讯异常,userId:{},ex:{}"
,
userId
,
ExceptionUtils
.
getStackTrace
(
e
));
throw
new
BusinessException
(
ErrorCodeEnum
.
NET_ERROR
);
}
return
JsonResult
.
buildSuccessResult
(
""
,
null
);
}
@Override
...
...
@@ -890,7 +885,7 @@ public class UserServiceImpl implements IUserService {
Map
<
String
,
String
>
header
=
Maps
.
newHashMap
();
header
.
put
(
"Content-type"
,
"application/x-www-form-urlencoded"
);
Map
param
=
Maps
.
newHashMap
();
param
.
put
(
"userId"
,
userId
);
param
.
put
(
"userId"
,
userId
.
toString
()
);
String
userUrl
=
userSysUrl
+
"/innerapi/user/active"
;
String
userResult
=
httpService
.
post
(
userUrl
,
header
,
param
);
JSONObject
userJsonObject
=
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