Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
haoban3.0
haoban-manage3.0
Commits
b9c3c435
Commit
b9c3c435
authored
Apr 15, 2020
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同步通讯录 同步加锁
parent
97d2b925
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
DealSyncOperationApiServiceImpl.java
...ice/service/out/impl/DealSyncOperationApiServiceImpl.java
+9
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/DealSyncOperationApiServiceImpl.java
View file @
b9c3c435
...
...
@@ -133,6 +133,7 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
@Override
public
void
reDealDepartment
(
String
taskId
,
int
dataType
)
{
logger
.
info
(
"开始重新同步:{}"
,
taskId
);
TabHaobanSyncTask
task
=
syncTaskService
.
getSyncTask
(
taskId
);
if
(
null
==
task
)
{
logger
.
info
(
"任务不存在!{}"
,
taskId
);
...
...
@@ -143,6 +144,12 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
logger
.
info
(
"任务不在没有在异常状态!{}"
,
taskId
);
return
;
}
String
lock
=
getTaskLock
(
task
.
getWxEnterpriseId
());
if
(
lock
!=
null
)
{
logger
.
info
(
"已经上锁"
);
return
;
}
lockTask
(
task
.
getWxEnterpriseId
(),
taskId
);
int
groupErrCount
=
preDealService
.
countExcepAndPreByTaskId
(
taskId
,
PreDealTypeEnum
.
group
.
getVal
());
int
storeErrCount
=
preDealService
.
countExcepAndPreByTaskId
(
taskId
,
PreDealTypeEnum
.
store
.
getVal
());
List
<
TabHaobanPreDealLog
>
list
=
null
;
...
...
@@ -159,12 +166,14 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
}
}
if
(
CollectionUtils
.
isEmpty
(
list
))
{
unlockTask
(
task
.
getWxEnterpriseId
());
return
;
}
Set
<
String
>
midList
=
list
.
stream
().
map
(
TabHaobanPreDealLog:
:
getDataId
).
collect
(
Collectors
.
toSet
());
//根据类型获取状态
SyncTaskStatusEnum
syncTaskStatusEnum
=
(
dataType
==
PreDealTypeEnum
.
group
.
getVal
()
?
SyncTaskStatusEnum
.
group_sync
:
(
dataType
==
PreDealTypeEnum
.
store
.
getVal
()
?
SyncTaskStatusEnum
.
store_sync
:
SyncTaskStatusEnum
.
clerk_sync
));
logger
.
info
(
"处理开始:类型:{}"
,
syncTaskStatusEnum
.
getVal
());
dealDepartmentToMq
(
taskId
,
midList
,
syncTaskStatusEnum
);
}
...
...
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