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
38711a29
Commit
38711a29
authored
Jun 12, 2025
by
王祖波
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
机会人群待建联数
parent
bf916a6e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
10 deletions
+35
-10
ContactDataBO.java
.../haoban/manage/service/pojo/bo/contact/ContactDataBO.java
+6
-0
ContactAdaptor.java
...anage/service/service/contact/adaptor/ContactAdaptor.java
+25
-9
HaobanTimerApiServiceImpl.java
...e/service/service/out/impl/HaobanTimerApiServiceImpl.java
+4
-1
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/bo/contact/ContactDataBO.java
View file @
38711a29
...
...
@@ -28,4 +28,10 @@ public class ContactDataBO {
*/
private
Integer
noConnPotCusNum
=
0
;
/**
* 业务类型
* @see com.gic.haoban.manage.api.enums.content.ShareBizType
*/
private
Integer
bizType
;
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/contact/adaptor/ContactAdaptor.java
View file @
38711a29
...
...
@@ -23,6 +23,7 @@ import com.gic.haoban.app.customer.dto.contact.ContactParamDTO;
import
com.gic.haoban.app.customer.dto.contact.ContactSumDTO
;
import
com.gic.haoban.app.customer.service.api.service.CustomerApiService
;
import
com.gic.haoban.common.utils.DateUtil
;
import
com.gic.haoban.manage.api.enums.contact.ContactBizTypeEnum
;
import
com.gic.haoban.manage.service.dao.mapper.content.holo.HoloDataSource
;
import
com.gic.haoban.manage.service.pojo.bo.contact.ContactDataBO
;
import
com.gic.store.goods.dto.potential.PlatformPotentialCustomerOutDTO
;
...
...
@@ -58,10 +59,10 @@ public class ContactAdaptor {
/**
* 潜客商户定时刷新
*/
public
void
contactDataTimer
()
{
public
void
contactDataTimer
(
Integer
bizType
,
String
rightMenuCode
)
{
// 处理潜客相关企业ID
ServiceResponse
<
List
<
EnterpriseUsingStatusDTO
>>
serviceResponse
=
enterpriseUseForbidService
.
getUseEnterpriseByCode
(
EnterpriseServiceEnum
.
POTENTIAL
.
getRightMenuCode
()
,
null
);
enterpriseUseForbidService
.
getUseEnterpriseByCode
(
rightMenuCode
,
null
);
List
<
ContactDataBO
>
list
=
new
ArrayList
<>();
List
<
String
>
eidList
=
Optional
.
ofNullable
(
serviceResponse
.
getResult
()).
orElse
(
Collections
.
emptyList
())
.
stream
()
...
...
@@ -79,7 +80,7 @@ public class ContactAdaptor {
for
(
int
i
=
0
;
i
<
enterpriseClerk
.
size
();
i
++)
{
ClerkListDTO
clerk
=
enterpriseClerk
.
get
(
i
);
// 无归属导购数据
if
(
storeIdSet
.
add
(
clerk
.
getStoreId
()))
{
if
(
storeIdSet
.
add
(
clerk
.
getStoreId
())
&&
Objects
.
equals
(
bizType
,
ContactBizTypeEnum
.
POTENTIAL_CUSTOMER
.
getType
())
)
{
contactDataBO
=
new
ContactDataBO
();
contactDataBO
.
setEnterpriseId
(
clerk
.
getEnterpriseId
());
contactDataBO
.
setClerkId
(
"-1"
);
...
...
@@ -90,6 +91,7 @@ public class ContactAdaptor {
contactDataBO
.
setEnterpriseId
(
clerk
.
getEnterpriseId
());
contactDataBO
.
setClerkId
(
clerk
.
getClerkId
());
contactDataBO
.
setStoreId
(
clerk
.
getStoreId
());
contactDataBO
.
setBizType
(
bizType
);
list
.
add
(
contactDataBO
);
if
(
list
.
size
()
>=
100
||
i
==
enterpriseClerk
.
size
()
-
1
)
{
try
{
...
...
@@ -116,9 +118,14 @@ public class ContactAdaptor {
}
ContactDataBO
contactDataBO
=
list
.
get
(
0
);
String
enterpriseId
=
contactDataBO
.
getEnterpriseId
();
ServiceResponse
<
PlatformPotentialCustomerOutDTO
>
potentialResponse
=
platformPotentialCustomerApiService
.
getPotentialCustomerOutRule
(
enterpriseId
);
if
(!
potentialResponse
.
isSuccess
()
||
potentialResponse
.
getResult
()
==
null
)
{
return
;
Integer
bizType
=
contactDataBO
.
getBizType
();
PlatformPotentialCustomerOutDTO
result
=
null
;
if
(
Objects
.
equals
(
bizType
,
ContactBizTypeEnum
.
POTENTIAL_CUSTOMER
.
getType
()))
{
ServiceResponse
<
PlatformPotentialCustomerOutDTO
>
potentialResponse
=
platformPotentialCustomerApiService
.
getPotentialCustomerOutRule
(
enterpriseId
);
if
(!
potentialResponse
.
isSuccess
()
||
potentialResponse
.
getResult
()
==
null
)
{
return
;
}
result
=
potentialResponse
.
getResult
();
}
List
<
String
>
clerkIdList
=
list
.
stream
().
map
(
ContactDataBO:
:
getClerkId
).
collect
(
Collectors
.
toList
());
List
<
ClerkDTO
>
clerkDTOS
=
clerkService
.
getClerkByClerkIds
(
new
HashSet
<>(
clerkIdList
));
...
...
@@ -126,7 +133,7 @@ public class ContactAdaptor {
for
(
ContactDataBO
dataBO
:
list
)
{
boolean
unassigned
=
Objects
.
equals
(
dataBO
.
getClerkId
(),
"-1"
);
ClerkDTO
clerkDTO
=
clerkMap
.
get
(
dataBO
.
getClerkId
());
Integer
noConnPotCusNum
=
getNoConnPotCusNum
(
potentialResponse
.
getResult
(),
dataBO
.
getEnterpriseId
(),
dataBO
.
getStoreId
(),
clerkDTO
,
unassigned
);
Integer
noConnPotCusNum
=
getNoConnPotCusNum
(
result
,
dataBO
.
getEnterpriseId
(),
dataBO
.
getStoreId
(),
clerkDTO
,
bizType
,
unassigned
);
log
.
info
(
"clerkId:{},noConnPotCusNum:{}"
,
dataBO
.
getClerkId
(),
noConnPotCusNum
);
dataBO
.
setNoConnPotCusNum
(
noConnPotCusNum
);
}
...
...
@@ -148,6 +155,7 @@ public class ContactAdaptor {
temp
.
setObject
(
"store_id"
,
item
.
getStoreId
());
temp
.
setObject
(
"clerk_id"
,
item
.
getClerkId
());
temp
.
setObject
(
"no_conn_pot_cus_num"
,
item
.
getNoConnPotCusNum
());
temp
.
setObject
(
"biz_type"
,
bizType
);
// 时间戳格式不行
temp
.
setObject
(
"create_time"
,
DateUtil
.
dateToStr
(
new
Date
(),
"yyyy-MM-dd HH:mm:ss"
));
return
temp
;
...
...
@@ -160,7 +168,7 @@ public class ContactAdaptor {
}
}
public
Integer
getNoConnPotCusNum
(
PlatformPotentialCustomerOutDTO
result
,
String
enterpriseId
,
String
storeId
,
ClerkDTO
clerkDTO
,
boolean
unassigned
)
{
public
Integer
getNoConnPotCusNum
(
PlatformPotentialCustomerOutDTO
result
,
String
enterpriseId
,
String
storeId
,
ClerkDTO
clerkDTO
,
Integer
bizType
,
boolean
unassigned
)
{
if
(
StringUtils
.
isBlank
(
storeId
)
&&
clerkDTO
==
null
)
{
return
0
;
}
...
...
@@ -176,14 +184,22 @@ public class ContactAdaptor {
}
}
ContactParamDTO
contact
=
new
ContactParamDTO
();
contact
.
setRuleJSON
(
JSON
.
toJSONString
(
result
));
if
(
result
!=
null
)
{
contact
.
setRuleJSON
(
JSON
.
toJSONString
(
result
));
}
contact
.
setContactType
(
0
);
contact
.
setBizType
(
bizType
);
params
.
setStoreId
(
storeId
);
params
.
setClerkId
(
clerkId
);
params
.
setClerkType
(
clerkTypeStr
);
params
.
setEnterpriseId
(
enterpriseId
);
params
.
setContactParamDTO
(
contact
);
MemberInfoListParamsDTO
memberInfoListParamsDTO
=
new
MemberInfoListParamsDTO
();
if
(
Objects
.
equals
(
bizType
,
ContactBizTypeEnum
.
OPPORTUNITY_CUSTOMER
.
getType
()))
{
memberInfoListParamsDTO
.
setCrowdClerkId
(
clerkId
);
memberInfoListParamsDTO
.
setCrowdType
(-
1
);
memberInfoListParamsDTO
.
setMemberType
(
4
);
}
// 查询无归属数据
if
(
unassigned
)
{
FilterListDTO
filterListDTO
=
new
FilterListDTO
();
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/HaobanTimerApiServiceImpl.java
View file @
38711a29
...
...
@@ -2,7 +2,9 @@ package com.gic.haoban.manage.service.service.out.impl;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.enterprise.api.constant.EnterpriseServiceEnum
;
import
com.gic.haoban.manage.api.dto.CommonDataMQDTO
;
import
com.gic.haoban.manage.api.enums.contact.ContactBizTypeEnum
;
import
com.gic.haoban.manage.api.service.HaobanCommonMQApiService
;
import
com.gic.haoban.manage.api.service.HaobanTimerApiService
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanExternalClerkRelatedMapper
;
...
...
@@ -212,6 +214,7 @@ public class HaobanTimerApiServiceImpl implements HaobanTimerApiService {
@Override
public
void
contactDataTimer
(
String
params
)
{
contactAdaptor
.
contactDataTimer
();
contactAdaptor
.
contactDataTimer
(
ContactBizTypeEnum
.
POTENTIAL_CUSTOMER
.
getType
(),
EnterpriseServiceEnum
.
POTENTIAL
.
getRightMenuCode
());
contactAdaptor
.
contactDataTimer
(
ContactBizTypeEnum
.
OPPORTUNITY_CUSTOMER
.
getType
(),
EnterpriseServiceEnum
.
OBJECTIVES
.
getRightMenuCode
());
}
}
王祖波
@wangzubo
mentioned in commit
3db9a5e6
Jun 13, 2025
mentioned in commit
3db9a5e6
mentioned in commit 3db9a5e6b19f819318452b959fec7eebf1990947
Toggle commit list
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