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
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
haoban3.0
haoban-manage3.0
Commits
f3cc80f7
Commit
f3cc80f7
authored
Apr 15, 2020
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同步通讯录 门店同步fix
parent
0c1dc7a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
DealSyncOperationApiServiceImpl.java
...ice/service/out/impl/DealSyncOperationApiServiceImpl.java
+16
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/DealSyncOperationApiServiceImpl.java
View file @
f3cc80f7
...
...
@@ -32,6 +32,7 @@ import com.task.allocation.api.AbstractTaskAllocationNewOperation;
import
com.task.allocation.exception.TaskAllocationException
;
import
com.task.allocation.qo.TaskAllocationComputed
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -76,6 +77,8 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
private
static
final
String
LOCK_KEY
=
"sync_wx_lock_"
;
private
static
final
String
LOCK_SUCCESS_KEY
=
"sync_wx_success_lock_"
;
@Override
public
void
departmentDealMq
(
String
params
)
{
logger
.
info
(
"mq处理中:{}"
,
params
);
...
...
@@ -333,6 +336,14 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
@Override
public
void
unlockTask
(
String
wxEnterpriseId
)
{
String
key
=
LOCK_KEY
+
wxEnterpriseId
;
String
taskId
=
(
String
)
RedisUtil
.
getCache
(
key
);
if
(
StringUtils
.
isNotBlank
(
taskId
))
{
TabHaobanSyncTask
syncTask
=
syncTaskService
.
getSyncTask
(
taskId
);
if
(
syncTask
.
getStatusFlag
().
equals
(
SyncTaskStatusEnum
.
compute
.
getVal
()))
{
String
sKey
=
LOCK_SUCCESS_KEY
+
wxEnterpriseId
;
RedisUtil
.
setCache
(
sKey
,
taskId
);
}
}
RedisUtil
.
delCache
(
key
);
}
...
...
@@ -346,6 +357,11 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
public
SyncCheckDTO
getTaskCheck
(
String
wxEnterpriseId
)
{
String
taskId
=
getTaskLock
(
wxEnterpriseId
);
SyncCheckDTO
syncCheckDTO
=
new
SyncCheckDTO
();
String
sKey
=
LOCK_SUCCESS_KEY
+
wxEnterpriseId
;
if
(
null
==
taskId
)
{
taskId
=
(
String
)
RedisUtil
.
getCache
(
sKey
);
RedisUtil
.
delCache
(
sKey
);
}
if
(
null
==
taskId
)
{
return
syncCheckDTO
;
}
...
...
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