Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 380e827e
authored
Dec 21, 2021
by
linkwechat8856@163.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
客户详情相关bug
1 parent
24bbc068
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
3 deletions
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCustomerController.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/constants/SynchRecordConstants.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeMomentsServiceImpl.java
linkwe-wecom/src/main/resources/mapper/wecom/WeCustomerTrajectoryMapper.xml
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCustomerController.java
View file @
380e827
...
@@ -210,6 +210,10 @@ public class WeCustomerController extends BaseController
...
@@ -210,6 +210,10 @@ public class WeCustomerController extends BaseController
List
<
WeCustomerTrajectory
>
weCustomerTrajectories
=
iWeCustomerTrajectoryService
List
<
WeCustomerTrajectory
>
weCustomerTrajectories
=
iWeCustomerTrajectoryService
.
followUpRecord
(
externalUserid
,
userId
,
trajectoryType
);
.
followUpRecord
(
externalUserid
,
userId
,
trajectoryType
);
TableDataInfo
dataTable
=
getDataTable
(
weCustomerTrajectories
);
dataTable
.
setLastSyncTime
(
iWeSynchRecordService
.
findUpdateLatestTime
(
SynchRecordConstants
.
SYNCH_MOMENTS_INTERACTE
)
);
//最近同步时间
return
getDataTable
(
weCustomerTrajectories
);
return
getDataTable
(
weCustomerTrajectories
);
}
}
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/constants/SynchRecordConstants.java
View file @
380e827
...
@@ -11,4 +11,5 @@ public class SynchRecordConstants {
...
@@ -11,4 +11,5 @@ public class SynchRecordConstants {
public
static
final
int
SYNCH_CUSTOMER_PERSON_MOMENTS
=
4
;
//个人朋友圈
public
static
final
int
SYNCH_CUSTOMER_PERSON_MOMENTS
=
4
;
//个人朋友圈
public
static
final
int
SYNCH_CUSTOMER_ENTERPRISE_MOMENTS
=
5
;
//企业朋友圈
public
static
final
int
SYNCH_CUSTOMER_ENTERPRISE_MOMENTS
=
5
;
//企业朋友圈
public
static
final
int
SYNCH_CUSTOMER_TAG
=
6
;
//企业标签同步
public
static
final
int
SYNCH_CUSTOMER_TAG
=
6
;
//企业标签同步
public
static
final
int
SYNCH_MOMENTS_INTERACTE
=
7
;
//同步指定员工个人朋友圈互动情况
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeMomentsServiceImpl.java
View file @
380e827
...
@@ -322,14 +322,20 @@ public class WeMomentsServiceImpl extends ServiceImpl<WeMomentsMapper, WeMoments
...
@@ -322,14 +322,20 @@ public class WeMomentsServiceImpl extends ServiceImpl<WeMomentsMapper, WeMoments
* @param userIds
* @param userIds
*/
*/
@Override
@Override
@
Async
@
SynchRecord
(
synchType
=
SynchRecordConstants
.
SYNCH_MOMENTS_INTERACTE
)
public
void
synchMomentsInteracte
(
List
<
String
>
userIds
)
{
public
void
synchMomentsInteracte
(
List
<
String
>
userIds
)
{
SecurityContext
securityContext
=
SecurityContextHolder
.
getContext
();
//异步同步一下标签库,解决标签不同步问题
Threads
.
SINGLE_THREAD_POOL
.
execute
(
new
Runnable
()
{
@Override
public
void
run
()
{
if
(
CollectionUtil
.
isNotEmpty
(
userIds
)){
if
(
CollectionUtil
.
isNotEmpty
(
userIds
)){
userIds
.
stream
().
forEach
(
userId
->{
userIds
.
stream
().
forEach
(
userId
->{
List
<
WeMoments
>
weMoments
=
this
.
list
(
new
LambdaQueryWrapper
<
WeMoments
>()
List
<
WeMoments
>
weMoments
=
list
(
new
LambdaQueryWrapper
<
WeMoments
>()
.
apply
(
StringUtils
.
isNotEmpty
(
userId
),
"FIND_IN_SET('"
+
userId
+
"',add_user)"
)
.
apply
(
StringUtils
.
isNotEmpty
(
userId
),
"FIND_IN_SET('"
+
userId
+
"',add_user)"
)
.
eq
(
WeMoments:
:
getType
,
1
)
.
eq
(
WeMoments:
:
getType
,
1
)
.
eq
(
WeMoments:
:
getDelFlag
,
WeConstans
.
WE_SUCCESS_CODE
));
.
eq
(
WeMoments:
:
getDelFlag
,
WeConstans
.
WE_SUCCESS_CODE
));
...
@@ -351,6 +357,10 @@ public class WeMomentsServiceImpl extends ServiceImpl<WeMomentsMapper, WeMoments
...
@@ -351,6 +357,10 @@ public class WeMomentsServiceImpl extends ServiceImpl<WeMomentsMapper, WeMoments
}
}
}
});
}
}
...
...
linkwe-wecom/src/main/resources/mapper/wecom/WeCustomerTrajectoryMapper.xml
View file @
380e827
...
@@ -13,7 +13,8 @@
...
@@ -13,7 +13,8 @@
wu.user_id,
wu.user_id,
wu.user_name,
wu.user_name,
wct.track_time,
wct.track_time,
wct.track_state
wct.track_state,
wct.title
FROM
FROM
we_customer_trajectory wct
we_customer_trajectory wct
LEFT JOIN we_user wu ON wu.user_id = wct.user_id
LEFT JOIN we_user wu ON wu.user_id = wct.user_id
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment