Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-dj-pe-analysis
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 54e18aae
authored
Dec 29, 2025
by
杨卫
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:1047852:运营去重
1 parent
beb54bdf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
2 deletions
rpc-dj-pe-analysis-api/src/main/java/cn/com/glsx/dj/peanalysis/dto/analysis/MerchantBiMatterDTO.java
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/service/BiAnalyseBackgroundService.java
rpc-dj-pe-analysis-api/src/main/java/cn/com/glsx/dj/peanalysis/dto/analysis/MerchantBiMatterDTO.java
View file @
54e18aa
...
...
@@ -9,6 +9,7 @@ import javax.validation.constraints.NotBlank;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
/**
* BI-事项管理响应对象
...
...
@@ -85,5 +86,18 @@ public class MerchantBiMatterDTO implements Serializable {
*/
@NotBlank
(
message
=
"运营人员名称不能为空"
)
private
String
username
;
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
{
return
true
;}
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
{
return
false
;}
OperatorDTO
that
=
(
OperatorDTO
)
o
;
return
Objects
.
equals
(
uuid
,
that
.
uuid
);
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
uuid
);
}
}
}
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/service/BiAnalyseBackgroundService.java
View file @
54e18aa
...
...
@@ -772,13 +772,14 @@ public class BiAnalyseBackgroundService {
request
.
setDirectorTypes
(
directorTypeEnums
.
stream
().
map
(
ele
->
ObjectUtil
.
toString
(
ele
.
getValue
())).
collect
(
Collectors
.
toList
()));
List
<
ShopMerchantDirectorConfig
>
directorConfigs
=
merchantBiMatterMapper
.
selectBiMerchantOperator
(
request
);
Map
<
Byte
,
Lis
t
<
MerchantBiMatterDTO
.
OperatorDTO
>>
directorTypeMapOperator
=
directorConfigs
.
stream
()
Map
<
Byte
,
Se
t
<
MerchantBiMatterDTO
.
OperatorDTO
>>
directorTypeMapOperator
=
directorConfigs
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
ShopMerchantDirectorConfig:
:
getDirectorType
,
Collectors
.
mapping
(
ele
->
MerchantBiMatterDTO
.
OperatorDTO
.
builder
()
.
uuid
(
ele
.
getDirectorUserId
())
.
username
(
ele
.
getDirectorName
())
.
build
(),
Collectors
.
toList
())));
Collectors
.
toSet
())));
// 处理区域运营和线上运营
MerchantOperatorDetailDTO
result
=
new
MerchantOperatorDetailDTO
();
...
...
@@ -792,11 +793,24 @@ public class BiAnalyseBackgroundService {
Optional
.
ofNullable
(
directorTypeMapOperator
.
get
(
DirectorTypeEnum
.
AREA_SUPERVISION_1_1
.
getValue
()))
.
ifPresent
(
r
->
result
.
getAreaOperator
().
addAll
(
r
));
// 无关联的线上运营或区域运营,则无法提交并toast:无可跟进的线上运营或区域运营,请确认后重新操作;
if
(
CollUtil
.
isEmpty
(
result
.
getOnlineOperator
())
&&
CollUtil
.
isEmpty
(
result
.
getAreaOperator
()))
{
throw
new
RpcServiceException
(
BiErrorEnum
.
NO_ONLINE_AREA_OPERATOR_ERROR
);
}
// 去重
List
<
MerchantBiMatterDTO
.
OperatorDTO
>
onlineOperator
=
result
.
getOnlineOperator
();
if
(
CollUtil
.
isNotEmpty
(
onlineOperator
))
{
result
.
setOnlineOperator
(
onlineOperator
.
stream
()
.
distinct
()
.
collect
(
Collectors
.
toList
()));
}
List
<
MerchantBiMatterDTO
.
OperatorDTO
>
areaOperator
=
result
.
getAreaOperator
();
if
(
CollUtil
.
isNotEmpty
(
areaOperator
))
{
result
.
setAreaOperator
(
areaOperator
.
stream
().
distinct
().
collect
(
Collectors
.
toList
()));
}
return
result
;
}
...
...
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