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
eaae7496
Commit
eaae7496
authored
Apr 14, 2023
by
songyinghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 销售线索按客户去重
parent
f4364c20
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
PotentialCustomerNotifyBuilder.java
...rvice/content/adaptor/PotentialCustomerNotifyBuilder.java
+7
-1
TabHaobanInteractRecordMapper.xml
...esources/mapper/content/TabHaobanInteractRecordMapper.xml
+2
-2
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/adaptor/PotentialCustomerNotifyBuilder.java
View file @
eaae7496
...
...
@@ -21,6 +21,7 @@ import com.gic.wechat.api.dto.qywx.QywxXcxSendMessageDTO;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
...
...
@@ -86,6 +87,7 @@ public class PotentialCustomerNotifyBuilder {
List
<
String
>
clerkIds
=
context
.
getCustomerStaticsBos
()
.
stream
()
.
map
(
PotentialCustomerStaticsBO:
:
getClerkId
)
.
distinct
()
.
collect
(
Collectors
.
toList
());
context
.
setClerkIds
(
clerkIds
);
List
<
StaffClerkRelationDTO
>
staffClerkRelations
=
staffClerkRelationService
.
listByClerkIds
(
context
.
getClerkIds
());
...
...
@@ -141,7 +143,6 @@ public class PotentialCustomerNotifyBuilder {
Map
<
String
,
PotentialCustomerStaticsBO
>
customerStaticsBOMap
=
context
.
getCustomerStaticsBos
()
.
stream
()
.
collect
(
Collectors
.
toMap
(
PotentialCustomerStaticsBO:
:
getClerkId
,
Function
.
identity
(),
(
v1
,
v2
)
->
v1
));
Map
<
String
,
TabHaobanClerkMainStoreRelated
>
clerkMainStoreMap
=
new
HashMap
<>();
// 按staffId 聚合
Map
<
String
,
List
<
StaffClerkRelationDTO
>>
staffRelationMap
=
context
.
getStaffClerkRelations
()
...
...
@@ -151,6 +152,11 @@ public class PotentialCustomerNotifyBuilder {
return
staticsBO
!=
null
&&
staticsBO
.
getNum
()
!=
null
&&
staticsBO
.
getNum
()
>
0
;
})
.
collect
(
Collectors
.
groupingBy
(
StaffClerkRelationDTO:
:
getStaffId
));
if
(
MapUtils
.
isEmpty
(
staffRelationMap
))
{
log
.
info
(
"企业下的销售线索统计为空 {}"
,
context
.
getEnterpriseId
());
return
;
}
// 按成员分组
for
(
Map
.
Entry
<
String
,
List
<
StaffClerkRelationDTO
>>
entry
:
staffRelationMap
.
entrySet
())
{
if
(
CollectionUtils
.
isEmpty
(
entry
.
getValue
()))
{
log
.
info
(
"成员不存在有数值的绑定关系 staffIf:{}"
,
entry
.
getKey
());
...
...
haoban-manage3-service/src/main/resources/mapper/content/TabHaobanInteractRecordMapper.xml
View file @
eaae7496
...
...
@@ -285,9 +285,9 @@
</select>
<select
id=
"staticsClerkInteractRecordNew"
resultType=
"com.gic.haoban.manage.service.pojo.bo.content.PotentialCustomerStaticsBO"
>
select clerk_id clerkId, count(
1
) num
select clerk_id clerkId, count(
DISTINCT member_id
) num
from tab_haoban_interact_record
where delete_flag = 0
where delete_flag = 0
and member_id is not null
<if
test=
"clerkId != null and clerkId != ''"
>
and clerk_id = #{clerkId}
</if>
...
...
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