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
ee7ec136
Commit
ee7ec136
authored
Apr 14, 2025
by
王祖波
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-recommend' into developer
parents
bb9c8cad
721f3a05
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
285 additions
and
5 deletions
+285
-5
HaobanTimerApiService.java
.../gic/haoban/manage/api/service/HaobanTimerApiService.java
+6
-0
RouterApiService.java
...ic/haoban/manage/api/service/common/RouterApiService.java
+6
-0
ContactDataBO.java
.../haoban/manage/service/pojo/bo/contact/ContactDataBO.java
+31
-0
ContactOrderServiceImpl.java
...service/service/contact/impl/ContactOrderServiceImpl.java
+4
-0
HaobanTimerApiServiceImpl.java
...e/service/service/out/impl/HaobanTimerApiServiceImpl.java
+60
-0
RouterApiServiceImpl.java
...service/service/out/impl/common/RouterApiServiceImpl.java
+128
-0
WxEnterpriseInfoController.java
...ban/manage/web/controller/WxEnterpriseInfoController.java
+1
-1
PotentialDataController.java
...age/web/controller/potential/PotentialDataController.java
+49
-4
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/HaobanTimerApiService.java
View file @
ee7ec136
...
...
@@ -151,4 +151,10 @@ public interface HaobanTimerApiService {
* @param params
*/
void
cancelSendTimer
(
String
params
)
;
/**
* 建联刷新数据定时任务
* @param params
*/
void
contactDataTimer
(
String
params
);
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/common/RouterApiService.java
View file @
ee7ec136
...
...
@@ -15,4 +15,10 @@ public interface RouterApiService {
*/
ServiceResponse
<
Void
>
memberClerkEvent
(
String
params
);
/**
* 建联数据刷新
* @return
*/
ServiceResponse
<
Void
>
contactDataRefreshMQ
(
String
param
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/bo/contact/ContactDataBO.java
0 → 100644
View file @
ee7ec136
package
com
.
gic
.
haoban
.
manage
.
service
.
pojo
.
bo
.
contact
;
import
lombok.Data
;
/**
* Created by wangzubo on 2025/4/14.
*/
@Data
public
class
ContactDataBO
{
/**
* 企业id
*/
private
String
enterpriseId
;
/**
* 导购id
*/
private
String
clerkId
;
/**
* 门店id
*/
private
String
storeId
;
/**
* 未建联数
*/
private
Integer
noConnPotCusNum
=
0
;
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/contact/impl/ContactOrderServiceImpl.java
View file @
ee7ec136
...
...
@@ -65,6 +65,10 @@ public class ContactOrderServiceImpl implements ContactOrderService {
logger
.
info
(
"订单已处理,订单id:{}"
,
orderInfoResp
.
getOrderId
());
return
false
;
}
if
(
orderInfoResp
.
getOrderStatus
()
==
null
||
orderInfoResp
.
getOrderStatus
()
!=
1
)
{
logger
.
info
(
"订单不是销售单"
);
return
false
;
}
logger
.
info
(
"建联处理订单:{}"
,
orderInfoResp
.
getOrderId
());
Date
receiptsDate
=
orderInfoResp
.
getReceiptsDate
();
Date
contactBeginTime
=
null
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/HaobanTimerApiServiceImpl.java
View file @
ee7ec136
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.clerk.api.dto.ClerkListDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.enterprise.api.constant.EnterpriseServiceEnum
;
import
com.gic.enterprise.api.dto.enterprise.EnterpriseUsingStatusDTO
;
import
com.gic.enterprise.api.service.EnterpriseUseForbidService
;
import
com.gic.haoban.manage.api.dto.CommonDataMQDTO
;
import
com.gic.haoban.manage.api.service.HaobanCommonMQApiService
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanExternalClerkRelatedMapper
;
import
com.gic.haoban.manage.service.dao.mapper.hm.WxUserAddLogMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanExternalClerkRelated
;
import
com.gic.haoban.manage.service.entity.hm.TabWxUserAddLog
;
import
com.gic.haoban.manage.service.pojo.bo.contact.ContactDataBO
;
import
com.gic.haoban.manage.service.service.*
;
import
com.gic.haoban.manage.service.service.chat.*
;
import
com.gic.haoban.manage.service.util.DingUtils
;
...
...
@@ -57,6 +65,10 @@ public class HaobanTimerApiServiceImpl implements HaobanTimerApiService {
private
GroupChatActivityService
groupChatActivityService
;
@Autowired
private
GroupChatPlanService
groupChatPlanService
;
@Autowired
private
EnterpriseUseForbidService
enterpriseUseForbidService
;
@Autowired
private
ClerkService
clerkService
;
@Override
...
...
@@ -204,4 +216,52 @@ public class HaobanTimerApiServiceImpl implements HaobanTimerApiService {
public
void
cancelSendTimer
(
String
params
)
{
this
.
groupChatPlanService
.
cancelSendTimer
(
params
)
;
}
@Override
public
void
contactDataTimer
(
String
params
)
{
// 处理潜客相关企业ID
ServiceResponse
<
List
<
EnterpriseUsingStatusDTO
>>
serviceResponse
=
enterpriseUseForbidService
.
getUseEnterpriseByCode
(
EnterpriseServiceEnum
.
POTENTIAL
.
getRightMenuCode
(),
null
);
List
<
ContactDataBO
>
list
=
new
ArrayList
<>();
List
<
String
>
eidList
=
Optional
.
ofNullable
(
serviceResponse
.
getResult
()).
orElse
(
Collections
.
emptyList
())
.
stream
()
.
filter
(
item
->
Boolean
.
TRUE
.
equals
(
item
.
getVaild
()))
.
map
(
EnterpriseUsingStatusDTO:
:
getEnterpriseId
).
collect
(
Collectors
.
toList
());
ContactDataBO
contactDataBO
=
null
;
for
(
String
eid
:
eidList
)
{
log
.
info
(
"开始处理潜客数据eid:{}"
,
eid
);
Set
<
String
>
storeIdSet
=
new
HashSet
<>();
List
<
ClerkListDTO
>
enterpriseClerk
=
clerkService
.
getEnterpriseClerk
(
eid
);
if
(
CollectionUtils
.
isEmpty
(
enterpriseClerk
))
{
continue
;
}
log
.
info
(
"潜客数据导购数:{}"
,
enterpriseClerk
.
size
());
for
(
int
i
=
0
;
i
<
enterpriseClerk
.
size
();
i
++)
{
ClerkListDTO
clerk
=
enterpriseClerk
.
get
(
i
);
// 无归属导购数据
if
(
storeIdSet
.
add
(
clerk
.
getStoreId
()))
{
contactDataBO
=
new
ContactDataBO
();
contactDataBO
.
setEnterpriseId
(
clerk
.
getEnterpriseId
());
contactDataBO
.
setClerkId
(
"-1"
);
contactDataBO
.
setStoreId
(
clerk
.
getStoreId
());
list
.
add
(
contactDataBO
);
}
contactDataBO
=
new
ContactDataBO
();
contactDataBO
.
setEnterpriseId
(
clerk
.
getEnterpriseId
());
contactDataBO
.
setClerkId
(
clerk
.
getClerkId
());
contactDataBO
.
setStoreId
(
clerk
.
getStoreId
());
list
.
add
(
contactDataBO
);
if
(
list
.
size
()
>=
100
||
i
==
enterpriseClerk
.
size
()
-
1
)
{
try
{
String
jsonString
=
JSON
.
toJSONString
(
list
);
GICMQClientUtil
.
getClientInstance
().
sendMessage
(
"contactDataRefreshMQ"
,
jsonString
);
jsonString
=
null
;
}
catch
(
Exception
e
)
{
log
.
error
(
"发送MQ异常:"
,
e
);
}
list
.
clear
();
}
}
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/common/RouterApiServiceImpl.java
View file @
ee7ec136
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
.
common
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.PropertyNamingStrategy
;
import
com.alibaba.fastjson.serializer.SerializeConfig
;
import
com.alibaba.hologres.client.HoloClient
;
import
com.alibaba.hologres.client.Put
;
import
com.alibaba.hologres.client.model.TableSchema
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
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.ChildDTO
;
import
com.gic.haoban.app.customer.dto.CustomerDTO
;
import
com.gic.haoban.app.customer.dto.FilterListDTO
;
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.common.utils.DateUtil
;
import
com.gic.haoban.manage.api.service.common.RouterApiService
;
import
com.gic.haoban.manage.service.dao.mapper.content.holo.HoloDataSource
;
import
com.gic.haoban.manage.service.pojo.bo.contact.ContactDataBO
;
import
com.gic.haoban.manage.service.service.contact.ContactLogService
;
import
com.gic.member.api.dto.event.clerk.ClerkAddEventParam
;
import
com.gic.store.goods.dto.potential.PlatformPotentialCustomerOutDTO
;
import
com.gic.store.goods.service.potential.PlatformPotentialCustomerApiService
;
import
com.google.common.collect.Lists
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
@Service
(
"routerApiService"
)
public
class
RouterApiServiceImpl
implements
RouterApiService
{
...
...
@@ -21,6 +50,14 @@ public class RouterApiServiceImpl implements RouterApiService {
@Autowired
private
ContactLogService
contactLogService
;
@Autowired
private
PlatformPotentialCustomerApiService
platformPotentialCustomerApiService
;
@Autowired
private
ClerkService
clerkService
;
@Autowired
private
CustomerApiService
customerService
;
@Autowired
private
HoloDataSource
holoDataSource
;
@Override
public
ServiceResponse
<
Void
>
memberClerkEvent
(
String
params
)
{
...
...
@@ -36,4 +73,95 @@ public class RouterApiServiceImpl implements RouterApiService {
}
return
ServiceResponse
.
success
();
}
@Override
public
ServiceResponse
<
Void
>
contactDataRefreshMQ
(
String
param
)
{
if
(
StringUtils
.
isBlank
(
param
))
{
return
ServiceResponse
.
success
();
}
List
<
ContactDataBO
>
list
=
JSONObject
.
parseArray
(
param
,
ContactDataBO
.
class
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
ServiceResponse
.
success
();
}
ContactDataBO
contactDataBO
=
list
.
get
(
0
);
String
enterpriseId
=
contactDataBO
.
getEnterpriseId
();
ServiceResponse
<
PlatformPotentialCustomerOutDTO
>
potentialResponse
=
platformPotentialCustomerApiService
.
getPotentialCustomerOutRule
(
enterpriseId
);
if
(!
potentialResponse
.
isSuccess
()
||
potentialResponse
.
getResult
()
==
null
)
{
return
ServiceResponse
.
success
();
}
for
(
ContactDataBO
dataBO
:
list
)
{
boolean
unassigned
=
Objects
.
equals
(
dataBO
.
getClerkId
(),
"-1"
);
Integer
noConnPotCusNum
=
getNoConnPotCusNum
(
potentialResponse
.
getResult
(),
dataBO
.
getEnterpriseId
(),
dataBO
.
getStoreId
(),
dataBO
.
getClerkId
(),
unassigned
);
dataBO
.
setNoConnPotCusNum
(
noConnPotCusNum
);
}
try
{
HoloClient
client
=
holoDataSource
.
getClient
();
if
(
client
==
null
)
{
logger
.
error
(
"数仓数据源链接异常, 请检查!!!!{}"
,
param
);
return
ServiceResponse
.
success
();
}
TableSchema
tableSchema
=
client
.
getTableSchema
(
"ads_gic_mbr_no_conn_mbr_1d"
);
SerializeConfig
serializeConfig
=
new
SerializeConfig
();
serializeConfig
.
setPropertyNamingStrategy
(
PropertyNamingStrategy
.
SnakeCase
);
List
<
Put
>
puts
=
list
.
stream
()
.
map
(
item
->
{
Put
temp
=
new
Put
(
tableSchema
);
temp
.
setObject
(
"ent_id"
,
item
.
getEnterpriseId
());
temp
.
setObject
(
"store_id"
,
item
.
getStoreId
());
temp
.
setObject
(
"clerk_id"
,
item
.
getClerkId
());
temp
.
setObject
(
"no_conn_pot_cus_num"
,
item
.
getNoConnPotCusNum
());
// 时间戳格式不行
temp
.
setObject
(
"create_time"
,
DateUtil
.
dateToStr
(
new
Date
(),
"yyyy-MM-dd HH:mm:ss"
));
return
temp
;
})
.
collect
(
Collectors
.
toList
());
client
.
put
(
puts
);
logger
.
info
(
"写数据组完成"
);
}
catch
(
Exception
ex
)
{
logger
.
info
(
"数据组写入异常 {}"
,
param
,
ex
);
}
return
ServiceResponse
.
success
();
}
private
Integer
getNoConnPotCusNum
(
PlatformPotentialCustomerOutDTO
result
,
String
enterpriseId
,
String
storeId
,
String
clerkId
,
boolean
unassigned
)
{
if
(
StringUtils
.
isBlank
(
storeId
)
&&
StringUtils
.
isBlank
(
clerkId
))
{
return
0
;
}
ClerkDTO
clerkDTO
=
null
;
if
(
StringUtils
.
isNotBlank
(
clerkId
))
{
clerkDTO
=
clerkService
.
getClerkByClerkId
(
clerkId
);
}
String
clerkTypeStr
=
"1"
;
CustomerDTO
params
=
new
CustomerDTO
();
if
(
clerkDTO
!=
null
)
{
clerkTypeStr
=
"0"
;
clerkId
=
clerkDTO
.
getClerkId
();
Integer
clerkType
=
clerkDTO
.
getClerkType
();
if
(
clerkType
==
0
||
clerkType
==
1
)
{
storeId
=
clerkDTO
.
getStoreId
();
}
}
ContactParamDTO
contact
=
new
ContactParamDTO
();
contact
.
setRuleJSON
(
JSON
.
toJSONString
(
result
));
contact
.
setContactType
(
0
);
params
.
setStoreId
(
storeId
);
params
.
setClerkId
(
clerkId
);
params
.
setClerkType
(
clerkTypeStr
);
params
.
setEnterpriseId
(
enterpriseId
);
params
.
setContactParamDTO
(
contact
);
MemberInfoListParamsDTO
memberInfoListParamsDTO
=
new
MemberInfoListParamsDTO
();
// 查询无归属数据
if
(
unassigned
)
{
FilterListDTO
filterListDTO
=
new
FilterListDTO
();
filterListDTO
.
setFilterType
(
"1"
);
ChildDTO
child
=
new
ChildDTO
();
child
.
setId
(
"-1"
);
filterListDTO
.
setChild
(
child
);
memberInfoListParamsDTO
.
setFilterList
(
Lists
.
newArrayList
(
filterListDTO
));
}
ServiceResponse
<
ContactSumDTO
>
noContactResponse
=
customerService
.
contactMemberSum
(
new
com
.
gic
.
haoban
.
base
.
api
.
common
.
BasePageInfo
(),
params
,
memberInfoListParamsDTO
);
return
noContactResponse
.
getResult
()
!=
null
?
noContactResponse
.
getResult
().
getTotalCount
()
:
0
;
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/WxEnterpriseInfoController.java
View file @
ee7ec136
...
...
@@ -796,7 +796,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
*/
@RequestMapping
(
path
=
"/enterprise/use-permission"
)
public
RestResponse
<
List
<
EnterpriseUsingPermissionVO
>>
selectUsingEnterprisePermission
(
String
enterpriseId
)
{
if
(
StringUtils
.
isBlank
(
enterpriseId
))
{
if
(
StringUtils
.
isBlank
(
enterpriseId
)
||
Objects
.
equals
(
enterpriseId
,
"-1"
)
)
{
return
RestResponse
.
failure
(
"-701"
,
"参数缺失"
);
}
List
<
EnterpriseUsingPermissionDto
>
list
=
enterpriseUseForbidService
.
selectEnterprisePermissionByEnterpriseId
(
enterpriseId
);
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/potential/PotentialDataController.java
View file @
ee7ec136
...
...
@@ -10,7 +10,9 @@ 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.ChildDTO
;
import
com.gic.haoban.app.customer.dto.CustomerDTO
;
import
com.gic.haoban.app.customer.dto.FilterListDTO
;
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
;
...
...
@@ -68,6 +70,9 @@ public class PotentialDataController {
*/
@RequestMapping
(
path
=
"/contact/page-order"
)
public
RestResponse
<
Page
<
ContactOrderDetailDTO
>>
pageOrder
(
@RequestBody
ContactOrderPageQO
contactOrderPageQO
)
{
if
(
StringUtils
.
isBlank
(
contactOrderPageQO
.
getEnterpriseId
())
||
Objects
.
equals
(
contactOrderPageQO
.
getEnterpriseId
(),
"-1"
))
{
return
RestResponse
.
successResult
(
new
Page
<>());
}
String
enterpriseId
=
contactOrderPageQO
.
getEnterpriseId
();
String
clerkId
=
contactOrderPageQO
.
getClerkId
();
String
storeId
=
contactOrderPageQO
.
getStoreId
();
...
...
@@ -112,6 +117,9 @@ public class PotentialDataController {
*/
@RequestMapping
(
path
=
"/potential/overview"
)
public
RestResponse
<
PotentialOverviewVO
>
queryPotentialOverviewReport
(
@RequestBody
PotentialBusiOverviewQO
potentialOverviewQO
)
{
if
(
StringUtils
.
isBlank
(
potentialOverviewQO
.
getEnterpriseId
())
||
Objects
.
equals
(
potentialOverviewQO
.
getEnterpriseId
(),
"-1"
))
{
return
RestResponse
.
failure
(
"-1"
,
"参数缺失"
);
}
String
clerkId
=
potentialOverviewQO
.
getClerkId
();
Pair
<
Integer
,
List
<
String
>>
pair
=
getStoreIds
(
potentialOverviewQO
);
Integer
clerkType
=
pair
.
getKey
();
...
...
@@ -161,6 +169,9 @@ public class PotentialDataController {
*/
@RequestMapping
(
path
=
"/potential/conv-member"
)
public
RestResponse
<
Page
<
PotentialMemberConvVO
>>
queryPotentialConvMember
(
@RequestBody
PotentialConvMemberQO
potentialOverviewQO
)
{
if
(
StringUtils
.
isBlank
(
potentialOverviewQO
.
getEnterpriseId
())
||
Objects
.
equals
(
potentialOverviewQO
.
getEnterpriseId
(),
"-1"
))
{
return
RestResponse
.
failure
(
"-1"
,
"参数缺失"
);
}
List
<
String
>
storeIds
=
getStoreIds
(
potentialOverviewQO
).
getValue
();
Page
<
PotentialMemberConvVO
>
page
=
potentialDataAdaptor
.
pagePotentialConvMember
(
potentialOverviewQO
,
storeIds
);
List
<
PotentialMemberConvVO
>
result
=
page
.
getResult
();
...
...
@@ -177,6 +188,9 @@ public class PotentialDataController {
*/
@RequestMapping
(
path
=
"/potential/contact-detail"
)
public
RestResponse
<
Page
<
PotentialContactDetailOverviewVO
>>
queryPotentialContactReport
(
@RequestBody
PotentialContactOverviewQO
potentialOverviewQO
)
{
if
(
StringUtils
.
isBlank
(
potentialOverviewQO
.
getEnterpriseId
())
||
Objects
.
equals
(
potentialOverviewQO
.
getEnterpriseId
(),
"-1"
))
{
return
RestResponse
.
failure
(
"-1"
,
"参数缺失"
);
}
String
enterpriseId
=
potentialOverviewQO
.
getEnterpriseId
();
String
wxEnterpriseId
=
potentialOverviewQO
.
getWxEnterpriseId
();
ServiceResponse
<
PlatformPotentialCustomerOutDTO
>
potentialResponse
=
platformPotentialCustomerApiService
.
getPotentialCustomerOutRule
(
enterpriseId
);
...
...
@@ -202,8 +216,10 @@ public class PotentialDataController {
ClerkDTO
clerkDTO
=
clerkMap
.
get
(
x
.
getClerkId
());
StoreDTO
storeDTO
=
storeMap
.
get
(
x
.
getStoreId
());
if
(!
weekMonth
)
{
// 实时获取当前未建联数 todo
Integer
noConnPotCusNum
=
getNoConnPotCusNum
(
potentialResponse
,
enterpriseId
,
wxEnterpriseId
,
storeDTO
,
clerkDTO
);
// 无归属导购
boolean
unassigned
=
Objects
.
equals
(
x
.
getClerkId
(),
"-1"
);
// 实时获取当前未建联数
Integer
noConnPotCusNum
=
getNoConnPotCusNum
(
potentialResponse
,
enterpriseId
,
wxEnterpriseId
,
storeDTO
,
clerkDTO
,
unassigned
);
x
.
setNoConnPotCusNum
(
noConnPotCusNum
);
}
PotentialContactDetailOverviewVO
overviewVO
=
new
PotentialContactDetailOverviewVO
();
...
...
@@ -222,7 +238,7 @@ public class PotentialDataController {
return
RestResponse
.
successResult
(
res
);
}
private
Integer
getNoConnPotCusNum
(
ServiceResponse
<
PlatformPotentialCustomerOutDTO
>
potentialResponse
,
String
enterpriseId
,
String
wxEnterpriseId
,
StoreDTO
storeDTO
,
ClerkDTO
clerkDTO
)
{
private
Integer
getNoConnPotCusNum
(
ServiceResponse
<
PlatformPotentialCustomerOutDTO
>
potentialResponse
,
String
enterpriseId
,
String
wxEnterpriseId
,
StoreDTO
storeDTO
,
ClerkDTO
clerkDTO
,
boolean
unassigned
)
{
if
(
storeDTO
==
null
&&
clerkDTO
==
null
)
{
return
0
;
}
...
...
@@ -250,10 +266,21 @@ public class PotentialDataController {
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
());
MemberInfoListParamsDTO
memberInfoListParamsDTO
=
new
MemberInfoListParamsDTO
();
// 查询无归属数据
if
(
unassigned
)
{
FilterListDTO
filterListDTO
=
new
FilterListDTO
();
filterListDTO
.
setFilterType
(
"1"
);
ChildDTO
child
=
new
ChildDTO
();
child
.
setId
(
"-1"
);
filterListDTO
.
setChild
(
child
);
memberInfoListParamsDTO
.
setFilterList
(
Lists
.
newArrayList
(
filterListDTO
));
}
ServiceResponse
<
ContactSumDTO
>
noContactResponse
=
customerService
.
contactMemberSum
(
new
com
.
gic
.
haoban
.
base
.
api
.
common
.
BasePageInfo
(),
params
,
memberInfoListParamsDTO
);
return
noContactResponse
.
getResult
()
!=
null
?
noContactResponse
.
getResult
().
getTotalCount
()
:
0
;
}
/**
* 转化明细概览 周/月报
*
...
...
@@ -261,6 +288,9 @@ public class PotentialDataController {
*/
@RequestMapping
(
path
=
"/potential/conv-detail"
)
public
RestResponse
<
Page
<
PotentialConvDetailOverviewVO
>>
queryPotentialConvReport
(
@RequestBody
PotentialConvOverviewQO
potentialOverviewQO
)
{
if
(
StringUtils
.
isBlank
(
potentialOverviewQO
.
getEnterpriseId
())
||
Objects
.
equals
(
potentialOverviewQO
.
getEnterpriseId
(),
"-1"
))
{
return
RestResponse
.
failure
(
"-1"
,
"参数缺失"
);
}
List
<
String
>
storeIds
=
getStoreIds
(
potentialOverviewQO
).
getValue
();
Page
<
PotentialConvOverviewVO
>
page
=
potentialDataAdaptor
.
pagePotentialConvOverview
(
potentialOverviewQO
,
storeIds
);
List
<
PotentialConvOverviewVO
>
result
=
page
.
getResult
();
...
...
@@ -295,6 +325,9 @@ public class PotentialDataController {
*/
@RequestMapping
(
path
=
"/recommend/overview"
)
public
RestResponse
<
RecommendOverviewVO
>
queryRecommendOverviewReport
(
@RequestBody
RecommendBusiOverviewQO
potentialOverviewQO
)
{
if
(
StringUtils
.
isBlank
(
potentialOverviewQO
.
getEnterpriseId
())
||
Objects
.
equals
(
potentialOverviewQO
.
getEnterpriseId
(),
"-1"
))
{
return
RestResponse
.
failure
(
"-1"
,
"参数缺失"
);
}
List
<
String
>
storeIds
=
getStoreIds
(
potentialOverviewQO
).
getValue
();
// 使用数据
RecommendUsedOverviewVO
usedOverviewVO
=
null
;
...
...
@@ -323,6 +356,9 @@ public class PotentialDataController {
*/
@RequestMapping
(
path
=
"/recommend/used-detail"
)
public
RestResponse
<
Page
<
RecommendUsedDetailOverviewVO
>>
queryRecommendUsedReport
(
@RequestBody
RecommendUsedOverviewQO
potentialOverviewQO
)
{
if
(
StringUtils
.
isBlank
(
potentialOverviewQO
.
getEnterpriseId
())
||
Objects
.
equals
(
potentialOverviewQO
.
getEnterpriseId
(),
"-1"
))
{
return
RestResponse
.
failure
(
"-1"
,
"参数缺失"
);
}
List
<
String
>
storeIds
=
getStoreIds
(
potentialOverviewQO
).
getValue
();
Page
<
RecommendUsedOverviewVO
>
page
=
potentialDataAdaptor
.
pageRecommendUsedOverview
(
potentialOverviewQO
,
storeIds
);
List
<
RecommendUsedOverviewVO
>
result
=
page
.
getResult
();
...
...
@@ -357,6 +393,9 @@ public class PotentialDataController {
*/
@RequestMapping
(
path
=
"/recommend/conv-detail"
)
public
RestResponse
<
Page
<
RecommendConvDetailOverviewVO
>>
queryRecommendConvReport
(
@RequestBody
RecommendConvOverviewQO
potentialOverviewQO
)
{
if
(
StringUtils
.
isBlank
(
potentialOverviewQO
.
getEnterpriseId
())
||
Objects
.
equals
(
potentialOverviewQO
.
getEnterpriseId
(),
"-1"
))
{
return
RestResponse
.
failure
(
"-1"
,
"参数缺失"
);
}
List
<
String
>
storeIds
=
getStoreIds
(
potentialOverviewQO
).
getValue
();
Page
<
RecommendConvOverviewVO
>
page
=
potentialDataAdaptor
.
pageRecommendConvOverview
(
potentialOverviewQO
,
storeIds
);
List
<
RecommendConvOverviewVO
>
result
=
page
.
getResult
();
...
...
@@ -391,6 +430,9 @@ public class PotentialDataController {
*/
@RequestMapping
(
path
=
"/recommend/used-trend"
)
public
RestResponse
<
Page
<
RecommendUsedTrendVO
>>
queryRecommendUsedTrend
(
@RequestBody
RecommendUsedTrendQO
potentialOverviewQO
)
{
if
(
StringUtils
.
isBlank
(
potentialOverviewQO
.
getEnterpriseId
())
||
Objects
.
equals
(
potentialOverviewQO
.
getEnterpriseId
(),
"-1"
))
{
return
RestResponse
.
failure
(
"-1"
,
"参数缺失"
);
}
List
<
String
>
storeIds
=
getStoreIds
(
potentialOverviewQO
).
getValue
();
Page
<
RecommendUsedTrendVO
>
page
=
potentialDataAdaptor
.
pageRecommendUsedTrend
(
potentialOverviewQO
,
storeIds
);
return
RestResponse
.
successResult
(
page
);
...
...
@@ -403,6 +445,9 @@ public class PotentialDataController {
*/
@RequestMapping
(
path
=
"/recommend/conv-trend"
)
public
RestResponse
<
Page
<
RecommendConvTrendVO
>>
queryRecommendConvTrend
(
@RequestBody
RecommendConvTrendQO
potentialOverviewQO
)
{
if
(
StringUtils
.
isBlank
(
potentialOverviewQO
.
getEnterpriseId
())
||
Objects
.
equals
(
potentialOverviewQO
.
getEnterpriseId
(),
"-1"
))
{
return
RestResponse
.
failure
(
"-1"
,
"参数缺失"
);
}
List
<
String
>
storeIds
=
getStoreIds
(
potentialOverviewQO
).
getValue
();
Page
<
RecommendConvTrendVO
>
page
=
potentialDataAdaptor
.
pageRecommendConvTrend
(
potentialOverviewQO
,
storeIds
);
return
RestResponse
.
successResult
(
page
);
...
...
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