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 5bbeadf1
authored
Nov 25, 2020
by
sunxiwang
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
同步客户修改
1 parent
753597db
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
18 deletions
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/customer/ExternalUserDetail.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerServiceImpl.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/customer/ExternalUserDetail.java
View file @
5bbeadf
...
...
@@ -21,7 +21,7 @@ public class ExternalUserDetail extends WeResultDto {
/** 客户联系人 */
private
List
<
FollowUser
>
follow_user
;
private
List
<
FollowInfo
>
follow_info
;
private
FollowInfo
follow_info
;
@Data
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerServiceImpl.java
View file @
5bbeadf
...
...
@@ -165,31 +165,25 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto
List
<
WeTagGroup
>
weGroups
=
new
ArrayList
<>();
List
<
WeFlowerCustomerTagRel
>
weFlowerCustomerTagRels
=
new
ArrayList
<>();
List
<
WeFlowerCustomerRel
>
weFlowerCustomerRel
=
new
ArrayList
<>();
userDetail
.
getFollow_info
().
stream
().
forEach
(
kk
->
{
// WeFlowerCustomerRel weFlowerCustomerRelOne=new WeFlowerCustomerRel();
// BeanUtils.copyPropertiesignoreOther(kk,weFlowerCustomerRelOne);
Optional
.
ofNullable
(
userDetail
.
getFollow_info
()).
ifPresent
(
followInfo
->
{
Long
weFlowerCustomerRelId
=
SnowFlakeUtil
.
nextId
();
// weFlowerCustomerRelOne.setId(weFlowerCustomerRelId);
// weFlowerCustomerRelOne.setExternalUserid(weCustomer.getExternalUserid());
weFlowerCustomerRel
.
add
(
WeFlowerCustomerRel
.
builder
()
.
id
(
weFlowerCustomerRelId
)
.
userId
(
userId
)
.
description
(
kk
.
getDescription
())
.
remarkCorpName
(
kk
.
getRemark_company
())
.
remarkMobiles
(
kk
.
getRemark_mobiles
())
.
operUserid
(
kk
.
getOper_userid
())
.
addWay
(
kk
.
getAdd_way
())
.
description
(
followInfo
.
getDescription
())
.
remarkCorpName
(
followInfo
.
getRemark_company
())
.
remarkMobiles
(
followInfo
.
getRemark_mobiles
())
.
operUserid
(
followInfo
.
getOper_userid
())
.
addWay
(
followInfo
.
getAdd_way
())
.
externalUserid
(
weCustomer
.
getExternalUserid
())
.
createTime
(
new
Date
(
kk
.
getCreatetime
()
*
1000L
))
.
createTime
(
new
Date
(
followInfo
.
getCreatetime
()
*
1000L
))
.
build
());
List
<
String
>
tags
=
Stream
.
of
(
kk
.
getTag_id
()).
collect
(
Collectors
.
toList
());
List
<
String
>
tags
=
Stream
.
of
(
followInfo
.
getTag_id
()).
collect
(
Collectors
.
toList
());
if
(
CollectionUtil
.
isNotEmpty
(
tags
))
{
//获取相关标签组
WeCropGroupTagListDto
weCropGroupTagListDto
=
weCropTagClient
.
getCorpTagListByTagIds
(
WeFindCropTagParam
.
builder
()
.
tag_id
(
kk
.
getTag_id
())
.
tag_id
(
followInfo
.
getTag_id
())
.
build
());
if
(
weCropGroupTagListDto
.
getErrcode
().
equals
(
WeConstans
.
WE_SUCCESS_CODE
))
{
...
...
@@ -234,10 +228,9 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto
}
}
}
});
List
<
WeFlowerCustomerRel
>
weFlowerCustomerRels
=
iWeFlowerCustomerRelService
.
list
(
new
LambdaQueryWrapper
<
WeFlowerCustomerRel
>()
.
eq
(
WeFlowerCustomerRel:
:
getExternalUserid
,
weCustomer
.
getExternalUserid
()));
...
...
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