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 e8fd3cd4
authored
Nov 05, 2021
by
linkwechat8856@163.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
客户画像,标签增加过滤功能
1 parent
95b7fd86
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletions
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerServiceImpl.java
linkwe-wecom/src/main/resources/mapper/wecom/WeCustomerMapper.xml
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerServiceImpl.java
View file @
e8fd3cd
...
@@ -10,6 +10,7 @@ import com.google.common.collect.Lists;
...
@@ -10,6 +10,7 @@ import com.google.common.collect.Lists;
import
com.linkwechat.common.constant.Constants
;
import
com.linkwechat.common.constant.Constants
;
import
com.linkwechat.common.constant.WeConstans
;
import
com.linkwechat.common.constant.WeConstans
;
import
com.linkwechat.common.enums.TrajectorySceneType
;
import
com.linkwechat.common.enums.TrajectorySceneType
;
import
com.linkwechat.common.exception.wecom.WeComException
;
import
com.linkwechat.common.utils.DateUtils
;
import
com.linkwechat.common.utils.DateUtils
;
import
com.linkwechat.common.utils.SecurityUtils
;
import
com.linkwechat.common.utils.SecurityUtils
;
import
com.linkwechat.common.utils.StringUtils
;
import
com.linkwechat.common.utils.StringUtils
;
...
@@ -77,6 +78,9 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto
...
@@ -77,6 +78,9 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto
@Autowired
@Autowired
private
IWeCustomerTrajectoryService
iWeCustomerTrajectoryService
;
private
IWeCustomerTrajectoryService
iWeCustomerTrajectoryService
;
@Autowired
private
IWeTagService
iWeTagService
;
// /**
// /**
...
@@ -293,6 +297,18 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto
...
@@ -293,6 +297,18 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto
if
(
CollectionUtil
.
isNotEmpty
(
addTag
)){
if
(
CollectionUtil
.
isNotEmpty
(
addTag
)){
//校验是否有标签在库里不存在
//校验是否有标签在库里不存在
List
<
WeTag
>
weTagList
=
iWeTagService
.
list
(
new
LambdaQueryWrapper
<
WeTag
>()
.
in
(
WeTag:
:
getTagId
,
addTag
.
stream
().
map
(
WeTag:
:
getTagId
).
collect
(
Collectors
.
toList
()))
);
if
(
CollectionUtil
.
isNotEmpty
(
weTagList
)){
if
(
addTag
.
size
()!=
weTagList
.
size
()){
new
WeComException
(
"部门标签不存在"
);
}
}
else
{
new
WeComException
(
"部门标签不存在"
);
}
CutomerTagEdit
cutomerTagEdit
=
CutomerTagEdit
.
builder
()
CutomerTagEdit
cutomerTagEdit
=
CutomerTagEdit
.
builder
()
...
...
linkwe-wecom/src/main/resources/mapper/wecom/WeCustomerMapper.xml
View file @
e8fd3cd
...
@@ -477,7 +477,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -477,7 +477,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
GROUP_CONCAT(wt.`tag_id`) as tagIds
GROUP_CONCAT(wt.`tag_id`) as tagIds
FROM
FROM
we_customer wc
we_customer wc
LEFT JOIN we_flower_customer_tag_rel wfcrf ON wfcrf.user_id = wc.first_user_id
LEFT JOIN we_flower_customer_tag_rel wfcrf ON wfcrf.user_id = wc.first_user_id
AND wfcrf.del_flag=0
LEFT JOIN we_tag wt ON wt.tag_id = wfcrf.tag_id
LEFT JOIN we_tag wt ON wt.tag_id = wfcrf.tag_id
WHERE wc.external_userid=#{externalUserid} and wc.first_user_id=#{userid}
WHERE wc.external_userid=#{externalUserid} and wc.first_user_id=#{userid}
</select>
</select>
...
...
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