Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
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
项目统一框架
amos-boot-biz
Commits
075cca45
Commit
075cca45
authored
Mar 24, 2023
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tzs注册 注解同步ugp部分
parent
4c980ed1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
21 deletions
+21
-21
RegUnitInfoServiceImpl.java
...dule/tzs/flc/biz/service/impl/RegUnitInfoServiceImpl.java
+21
-21
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/service/impl/RegUnitInfoServiceImpl.java
View file @
075cca45
...
...
@@ -135,23 +135,23 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
// 3.2 自动创建:调用平台进行创建单位、用户信息
this
.
createCompanyAndUser
(
regUnitInfo
);
//多线程同步ugp信息
String
token
=
RequestContext
.
getToken
();
String
appKey
=
RequestContext
.
getAppKey
();
String
product
=
RequestContext
.
getProduct
();
Callable
callable
=
new
Callable
(){
@Override
public
Object
call
()
throws
Exception
{
RequestContext
.
setToken
(
token
);
RequestContext
.
setAppKey
(
appKey
);
RequestContext
.
setProduct
(
product
);
//同步企业至ugp,成功返回true,失败返回false
return
ugpServiceFeignClient
.
syncCompany
(
model
);
}
};
FutureTask
<
ResponseModel
<
Boolean
>>
future
=
new
FutureTask
(
callable
);
Thread
thread
=
new
Thread
(
future
);
thread
.
start
();
//多线程同步ugp信息
(tzs和ugp一起后放开)
//
String token = RequestContext.getToken();
//
String appKey = RequestContext.getAppKey();
//
String product = RequestContext.getProduct();
//
Callable callable = new Callable(){
//
@Override
//
public Object call() throws Exception {
//
RequestContext.setToken(token);
//
RequestContext.setAppKey(appKey);
//
RequestContext.setProduct(product);
//
//同步企业至ugp,成功返回true,失败返回false
//
return ugpServiceFeignClient.syncCompany(model);
//
}
//
};
//
FutureTask<ResponseModel<Boolean>> future = new FutureTask(callable);
//
Thread thread = new Thread(future);
//
thread.start();
// 1.插入单位注册许可信息表:tz_base_unit_licence
...
...
@@ -189,10 +189,10 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
// 5.3工商信息
model
.
setRegUnitIc
(
Bean
.
toModel
(
regUnitIc
,
new
RegUnitIcDto
()));
//获取多线程执行结果 true成功 false失败
if
(!
future
.
get
().
getResult
()){
throw
new
Exception
(
"UGP信息同步失败"
);
}
//获取多线程执行结果 true成功 false失败
(tzs和ugp一起后放开)
//
if(!future.get().getResult()){
//
throw new Exception("UGP信息同步失败");
//
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
...
...
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