Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-smartcarlife
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 6adc95fb
authored
Jul 02, 2026
by
潘诗林
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix:客户画像消费标签为空判断
1 parent
4931563a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
rpc-dj-smartcarlife/src/main/java/cn/com/glsx/dj/smartcarlife/service/CustomerTagService.java
rpc-dj-smartcarlife/src/main/java/cn/com/glsx/dj/smartcarlife/service/CustomerTagService.java
View file @
6adc95f
...
...
@@ -191,15 +191,13 @@ public class CustomerTagService {
result
.
setEmployeeName
(
info
.
getEmployeeName
());
result
.
setCreatedBy
(
info
.
getCreatedBy
());
result
.
setCreatedDate
(
info
.
getCreatedDate
());
if
(
CollectionUtils
.
isEmpty
(
tagList
))
{
return
result
;
Map
<
String
,
List
<
CustomerProfileRespDTO
>>
categoryMap
=
new
HashMap
<>();
if
(
CollectionUtils
.
isNotEmpty
(
tagList
))
{
// 按类别分组 (batchQueryProfile 已通过 SQL JOIN 返回了名称, 无需额外查询)
categoryMap
=
tagList
.
stream
().
collect
(
Collectors
.
groupingBy
(
p
->
p
.
getCategoryCode
()
!=
null
?
p
.
getCategoryCode
()
:
""
));
}
// 按类别分组 (batchQueryProfile 已通过 SQL JOIN 返回了名称, 无需额外查询)
Map
<
String
,
List
<
CustomerProfileRespDTO
>>
categoryMap
=
tagList
.
stream
().
collect
(
Collectors
.
groupingBy
(
p
->
p
.
getCategoryCode
()
!=
null
?
p
.
getCategoryCode
()
:
""
));
// 消费力标签
result
.
setConsumptionTag
(
buildCategoryGroup
(
categoryMap
.
remove
(
CommonConstants
.
TAG_CATEGORY_CONSUMPTION
),
...
...
@@ -290,7 +288,7 @@ public class CustomerTagService {
private
TagCategoryGroup
buildCategoryGroup
(
List
<
CustomerProfileRespDTO
>
list
,
boolean
concatCategoryPath
)
{
TagCategoryGroup
group
=
new
TagCategoryGroup
();
group
.
setCategoryName
(
list
.
isEmpty
(
)
?
""
:
group
.
setCategoryName
(
CollectionUtils
.
isEmpty
(
list
)
?
""
:
StringUtils
.
defaultIfBlank
(
list
.
get
(
0
).
getCategoryName
(),
""
));
if
(
CollectionUtils
.
isEmpty
(
list
))
{
...
...
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