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
2f3b78c7
Commit
2f3b78c7
authored
Apr 10, 2025
by
王祖波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实时获取当前未建联数
parent
ba88fada
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
2 deletions
+51
-2
dubbo-haoban-manage-service.xml
...ervice/src/main/resources/dubbo-haoban-manage-service.xml
+1
-0
PotentialDataController.java
...age/web/controller/potential/PotentialDataController.java
+50
-2
No files found.
haoban-manage3-service/src/main/resources/dubbo-haoban-manage-service.xml
View file @
2f3b78c7
...
...
@@ -236,6 +236,7 @@
<dubbo:reference
interface=
"com.gic.store.goods.service.GoodsInfoOutApiService"
id=
"goodsInfoOutApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
interface=
"com.gic.store.goods.service.GoodsCenterApiService"
id=
"goodsCenterApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
interface=
"com.gic.store.goods.service.StoreGoodsService"
id=
"storeGoodsService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
interface=
"com.gic.store.goods.service.potential.PlatformPotentialCustomerApiService"
id=
"platformPotentialCustomerApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
interface=
"com.gic.business.order.service.ordermanage.OrderInfoOutApiService"
id=
"orderInfoOutApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
interface=
"com.gic.orderecommerce.api.service.EcommerceOrderOutputApiService"
id=
"ecommerceOrderOutputApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
interface=
"com.gic.order.api.service.sharding.OrderApiService"
id=
"orderApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/potential/PotentialDataController.java
View file @
2f3b78c7
...
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.web.controller.potential;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.lang.Pair
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
...
...
@@ -9,6 +10,11 @@ import com.gic.clerk.api.dto.ClerkDTO;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.haoban.app.customer.dto.CustomerDTO
;
import
com.gic.haoban.app.customer.dto.MemberInfoListParamsDTO
;
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.manage.api.dto.contact.ContactOrderDetailDTO
;
import
com.gic.haoban.manage.api.qdto.contact.ContactOrderSearchQDTO
;
import
com.gic.haoban.manage.api.service.contact.ContactOrderApiService
;
...
...
@@ -19,6 +25,8 @@ import com.gic.haoban.manage.web.qo.potential.*;
import
com.gic.haoban.manage.web.utils.EsMemberInfoUtils
;
import
com.gic.haoban.manage.web.utils.storestatusfilter.StoreStatusFilterUtils
;
import
com.gic.haoban.manage.web.vo.potential.*
;
import
com.gic.store.goods.dto.potential.PlatformPotentialCustomerOutDTO
;
import
com.gic.store.goods.service.potential.PlatformPotentialCustomerApiService
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Sets
;
import
org.apache.commons.collections.CollectionUtils
;
...
...
@@ -48,6 +56,10 @@ public class PotentialDataController {
private
PotentialDataAdaptor
potentialDataAdaptor
;
@Autowired
private
EsMemberInfoUtils
esMemberInfoUtils
;
@Autowired
private
PlatformPotentialCustomerApiService
platformPotentialCustomerApiService
;
@Autowired
private
CustomerApiService
customerService
;
/**
* 分页查询转化记录
...
...
@@ -165,6 +177,12 @@ public class PotentialDataController {
*/
@RequestMapping
(
path
=
"/potential/contact-detail"
)
public
RestResponse
<
Page
<
PotentialContactDetailOverviewVO
>>
queryPotentialContactReport
(
@RequestBody
PotentialContactOverviewQO
potentialOverviewQO
)
{
String
enterpriseId
=
potentialOverviewQO
.
getEnterpriseId
();
String
wxEnterpriseId
=
potentialOverviewQO
.
getWxEnterpriseId
();
ServiceResponse
<
PlatformPotentialCustomerOutDTO
>
potentialResponse
=
platformPotentialCustomerApiService
.
getPotentialCustomerOutRule
(
enterpriseId
);
if
(!
potentialResponse
.
isSuccess
()
||
potentialResponse
.
getResult
()
==
null
)
{
return
RestResponse
.
successResult
(
new
Page
<>());
}
List
<
String
>
storeIds
=
getStoreIds
(
potentialOverviewQO
).
getValue
();
Page
<
PotentialContactOverviewVO
>
page
=
potentialDataAdaptor
.
pagePotentialContactOverview
(
potentialOverviewQO
,
storeIds
);
List
<
PotentialContactOverviewVO
>
result
=
page
.
getResult
();
...
...
@@ -174,8 +192,13 @@ public class PotentialDataController {
Map
<
String
,
ClerkDTO
>
clerkMap
=
pair
.
getKey
();
Map
<
String
,
StoreDTO
>
storeMap
=
pair
.
getValue
();
list
=
result
.
stream
().
map
(
x
->
{
ClerkDTO
clerkDTO
=
clerkMap
.
getOrDefault
(
x
.
getClerkId
(),
new
ClerkDTO
());
StoreDTO
storeDTO
=
storeMap
.
getOrDefault
(
x
.
getStoreId
(),
new
StoreDTO
());
ClerkDTO
clerkDTO
=
clerkMap
.
get
(
x
.
getClerkId
());
StoreDTO
storeDTO
=
storeMap
.
get
(
x
.
getStoreId
());
// 实时获取当前未建联数 todo
Integer
potCusNum
=
getPotCusNum
(
potentialResponse
,
enterpriseId
,
wxEnterpriseId
,
storeDTO
.
getStoreId
(),
clerkDTO
);
x
.
setPotCusNum
(
potCusNum
);
PotentialContactDetailOverviewVO
overviewVO
=
new
PotentialContactDetailOverviewVO
();
overviewVO
.
setContact
(
x
);
overviewVO
.
setStore
(
storeDTO
);
...
...
@@ -192,6 +215,31 @@ public class PotentialDataController {
return
RestResponse
.
successResult
(
res
);
}
private
Integer
getPotCusNum
(
ServiceResponse
<
PlatformPotentialCustomerOutDTO
>
potentialResponse
,
String
enterpriseId
,
String
wxEnterpriseId
,
String
storeId
,
ClerkDTO
clerkDTO
)
{
if
(
StringUtils
.
isBlank
(
storeId
)
&&
clerkDTO
==
null
)
{
return
0
;
}
CustomerDTO
params
=
new
CustomerDTO
();
String
clerkId
=
null
;
if
(
clerkDTO
!=
null
)
{
clerkId
=
clerkDTO
.
getClerkId
();
Integer
clerkType
=
clerkDTO
.
getClerkType
();
if
(
clerkType
==
0
||
clerkType
==
1
)
{
storeId
=
clerkDTO
.
getStoreId
();
}
}
ContactParamDTO
contact
=
new
ContactParamDTO
();
contact
.
setRuleJSON
(
JSON
.
toJSONString
(
potentialResponse
.
getResult
()));
contact
.
setContactType
(
0
);
params
.
setStoreId
(
storeId
);
params
.
setClerkId
(
clerkId
);
params
.
setEnterpriseId
(
enterpriseId
);
params
.
setWxEnterpriseId
(
wxEnterpriseId
);
params
.
setContactParamDTO
(
contact
);
ServiceResponse
<
ContactSumDTO
>
noContactResponse
=
customerService
.
contactMemberSum
(
new
com
.
gic
.
haoban
.
base
.
api
.
common
.
BasePageInfo
(),
params
,
new
MemberInfoListParamsDTO
());
return
noContactResponse
.
getResult
()
!=
null
?
noContactResponse
.
getResult
().
getTotalCount
()
:
0
;
}
/**
* 转化明细概览 周/月报
*
...
...
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