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
8e530458
Commit
8e530458
authored
Mar 10, 2025
by
王祖波
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-2025-cms' into 'master'
Feature 2025 cms See merge request
!2534
parents
a0a3045f
a0ded935
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
711 additions
and
26 deletions
+711
-26
NoticeMessageTypeEnum.java
...om/gic/haoban/manage/api/enums/NoticeMessageTypeEnum.java
+4
-3
NoticeMessageUtil.java
.../gic/haoban/manage/api/util/notify/NoticeMessageUtil.java
+11
-3
PotentialCustomerStaticsBO.java
...e/service/pojo/bo/content/PotentialCustomerStaticsBO.java
+4
-0
PotentialCustomerServiceImpl.java
...ce/service/content/impl/PotentialCustomerServiceImpl.java
+12
-8
InteractRecordMessageService.java
...service/content/message/InteractRecordMessageService.java
+24
-0
NoticeMessageHandler.java
.../manage/service/service/message/NoticeMessageHandler.java
+5
-0
QywxGroupMsgTaskApiServiceImpl.java
...out/impl/content/task/QywxGroupMsgTaskApiServiceImpl.java
+19
-4
IntervalUtils.java
...ava/com/gic/haoban/manage/service/util/IntervalUtils.java
+28
-0
NotityTest.java
haoban-manage3-service/src/test/java/NotityTest.java
+2
-1
ContentAccountController.java
...nage/web/controller/content/ContentAccountController.java
+3
-0
ContentCreativeController.java
...age/web/controller/content/ContentCreativeController.java
+2
-1
ContentMaterialController.java
...age/web/controller/content/ContentMaterialController.java
+1
-0
MaterialDataStaticsController.java
...web/controller/content/MaterialDataStaticsController.java
+0
-0
ClerkStoreAdaptor.java
...age/web/controller/content/adaptor/ClerkStoreAdaptor.java
+29
-0
MaterialDataAdaptor.java
...e/web/controller/content/adaptor/MaterialDataAdaptor.java
+84
-5
DataExportController.java
...oban/manage/web/controller/data/DataExportController.java
+61
-0
ContentMaterialClerkUsedDataHandler.java
...anage/web/export/ContentMaterialClerkUsedDataHandler.java
+81
-0
ContentMaterialStoreUsedDataHandler.java
...anage/web/export/ContentMaterialStoreUsedDataHandler.java
+82
-0
ContentMaterialQO.java
...m/gic/haoban/manage/web/qo/content/ContentMaterialQO.java
+15
-0
MaterialStatisticsBaseQO.java
...e/web/qo/content/statistics/MaterialStatisticsBaseQO.java
+37
-0
MaterialTodayDetailDataQO.java
.../web/qo/content/statistics/MaterialTodayDetailDataQO.java
+47
-0
DataExportListQO.java
...a/com/gic/haoban/manage/web/qo/data/DataExportListQO.java
+33
-0
ContentMaterialInfoVO.java
...c/haoban/manage/web/vo/content/ContentMaterialInfoVO.java
+14
-0
ContentMaterialVO.java
...ban/manage/web/vo/content/creative/ContentMaterialVO.java
+13
-0
MaterialRealDataVO.java
.../manage/web/vo/content/statistics/MaterialRealDataVO.java
+13
-0
MaterialRealDetailDataVO.java
...e/web/vo/content/statistics/MaterialRealDetailDataVO.java
+84
-0
dubbo-haoban-manage-wx.xml
...ge3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
+2
-0
spring-servlet.xml
haoban-manage3-wx/src/main/webapp/WEB-INF/spring-servlet.xml
+1
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/enums/NoticeMessageTypeEnum.java
View file @
8e530458
...
@@ -95,10 +95,9 @@ public enum NoticeMessageTypeEnum {
...
@@ -95,10 +95,9 @@ public enum NoticeMessageTypeEnum {
POTENTIAL_CUSTOMER_NOTIFY
(
6003
,
"销售线索通知"
,
NoticeMessageCategoryTypeEnum
.
POTENTIAL_CUSTOMER
.
getType
(),
"potential_customer_notify"
,
"/pages/route/index?pageType="
,
"hbapp_sales_clue_center"
,
"salesLeadNotice"
,
"haobanNotice"
),
POTENTIAL_CUSTOMER_NOTIFY
(
6003
,
"销售线索通知"
,
NoticeMessageCategoryTypeEnum
.
POTENTIAL_CUSTOMER
.
getType
(),
"potential_customer_notify"
,
"/pages/route/index?pageType="
,
"hbapp_sales_clue_center"
,
"salesLeadNotice"
,
"haobanNotice"
),
MATERIAL_REPORT_NOTIFY_MONTH
(
6004
,
"素材月报通知"
,
NoticeMessageCategoryTypeEnum
.
MATERIAL
.
getType
(),
"material_month_notify"
,
"/pages/route/index?pageType="
,
"hbapp_mate_report"
,
"materialMonth"
,
"clerkMaterialsReport"
),
MATERIAL_REPORT_NOTIFY_MONTH
(
6004
,
"素材月报通知"
,
NoticeMessageCategoryTypeEnum
.
MATERIAL
.
getType
(),
"material_month_notify"
,
"/pages/route/index?pageType="
,
"hbapp_mate_report"
,
"materialMonth"
,
"clerkMaterialsReport"
),
CLERK_COMMISSION_NOTIFY
(
6005
,
"客户下单通知"
,
NoticeMessageCategoryTypeEnum
.
CUSTOMER
.
getType
(),
"clerk_commission_notify"
,
"/pages/route/index?pageType="
,
"hbapp_withdraw_list"
,
"clerkCommissionNotify"
,
"haobanNotice"
),
CLERK_COMMISSION_NOTIFY
(
6005
,
"客户下单通知"
,
NoticeMessageCategoryTypeEnum
.
CUSTOMER
.
getType
(),
"clerk_commission_notify"
,
"/pages/route/index?pageType="
,
"hbapp_withdraw_list"
,
"clerkCommissionNotify"
,
"haobanNotice"
),
MATERIAL_AUDIT_NOTIFY
(
6006
,
"素材审核通知"
,
NoticeMessageCategoryTypeEnum
.
MATERIAL
.
getType
(),
"material_audit_notify"
,
"/pages/route/index?pageType="
,
"hbapp_create_center"
,
"materialAuditNotify"
,
"haobanNotice"
),
MATERIAL_AUDIT_NOTIFY
(
6006
,
"素材审核通知"
,
NoticeMessageCategoryTypeEnum
.
MATERIAL
.
getType
(),
"material_audit_notify"
,
"/pages/route/index?pageType="
,
"hbapp_create_center"
,
"materialAuditNotify"
,
"haobanNotice"
),
KNOWLEDGE_NEW_NOTIFY
(
6007
,
"知识库上新通知"
,
NoticeMessageCategoryTypeEnum
.
MATERIAL
.
getType
(),
"knowledge_new_notify"
,
"/pages/route/index?pageType="
,
"hbapp_guide_knowledge"
,
"knowledgeNewNotify"
,
"clerkMaterialsNotice"
),
KNOWLEDGE_NEW_NOTIFY
(
6007
,
"知识库上新通知"
,
NoticeMessageCategoryTypeEnum
.
MATERIAL
.
getType
(),
"knowledge_new_notify"
,
"/pages/route/index?pageType="
,
"hbapp_guide_knowledge"
,
"knowledgeNewNotify"
,
"clerkMaterialsNotice"
),
APPOINT_MATERIAL_NEW_NOTIFY
(
6008
,
"素材上新通知"
,
NoticeMessageCategoryTypeEnum
.
MATERIAL
.
getType
(),
"appoint_material_new_notify"
,
"/pages/route/index?pageType="
,
"hbapp_material_notice"
,
"appointMaterialsNotice"
,
"clerkMaterialsNotice"
),
CASH_APPLY_REFUSE_NOTIFY
(
7001
,
"提现通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"cash_apply_refuse_notify"
,
"/pages/route/index?pageType="
,
"hbapp_withdraw_list"
,
"cashApplyRefuseNotify"
,
"haobanNotice"
),
CASH_APPLY_REFUSE_NOTIFY
(
7001
,
"提现通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"cash_apply_refuse_notify"
,
"/pages/route/index?pageType="
,
"hbapp_withdraw_list"
,
"cashApplyRefuseNotify"
,
"haobanNotice"
),
...
@@ -107,7 +106,9 @@ public enum NoticeMessageTypeEnum {
...
@@ -107,7 +106,9 @@ public enum NoticeMessageTypeEnum {
CASH_APPLY_OFFLINE_SUCCESS_NOTIFY
(
7003
,
"提现通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"cash_apply_offline_success_notify"
,
"/pages/route/index?pageType="
,
"hbapp_withdraw_list"
,
"cashApplyOfflineSuccessNotify"
,
"haobanNotice"
),
CASH_APPLY_OFFLINE_SUCCESS_NOTIFY
(
7003
,
"提现通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"cash_apply_offline_success_notify"
,
"/pages/route/index?pageType="
,
"hbapp_withdraw_list"
,
"cashApplyOfflineSuccessNotify"
,
"haobanNotice"
),
AUTHORIZED_LOGIN_NOTIFY
(
8001
,
"账号授权通知"
,
NoticeMessageCategoryTypeEnum
.
AUTHORIZED
.
getType
(),
"authorized_login_notify"
,
"/pages/route/index?pageType="
,
"hbapp_video_auth"
,
"authorizedLoginNotify"
,
"haobanNotice"
),
AUTHORIZED_LOGIN_NOTIFY
(
8001
,
"账号授权通知"
,
NoticeMessageCategoryTypeEnum
.
AUTHORIZED
.
getType
(),
"authorized_login_notify"
,
"/pages/route/index?pageType="
,
"hbapp_video_auth"
,
"authorizedLoginNotify"
,
"haobanNotice"
),
AUTHORIZED_LOGOUT_NOTIFY
(
8002
,
"账号异常退出登录通知"
,
NoticeMessageCategoryTypeEnum
.
AUTHORIZED
.
getType
(),
"authorized_logout_notify"
,
"/pages/route/index?pageType="
,
"hbapp_video_auth"
,
"authorizedLogoutNotify"
,
"haobanNotice"
);
AUTHORIZED_LOGOUT_NOTIFY
(
8002
,
"账号异常退出登录通知"
,
NoticeMessageCategoryTypeEnum
.
AUTHORIZED
.
getType
(),
"authorized_logout_notify"
,
"/pages/route/index?pageType="
,
"hbapp_video_auth"
,
"authorizedLogoutNotify"
,
"haobanNotice"
),
DATA_EXPORT_NOTIFY
(
9001
,
"数据导出通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"data_export_notify"
,
"/pages/route/index?pageType="
,
"hbapp_data_export"
,
"dataExportNotify"
,
"haobanNotice"
);
/**
/**
* 消息类型
* 消息类型
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/util/notify/NoticeMessageUtil.java
View file @
8e530458
package
com
.
gic
.
haoban
.
manage
.
api
.
util
.
notify
;
package
com
.
gic
.
haoban
.
manage
.
api
.
util
.
notify
;
import
cn.hutool.core.date.DateUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.haoban.manage.api.dto.notify.qdto.NoticeMessageQDTO
;
import
com.gic.haoban.manage.api.dto.notify.qdto.NoticeMessageQDTO
;
...
@@ -13,9 +14,7 @@ import org.slf4j.Logger;
...
@@ -13,9 +14,7 @@ import org.slf4j.Logger;
import
java.io.UnsupportedEncodingException
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.nio.charset.StandardCharsets
;
import
java.nio.charset.StandardCharsets
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Map
;
import
static
org
.
slf4j
.
LoggerFactory
.
getLogger
;
import
static
org
.
slf4j
.
LoggerFactory
.
getLogger
;
...
@@ -147,6 +146,15 @@ public class NoticeMessageUtil {
...
@@ -147,6 +146,15 @@ public class NoticeMessageUtil {
}
}
}
}
public
static
void
sendDataExportNotify
(
String
enterpriseId
,
String
clerkId
,
String
taskName
,
Date
exportTime
)
{
Map
<
String
,
String
>
contentMap
=
new
HashMap
<
String
,
String
>();
contentMap
.
put
(
"taskName"
,
taskName
);
contentMap
.
put
(
"exportTime"
,
DateUtil
.
formatDateTime
(
exportTime
));
Map
<
String
,
Object
>
extendContent
=
new
HashMap
<>();
NoticeMessageUtil
.
sendNoticeMessage
(
enterpriseId
,
clerkId
,
NoticeMessageTypeEnum
.
DATA_EXPORT_NOTIFY
.
getType
(),
null
,
contentMap
,
extendContent
);
}
/**
/**
* 构建小程序跳转url
* 构建小程序跳转url
* @param messageTypeEnum
* @param messageTypeEnum
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/bo/content/PotentialCustomerStaticsBO.java
View file @
8e530458
package
com
.
gic
.
haoban
.
manage
.
service
.
pojo
.
bo
.
content
;
package
com
.
gic
.
haoban
.
manage
.
service
.
pojo
.
bo
.
content
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.io.Serializable
;
...
@@ -11,6 +13,8 @@ import java.io.Serializable;
...
@@ -11,6 +13,8 @@ import java.io.Serializable;
* @Version
* @Version
**/
**/
@Data
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
PotentialCustomerStaticsBO
implements
Serializable
{
public
class
PotentialCustomerStaticsBO
implements
Serializable
{
/**
/**
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/impl/PotentialCustomerServiceImpl.java
View file @
8e530458
...
@@ -279,15 +279,19 @@ public class PotentialCustomerServiceImpl implements PotentialCustomerService {
...
@@ -279,15 +279,19 @@ public class PotentialCustomerServiceImpl implements PotentialCustomerService {
log
.
info
(
"处理企业{}下的销售线索通知"
,
context
.
getEnterpriseId
());
log
.
info
(
"处理企业{}下的销售线索通知"
,
context
.
getEnterpriseId
());
// 根据企业id + 时间 循环查询时间段内的有新互动记录的导购id 去重
List
<
PotentialCustomerStaticsBO
>
customerStaticsBos
=
context
.
getCustomerStaticsBos
();
InteractRecordQO
searchQo
=
new
InteractRecordQO
();
searchQo
.
setEnterpriseId
(
context
.
getEnterpriseId
());
searchQo
.
setStartTime
(
context
.
getStartTime
());
searchQo
.
setEndTime
(
context
.
getEndTime
());
List
<
PotentialCustomerStaticsBO
>
customerStaticsBos
=
interactRecordService
.
staticsClerkNewInteractRecord
(
searchQo
);
if
(
CollectionUtils
.
isEmpty
(
customerStaticsBos
))
{
if
(
CollectionUtils
.
isEmpty
(
customerStaticsBos
))
{
log
.
info
(
"企业下不存在新增线索的导购 {}"
,
JSON
.
toJSONString
(
context
));
// 根据企业id + 时间 循环查询时间段内的有新互动记录的导购id 去重
return
;
InteractRecordQO
searchQo
=
new
InteractRecordQO
();
searchQo
.
setEnterpriseId
(
context
.
getEnterpriseId
());
searchQo
.
setStartTime
(
context
.
getStartTime
());
searchQo
.
setEndTime
(
context
.
getEndTime
());
customerStaticsBos
=
interactRecordService
.
staticsClerkNewInteractRecord
(
searchQo
);
if
(
CollectionUtils
.
isEmpty
(
customerStaticsBos
))
{
log
.
info
(
"企业下不存在新增线索的导购 {}"
,
JSON
.
toJSONString
(
context
));
return
;
}
}
}
context
.
setCustomerStaticsBos
(
customerStaticsBos
);
context
.
setCustomerStaticsBos
(
customerStaticsBos
);
// 获取导购与成员关联关联关系
// 获取导购与成员关联关联关系
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/message/InteractRecordMessageService.java
View file @
8e530458
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
content
.
message
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
content
.
message
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.content.api.dto.setting.ContentSettingDTO
;
import
com.gic.content.api.service.ContentSettingApiService
;
import
com.gic.haoban.manage.api.enums.content.MaterialInteractRecordEventType
;
import
com.gic.haoban.manage.api.enums.content.MaterialInteractRecordEventType
;
import
com.gic.haoban.manage.service.pojo.bo.content.InteractRecordBO
;
import
com.gic.haoban.manage.service.pojo.bo.content.InteractRecordBO
;
import
com.gic.haoban.manage.service.pojo.bo.content.InteractRecordExtendInfoBO
;
import
com.gic.haoban.manage.service.pojo.bo.content.InteractRecordExtendInfoBO
;
import
com.gic.haoban.manage.service.pojo.bo.content.PotentialCustomerBO
;
import
com.gic.haoban.manage.service.pojo.bo.content.PotentialCustomerBO
;
import
com.gic.haoban.manage.service.pojo.bo.content.PotentialCustomerStaticsBO
;
import
com.gic.haoban.manage.service.pojo.bo.content.context.InteractRecordMessageContext
;
import
com.gic.haoban.manage.service.pojo.bo.content.context.InteractRecordMessageContext
;
import
com.gic.haoban.manage.service.pojo.bo.content.context.PotentialCustomerNotifyContext
;
import
com.gic.haoban.manage.service.pojo.bo.content.message.InteractRecordMessageBO
;
import
com.gic.haoban.manage.service.pojo.bo.content.message.InteractRecordMessageBO
;
import
com.gic.haoban.manage.service.service.content.InteractRecordService
;
import
com.gic.haoban.manage.service.service.content.InteractRecordService
;
import
com.gic.haoban.manage.service.service.content.PotentialCustomerService
;
import
com.gic.haoban.manage.service.service.content.PotentialCustomerService
;
import
com.gic.haoban.manage.service.service.content.adaptor.InteractRecordMessageBuilder
;
import
com.gic.haoban.manage.service.service.content.adaptor.InteractRecordMessageBuilder
;
import
com.gic.haoban.manage.service.util.IntervalUtils
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.google.common.collect.Lists
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -37,6 +44,8 @@ public class InteractRecordMessageService {
...
@@ -37,6 +44,8 @@ public class InteractRecordMessageService {
InteractRecordMessageBuilder
interactRecordMessageBuilder
;
InteractRecordMessageBuilder
interactRecordMessageBuilder
;
@Autowired
@Autowired
PotentialCustomerService
potentialCustomerService
;
PotentialCustomerService
potentialCustomerService
;
@Autowired
ContentSettingApiService
contentSettingApiService
;
/**
/**
* 处理互动记录
* 处理互动记录
...
@@ -156,6 +165,21 @@ public class InteractRecordMessageService {
...
@@ -156,6 +165,21 @@ public class InteractRecordMessageService {
potentialCustomerBO
.
setTimes
(
interactRecordBO
.
getTimes
());
potentialCustomerBO
.
setTimes
(
interactRecordBO
.
getTimes
());
potentialCustomerService
.
saveOrUpdatePotentialCustomer
(
potentialCustomerBO
);
potentialCustomerService
.
saveOrUpdatePotentialCustomer
(
potentialCustomerBO
);
}
}
ServiceResponse
<
ContentSettingDTO
>
response
=
contentSettingApiService
.
queryContentSettingInfo
(
interactRecordMessageBO
.
getEnterpriseId
());
if
(
response
.
isSuccess
()
&&
response
.
getResult
()
!=
null
)
{
Integer
potentialNotifyInterval
=
response
.
getResult
().
getPotentialNotifyInterval
();
if
(
potentialNotifyInterval
!=
null
&&
potentialNotifyInterval
<=
0
)
{
PotentialCustomerNotifyContext
notifyContext
=
PotentialCustomerNotifyContext
.
builder
()
.
enterpriseId
(
interactRecordMessageBO
.
getEnterpriseId
())
.
customerStaticsBos
(
Lists
.
newArrayList
(
new
PotentialCustomerStaticsBO
(
interactRecordBO
.
getClerkId
(),
1
)))
.
build
();
// 立即触发场景限制发送频率
boolean
send
=
IntervalUtils
.
tryAddInterval
(
interactRecordBO
.
getClerkId
(),
interactRecordBO
.
getMemberId
(),
interactRecordBO
.
getUnionId
());
if
(
send
)
{
potentialCustomerService
.
sendPotentialCustomerNotice
(
notifyContext
);
}
}
}
}
finally
{
}
finally
{
RedisUtil
.
unlock
(
recordKey
);
RedisUtil
.
unlock
(
recordKey
);
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/message/NoticeMessageHandler.java
View file @
8e530458
...
@@ -3,6 +3,8 @@ package com.gic.haoban.manage.service.service.message;
...
@@ -3,6 +3,8 @@ package com.gic.haoban.manage.service.service.message;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum
;
import
com.gic.haoban.manage.api.util.notify.NoticeMessageUtil
;
import
com.gic.message.center.api.subscribe.model.NoticeMessageForm
;
import
com.gic.message.center.api.subscribe.model.NoticeMessageForm
;
import
com.gic.mq.sdk.GicMQClient
;
import
com.gic.mq.sdk.GicMQClient
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
@@ -11,6 +13,9 @@ import org.springframework.stereotype.Service;
...
@@ -11,6 +13,9 @@ import org.springframework.stereotype.Service;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.time.LocalTime
;
import
java.time.LocalTime
;
import
java.time.temporal.ChronoUnit
;
import
java.time.temporal.ChronoUnit
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
import
static
org
.
slf4j
.
LoggerFactory
.
getLogger
;
import
static
org
.
slf4j
.
LoggerFactory
.
getLogger
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/content/task/QywxGroupMsgTaskApiServiceImpl.java
View file @
8e530458
...
@@ -14,6 +14,8 @@ import com.gic.clerk.api.dto.ClerkDTO;
...
@@ -14,6 +14,8 @@ import com.gic.clerk.api.dto.ClerkDTO;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.commons.util.DateUtil
;
import
com.gic.commons.util.DateUtil
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.content.api.dto.setting.ContentSettingDTO
;
import
com.gic.content.api.service.ContentSettingApiService
;
import
com.gic.enterprise.api.constant.EnterpriseServiceEnum
;
import
com.gic.enterprise.api.constant.EnterpriseServiceEnum
;
import
com.gic.enterprise.api.dto.enterprise.EnterpriseUsingStatusDTO
;
import
com.gic.enterprise.api.dto.enterprise.EnterpriseUsingStatusDTO
;
import
com.gic.enterprise.api.service.EnterpriseUseForbidService
;
import
com.gic.enterprise.api.service.EnterpriseUseForbidService
;
...
@@ -82,6 +84,8 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic
...
@@ -82,6 +84,8 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic
private
WxEnterpriseService
wxEnterpriseService
;
private
WxEnterpriseService
wxEnterpriseService
;
@Autowired
@Autowired
private
PotentialCustomerService
potentialCustomerService
;
private
PotentialCustomerService
potentialCustomerService
;
@Autowired
private
ContentSettingApiService
contentSettingApiService
;
@Autowired
@Autowired
private
EcommerceOrderOutputApiService
ecommerceOrderOutputApiService
;
private
EcommerceOrderOutputApiService
ecommerceOrderOutputApiService
;
...
@@ -267,7 +271,7 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic
...
@@ -267,7 +271,7 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic
*/
*/
@Override
@Override
public
ServiceResponse
<
Void
>
potentialCustomerJob
(
String
params
)
{
public
ServiceResponse
<
Void
>
potentialCustomerJob
(
String
params
)
{
Date
now
=
new
Date
(
);
Date
now
=
cn
.
hutool
.
core
.
date
.
DateUtil
.
beginOfSecond
(
cn
.
hutool
.
core
.
date
.
DateUtil
.
date
()
);
log
.
info
(
"potentialCustomerJob 执行销售线索通知 {}"
,
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
now
,
"yyyy-MM-dd HH:mm:ss"
));
log
.
info
(
"potentialCustomerJob 执行销售线索通知 {}"
,
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
now
,
"yyyy-MM-dd HH:mm:ss"
));
int
currentHour
=
cn
.
hutool
.
core
.
date
.
DateUtil
.
hour
(
now
,
true
);
int
currentHour
=
cn
.
hutool
.
core
.
date
.
DateUtil
.
hour
(
now
,
true
);
if
(
currentHour
>=
23
||
currentHour
<
8
)
{
if
(
currentHour
>=
23
||
currentHour
<
8
)
{
...
@@ -279,7 +283,7 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic
...
@@ -279,7 +283,7 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic
log
.
info
(
"开通内容权限的企业为空"
);
log
.
info
(
"开通内容权限的企业为空"
);
return
ServiceResponse
.
success
();
return
ServiceResponse
.
success
();
}
}
Date
startTime
=
cn
.
hutool
.
core
.
date
.
DateUtil
.
offsetMinute
(
now
,
-
30
).
toJdkDate
()
;
Date
startTime
=
null
;
// 如果是8点那次的执行 需要获取 23 ~ 8点的数据
// 如果是8点那次的执行 需要获取 23 ~ 8点的数据
if
(
checkIsTodayFirst
(
now
))
{
if
(
checkIsTodayFirst
(
now
))
{
log
.
info
(
"本次执行为当天第一次执行 {}"
,
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
now
,
"yyyy-MM-dd HH:mm:ss"
));
log
.
info
(
"本次执行为当天第一次执行 {}"
,
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
now
,
"yyyy-MM-dd HH:mm:ss"
));
...
@@ -294,6 +298,18 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic
...
@@ -294,6 +298,18 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic
startTime
=
calendar
.
getTime
();
startTime
=
calendar
.
getTime
();
}
}
for
(
String
enterpriseId
:
enterpriseIds
)
{
for
(
String
enterpriseId
:
enterpriseIds
)
{
Integer
potentialNotifyInterval
=
30
;
ServiceResponse
<
ContentSettingDTO
>
response
=
contentSettingApiService
.
queryContentSettingInfo
(
enterpriseId
);
if
(
response
.
isSuccess
()
&&
response
.
getResult
()
!=
null
)
{
potentialNotifyInterval
=
response
.
getResult
().
getPotentialNotifyInterval
();
}
if
(
potentialNotifyInterval
<=
0
||
cn
.
hutool
.
core
.
date
.
DateUtil
.
minute
(
now
)
%
potentialNotifyInterval
!=
0
)
{
continue
;
}
if
(
startTime
==
null
)
{
startTime
=
cn
.
hutool
.
core
.
date
.
DateUtil
.
offsetMinute
(
now
,
-
potentialNotifyInterval
).
toJdkDate
();
}
log
.
info
(
"销售线索执行eid:{},potentialNotifyInterval:{}"
,
enterpriseId
,
potentialNotifyInterval
);
PotentialCustomerNotifyContext
context
=
PotentialCustomerNotifyContext
.
builder
()
PotentialCustomerNotifyContext
context
=
PotentialCustomerNotifyContext
.
builder
()
.
enterpriseId
(
enterpriseId
)
.
enterpriseId
(
enterpriseId
)
.
startTime
(
startTime
)
.
startTime
(
startTime
)
...
@@ -314,8 +330,7 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic
...
@@ -314,8 +330,7 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic
int
hour_sec
=
30
*
60
;
int
hour_sec
=
30
*
60
;
private
boolean
checkIsTodayFirst
(
Date
now
)
{
private
boolean
checkIsTodayFirst
(
Date
now
)
{
DateTime
temp
=
cn
.
hutool
.
core
.
date
.
DateUtil
.
offsetSecond
(
now
,
-(
hour_sec
));
return
cn
.
hutool
.
core
.
date
.
DateUtil
.
hour
(
now
,
true
)
==
8
&&
cn
.
hutool
.
core
.
date
.
DateUtil
.
minute
(
now
)
<
5
;
return
cn
.
hutool
.
core
.
date
.
DateUtil
.
hour
(
temp
,
true
)
<
8
;
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/util/IntervalUtils.java
0 → 100644
View file @
8e530458
package
com
.
gic
.
haoban
.
manage
.
service
.
util
;
import
com.gic.redis.data.util.RedisUtil
;
import
org.redisson.api.RBucket
;
import
org.redisson.api.RedissonClient
;
import
java.util.concurrent.TimeUnit
;
/**
* Created by wangzubo on 2025/3/5.
*/
public
class
IntervalUtils
{
private
static
final
String
INTERVAL_KEY
=
"haoban-manage3-service:interval_potential:%s:%s:%s"
;
public
static
boolean
tryAddInterval
(
String
clerkId
,
String
memberId
,
String
unionId
)
{
String
key
=
String
.
format
(
INTERVAL_KEY
,
clerkId
,
memberId
,
unionId
);
RedissonClient
redisClient
=
RedisUtil
.
getRedisClient
();
RBucket
<
Object
>
bucket
=
redisClient
.
getBucket
(
key
);
boolean
trySet
=
bucket
.
trySet
(
1
,
10
,
TimeUnit
.
SECONDS
);
if
(!
trySet
)
{
return
false
;
}
return
true
;
}
}
haoban-manage3-service/src/test/java/NotityTest.java
View file @
8e530458
...
@@ -10,6 +10,7 @@ import com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum;
...
@@ -10,6 +10,7 @@ import com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum;
import
com.gic.haoban.manage.api.service.CheckQywxSettingApiService
;
import
com.gic.haoban.manage.api.service.CheckQywxSettingApiService
;
import
com.gic.haoban.manage.api.service.QywxTagApiService
;
import
com.gic.haoban.manage.api.service.QywxTagApiService
;
import
com.gic.haoban.manage.api.service.notify.NoticeMessageApiService
;
import
com.gic.haoban.manage.api.service.notify.NoticeMessageApiService
;
import
com.gic.haoban.manage.api.util.notify.NoticeMessageUtil
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.wechat.api.dto.qdto.group.QywxGroupMessageQDTO
;
import
com.gic.wechat.api.dto.qdto.group.QywxGroupMessageQDTO
;
...
@@ -79,7 +80,7 @@ public class NotityTest {
...
@@ -79,7 +80,7 @@ public class NotityTest {
@Test
@Test
public
void
test2
()
{
public
void
test2
()
{
NoticeMessageUtil
.
sendDataExportNotify
(
"ff8080815dacd3a2015dacd3ef5c0000"
,
"26efaa8144e14f60b2f4d48ffe9f708c"
,
"导出测试"
,
DateUtil
.
date
());
}
}
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/content/ContentAccountController.java
View file @
8e530458
...
@@ -123,6 +123,9 @@ public class ContentAccountController {
...
@@ -123,6 +123,9 @@ public class ContentAccountController {
accountGenerateQrCodeQDTO
.
setBizType
(
accountGenerateQrCodeQo
.
getBizType
());
accountGenerateQrCodeQDTO
.
setBizType
(
accountGenerateQrCodeQo
.
getBizType
());
ServiceResponse
<
AccountAuthorizeDTO
>
serviceResponse
=
contentAccountApiService
.
generateQrCode
(
accountGenerateQrCodeQDTO
);
ServiceResponse
<
AccountAuthorizeDTO
>
serviceResponse
=
contentAccountApiService
.
generateQrCode
(
accountGenerateQrCodeQDTO
);
if
(!
serviceResponse
.
isSuccess
())
{
if
(!
serviceResponse
.
isSuccess
())
{
if
(
Objects
.
equals
(
serviceResponse
.
getCode
(),
"600"
))
{
return
RestResponse
.
failure
(
"600"
,
"正在授权中的账号有点多,请稍后重试"
);
}
return
RestResponse
.
failure
(
"500"
,
"生成二维码异常"
);
return
RestResponse
.
failure
(
"500"
,
"生成二维码异常"
);
}
}
return
RestResponse
.
successResult
(
EntityUtil
.
changeEntityByJSON
(
AccountAuthorizeVo
.
class
,
serviceResponse
.
getResult
()));
return
RestResponse
.
successResult
(
EntityUtil
.
changeEntityByJSON
(
AccountAuthorizeVo
.
class
,
serviceResponse
.
getResult
()));
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/content/ContentCreativeController.java
View file @
8e530458
...
@@ -90,6 +90,7 @@ public class ContentCreativeController {
...
@@ -90,6 +90,7 @@ public class ContentCreativeController {
if
(
clerk
==
null
)
{
if
(
clerk
==
null
)
{
return
RestResponse
.
failure
(
"-1"
,
"导购不存在"
);
return
RestResponse
.
failure
(
"-1"
,
"导购不存在"
);
}
}
Long
clerkTaskPlanId
=
saveQO
.
getClerkTaskPlanId
()
;
//组装导购发布人信息
//组装导购发布人信息
ContentProducerClerkRandomQDTO
producerQDTO
=
new
ContentProducerClerkRandomQDTO
();
ContentProducerClerkRandomQDTO
producerQDTO
=
new
ContentProducerClerkRandomQDTO
();
producerQDTO
.
setProducerType
(
MaterialProducerTypeEnum
.
CLERK
.
value
);
producerQDTO
.
setProducerType
(
MaterialProducerTypeEnum
.
CLERK
.
value
);
...
@@ -112,11 +113,11 @@ public class ContentCreativeController {
...
@@ -112,11 +113,11 @@ public class ContentCreativeController {
contentMaterialQDTO
.
setMaterialPurpose
(
MaterialPurposeEnum
.
AUDIT
.
code
);
contentMaterialQDTO
.
setMaterialPurpose
(
MaterialPurposeEnum
.
AUDIT
.
code
);
contentMaterialQDTO
.
setPublishType
(
MaterialPublishTypeEnum
.
NONE
.
value
);
contentMaterialQDTO
.
setPublishType
(
MaterialPublishTypeEnum
.
NONE
.
value
);
contentMaterialQDTO
.
setShelfStatus
(
Constant
.
FLAG_TRUE
);
contentMaterialQDTO
.
setShelfStatus
(
Constant
.
FLAG_TRUE
);
contentMaterialQDTO
.
setMaterialBusiSource
(
clerkTaskPlanId
!=
null
?
MaterialBusiSourceEnum
.
CLERK_TASK
.
code
:
MaterialBusiSourceEnum
.
ACTIVE
.
code
);
ServiceResponse
<
ContentMaterialDTO
>
response
=
contentMaterialApiService
.
saveMaterial
(
contentMaterialQDTO
);
ServiceResponse
<
ContentMaterialDTO
>
response
=
contentMaterialApiService
.
saveMaterial
(
contentMaterialQDTO
);
if
(!
response
.
isSuccess
())
{
if
(!
response
.
isSuccess
())
{
return
RestResponse
.
failure
(
response
.
getCode
(),
response
.
getMessage
());
return
RestResponse
.
failure
(
response
.
getCode
(),
response
.
getMessage
());
}
}
Long
clerkTaskPlanId
=
saveQO
.
getClerkTaskPlanId
()
;
if
(
null
!=
clerkTaskPlanId
)
{
if
(
null
!=
clerkTaskPlanId
)
{
ClerkTaskContentLogDTO
dto
=
new
ClerkTaskContentLogDTO
()
;
ClerkTaskContentLogDTO
dto
=
new
ClerkTaskContentLogDTO
()
;
dto
.
setPlanId
(
clerkTaskPlanId
);
dto
.
setPlanId
(
clerkTaskPlanId
);
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/content/ContentMaterialController.java
View file @
8e530458
...
@@ -122,6 +122,7 @@ public class ContentMaterialController {
...
@@ -122,6 +122,7 @@ public class ContentMaterialController {
pageQDTO
.
setMaterialType
(
contentMaterialQO
.
getMaterialType
());
pageQDTO
.
setMaterialType
(
contentMaterialQO
.
getMaterialType
());
pageQDTO
.
setClerkId
(
contentMaterialQO
.
getClerkId
());
pageQDTO
.
setClerkId
(
contentMaterialQO
.
getClerkId
());
pageQDTO
.
setGoodsId
(
contentMaterialQO
.
getGoodsId
());
pageQDTO
.
setGoodsId
(
contentMaterialQO
.
getGoodsId
());
pageQDTO
.
setContentMaterialIdList
(
contentMaterialQO
.
getContentMaterialIdList
());
if
(
contentMaterialQO
.
getSortType
()
!=
null
)
{
if
(
contentMaterialQO
.
getSortType
()
!=
null
)
{
if
(
contentMaterialQO
.
getSortType
()
==
2
)
{
if
(
contentMaterialQO
.
getSortType
()
==
2
)
{
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/content/MaterialDataStaticsController.java
View file @
8e530458
This diff is collapsed.
Click to expand it.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/content/adaptor/ClerkStoreAdaptor.java
View file @
8e530458
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
content
.
adaptor
;
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
content
.
adaptor
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.dto.StoreInfoDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.manage.api.dto.StaffClerkInfoDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkInfoDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
...
@@ -17,6 +20,8 @@ import org.springframework.stereotype.Component;
...
@@ -17,6 +20,8 @@ import org.springframework.stereotype.Component;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.HashSet
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
/**
* @Author MUSI
* @Author MUSI
...
@@ -34,6 +39,8 @@ public class ClerkStoreAdaptor {
...
@@ -34,6 +39,8 @@ public class ClerkStoreAdaptor {
private
StaffClerkRelationApiService
staffClerkRelationApiService
;
private
StaffClerkRelationApiService
staffClerkRelationApiService
;
@Autowired
@Autowired
private
ClerkService
clerkService
;
private
ClerkService
clerkService
;
@Autowired
private
StoreService
storeService
;
/**
/**
* 查询区经角色下管辖的门店权限
* 查询区经角色下管辖的门店权限
...
@@ -99,4 +106,26 @@ public class ClerkStoreAdaptor {
...
@@ -99,4 +106,26 @@ public class ClerkStoreAdaptor {
return
clerkDTOS
;
return
clerkDTOS
;
}
}
public
Map
<
String
,
ClerkDTO
>
queryClerkMap
(
List
<
String
>
clerkIds
)
{
if
(
CollectionUtils
.
isEmpty
(
clerkIds
))
{
return
Collections
.
emptyMap
();
}
List
<
ClerkDTO
>
clerkDTOS
=
queryClerkInfos
(
clerkIds
);
if
(
CollectionUtils
.
isEmpty
(
clerkDTOS
))
{
return
Collections
.
emptyMap
();
}
return
clerkDTOS
.
stream
().
collect
(
Collectors
.
toMap
(
ClerkDTO:
:
getClerkId
,
clerkDTO
->
clerkDTO
));
}
public
Map
<
String
,
StoreDTO
>
queryStoreMap
(
List
<
String
>
storeIds
)
{
if
(
CollectionUtils
.
isEmpty
(
storeIds
))
{
return
Collections
.
emptyMap
();
}
String
[]
storeIdsArry
=
new
String
[
storeIds
.
size
()];
List
<
StoreDTO
>
storeDTOS
=
storeService
.
getStores
(
storeIds
.
toArray
(
storeIdsArry
));
if
(
CollectionUtils
.
isEmpty
(
storeDTOS
))
{
return
Collections
.
emptyMap
();
}
return
storeDTOS
.
stream
().
collect
(
Collectors
.
toMap
(
StoreDTO:
:
getStoreId
,
storeDTO
->
storeDTO
));
}
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/content/adaptor/MaterialDataAdaptor.java
View file @
8e530458
...
@@ -7,14 +7,14 @@ import com.alibaba.fastjson.JSON;
...
@@ -7,14 +7,14 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.commons.util.DataApiUtils
;
import
com.gic.commons.util.DataApiUtils
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.manage.api.enums.content.MaterialReportType
;
import
com.gic.haoban.manage.api.enums.content.MaterialReportType
;
import
com.gic.haoban.manage.web.qo.content.statistics.MaterialAnalyzeDataQO
;
import
com.gic.haoban.manage.web.qo.content.statistics.*
;
import
com.gic.haoban.manage.web.qo.content.statistics.MaterialReportQO
;
import
com.gic.haoban.manage.web.qo.content.statistics.MaterialStoreAnalyzeDataQO
;
import
com.gic.haoban.manage.web.qo.content.statistics.MaterialStoreReportQO
;
import
com.gic.haoban.manage.web.vo.content.creative.ContentMaterialConvsVO
;
import
com.gic.haoban.manage.web.vo.content.creative.ContentMaterialConvsVO
;
import
com.gic.haoban.manage.web.vo.content.statistics.*
;
import
com.gic.haoban.manage.web.vo.content.statistics.*
;
import
com.gic.haoban.manage.web.vo.content.statistics.bo.MaterialTodayDataBO
;
import
com.gic.haoban.manage.web.vo.content.statistics.bo.MaterialTodayDataBO
;
...
@@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.*
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -105,6 +106,10 @@ public class MaterialDataAdaptor {
...
@@ -105,6 +106,10 @@ public class MaterialDataAdaptor {
@Autowired
@Autowired
private
EnterpriseService
enterpriseService
;
private
EnterpriseService
enterpriseService
;
@Autowired
private
StoreService
storeService
;
@Autowired
private
ClerkStoreAdaptor
clerkStoreAdaptor
;
/**
/**
...
@@ -116,6 +121,7 @@ public class MaterialDataAdaptor {
...
@@ -116,6 +121,7 @@ public class MaterialDataAdaptor {
public
MaterialTodayDataBO
queryMaterialTodayData
(
String
enterpriseId
,
List
<
String
>
storeIds
)
{
public
MaterialTodayDataBO
queryMaterialTodayData
(
String
enterpriseId
,
List
<
String
>
storeIds
)
{
Map
<
String
,
Object
>
inlineParams
=
new
HashMap
<>();
Map
<
String
,
Object
>
inlineParams
=
new
HashMap
<>();
inlineParams
.
put
(
"enterpriseId"
,
enterpriseId
);
inlineParams
.
put
(
"enterpriseId"
,
enterpriseId
);
inlineParams
.
put
(
"dataType"
,
1
);
if
(
CollectionUtil
.
isNotEmpty
(
storeIds
))
{
if
(
CollectionUtil
.
isNotEmpty
(
storeIds
))
{
inlineParams
.
put
(
"storeId"
,
StringUtils
.
join
(
storeIds
,
","
));
inlineParams
.
put
(
"storeId"
,
StringUtils
.
join
(
storeIds
,
","
));
}
}
...
@@ -123,7 +129,7 @@ public class MaterialDataAdaptor {
...
@@ -123,7 +129,7 @@ public class MaterialDataAdaptor {
if
(
result
.
get
(
"data"
)
==
null
)
{
if
(
result
.
get
(
"data"
)
==
null
)
{
return
MaterialTodayDataBO
.
empty
();
return
MaterialTodayDataBO
.
empty
();
}
}
List
<
MaterialTodayDataBO
>
datas
=
DataApiUtils
.
parseDataList
(
result
,
MaterialTodayDataBO
.
class
);
List
<
MaterialTodayDataBO
>
datas
=
DataApiUtils
.
parse
Page
DataList
(
result
,
MaterialTodayDataBO
.
class
);
if
(
CollectionUtils
.
isEmpty
(
datas
))
{
if
(
CollectionUtils
.
isEmpty
(
datas
))
{
return
MaterialTodayDataBO
.
empty
();
return
MaterialTodayDataBO
.
empty
();
}
}
...
@@ -158,6 +164,60 @@ public class MaterialDataAdaptor {
...
@@ -158,6 +164,60 @@ public class MaterialDataAdaptor {
return
datas
.
get
(
0
);
return
datas
.
get
(
0
);
}
}
/**
* 查询当天数据明细
* @param dataQO
* @param storeIds
* @return
*/
public
Page
<
MaterialRealDetailDataVO
>
queryMaterialTodayDataDetail
(
MaterialTodayDetailDataQO
dataQO
,
List
<
String
>
storeIds
)
{
int
pageNum
=
dataQO
.
getPageNum
();
int
pageSize
=
dataQO
.
getPageSize
();
String
enterpriseId
=
dataQO
.
getEnterpriseId
();
String
order
=
dataQO
.
getOrder
();
Map
<
String
,
Object
>
inlineParams
=
new
HashMap
<>();
inlineParams
.
put
(
"pageNum"
,
pageNum
);
inlineParams
.
put
(
"pageSize"
,
pageSize
);
inlineParams
.
put
(
"enterpriseId"
,
enterpriseId
);
int
orderByFields
=
DataApiUtils
.
getOrderByFields
(
dataQO
.
getOrderByField
(),
dataQO
.
getDefaultFields
(),
dataQO
.
getFieldsOrder
());
inlineParams
.
put
(
"orderByFields"
,
orderByFields
);
inlineParams
.
put
(
"orderByType"
,
DataApiUtils
.
getOrderByType
(
order
));
inlineParams
.
put
(
"dataType"
,
dataQO
.
getDataType
());
if
(
CollectionUtil
.
isNotEmpty
(
storeIds
))
{
inlineParams
.
put
(
"storeId"
,
StringUtils
.
join
(
storeIds
,
","
));
}
Map
<
String
,
Object
>
result
=
DataApiUtils
.
http
(
JSON
.
toJSONString
(
inlineParams
),
MATERIAL_INDEX_DATA
);
Page
<
MaterialRealDetailDataVO
>
pageData
=
DataApiUtils
.
getPageData
(
result
,
MaterialRealDetailDataVO
.
class
);
if
(
CollectionUtils
.
isEmpty
(
pageData
.
getResult
()))
{
return
pageData
;
}
List
<
String
>
clerkIdList
=
new
ArrayList
<>();
List
<
String
>
storeIdList
=
new
ArrayList
<>();
pageData
.
getResult
().
forEach
(
item
->
{
Optional
.
ofNullable
(
item
.
getClerkId
()).
ifPresent
(
clerkIdList:
:
add
);
Optional
.
ofNullable
(
item
.
getStoreId
()).
ifPresent
(
storeIdList:
:
add
);
});
Map
<
String
,
ClerkDTO
>
clerkMap
=
new
HashMap
<>();
Map
<
String
,
StoreDTO
>
storeMap
=
new
HashMap
<>();
if
(
CollectionUtils
.
isNotEmpty
(
clerkIdList
))
{
clerkMap
=
clerkStoreAdaptor
.
queryClerkMap
(
clerkIdList
);
}
if
(
CollectionUtils
.
isNotEmpty
(
storeIdList
))
{
storeMap
=
clerkStoreAdaptor
.
queryStoreMap
(
storeIdList
);
}
for
(
MaterialRealDetailDataVO
item
:
pageData
.
getResult
())
{
Optional
.
ofNullable
(
clerkMap
.
get
(
item
.
getClerkId
())).
ifPresent
(
clerk
->
{
item
.
setClerkCode
(
clerk
.
getClerkCode
());
item
.
setClerkName
(
clerk
.
getClerkName
());
});
Optional
.
ofNullable
(
storeMap
.
get
(
item
.
getStoreId
())).
ifPresent
(
store
->
{
item
.
setStoreCode
(
store
.
getStoreCode
());
item
.
setStoreName
(
store
.
getStoreName
());
});
}
return
pageData
;
}
/**
/**
* 导购纬度数据统计
* 导购纬度数据统计
...
@@ -217,6 +277,25 @@ public class MaterialDataAdaptor {
...
@@ -217,6 +277,25 @@ public class MaterialDataAdaptor {
}
}
Map
<
String
,
Object
>
result
=
DataApiUtils
.
http
(
JSON
.
toJSONString
(
inlineParams
),
MATERIAL_STORE_DATA
);
Map
<
String
,
Object
>
result
=
DataApiUtils
.
http
(
JSON
.
toJSONString
(
inlineParams
),
MATERIAL_STORE_DATA
);
Page
<
MaterialStoreUsedDataVO
>
pageData
=
DataApiUtils
.
getPageData
(
result
,
MaterialStoreUsedDataVO
.
class
);
Page
<
MaterialStoreUsedDataVO
>
pageData
=
DataApiUtils
.
getPageData
(
result
,
MaterialStoreUsedDataVO
.
class
);
if
(
CollectionUtils
.
isNotEmpty
(
pageData
.
getResult
()))
{
List
<
String
>
tempStoreIds
=
pageData
.
getResult
()
.
stream
()
.
map
(
MaterialStoreUsedDataVO:
:
getStoreId
)
.
collect
(
Collectors
.
toList
());
String
[]
storeIdsArry
=
new
String
[
tempStoreIds
.
size
()];
List
<
StoreDTO
>
storeDTOS
=
storeService
.
getStores
(
tempStoreIds
.
toArray
(
storeIdsArry
));
if
(
CollectionUtils
.
isNotEmpty
(
storeDTOS
))
{
Map
<
String
,
StoreDTO
>
storeInfoMap
=
storeDTOS
.
stream
()
.
collect
(
Collectors
.
toMap
(
StoreDTO:
:
getStoreId
,
Function
.
identity
(),
(
v1
,
v2
)
->
v1
));
for
(
MaterialStoreUsedDataVO
materialStoreUsedDataVO
:
pageData
.
getResult
())
{
StoreDTO
storeDTO
=
storeInfoMap
.
get
(
materialStoreUsedDataVO
.
getStoreId
());
if
(
storeDTO
!=
null
)
{
materialStoreUsedDataVO
.
setStoreName
(
storeDTO
.
getStoreName
());
materialStoreUsedDataVO
.
setStoreCode
(
storeDTO
.
getStoreCode
());
}
}
}
}
return
pageData
;
return
pageData
;
}
}
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/data/DataExportController.java
0 → 100644
View file @
8e530458
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
data
;
import
cn.hutool.core.date.DateField
;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.date.DateUtil
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.api.dto.DownloadReportQDTQ
;
import
com.gic.enterprise.api.dto.security.DownloadReportDTO
;
import
com.gic.enterprise.api.service.DownloadReportService
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.haoban.common.utils.EntityUtil
;
import
com.gic.haoban.manage.web.qo.data.DataExportListQO
;
import
com.gic.haoban.manage.web.vo.content.creative.ContentMaterialVO
;
import
com.gic.marketing.pro.api.dto.clerktask.ClerkTaskPlanDTO
;
import
com.gic.marketing.pro.api.qdto.clerktask.ClerkTaskPageQDTO
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
java.util.List
;
/**
* 数据导出
*/
@Controller
@RequestMapping
(
"data/export"
)
public
class
DataExportController
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
DataExportController
.
class
);
@Autowired
private
DownloadReportService
downloadReportService
;
/**
* 数据导出列表
*/
@RequestMapping
(
"page-data-export"
)
@ResponseBody
public
RestResponse
<
Page
<
DownloadReportDTO
>>
getTaskCount
(
@RequestBody
DataExportListQO
dataExportListQO
)
{
String
enterpriseId
=
dataExportListQO
.
getEnterpriseId
();
String
clerkId
=
dataExportListQO
.
getClerkId
();
DownloadReportQDTQ
downloadReportQDTQ
=
new
DownloadReportQDTQ
();
downloadReportQDTQ
.
setCurrentPage
(
dataExportListQO
.
getPageNum
());
downloadReportQDTQ
.
setPageSize
(
dataExportListQO
.
getPageSize
());
downloadReportQDTQ
.
setEnterpriseId
(
enterpriseId
);
downloadReportQDTQ
.
setApplyClerkId
(
clerkId
);
DateTime
date
=
DateUtil
.
date
();
downloadReportQDTQ
.
setApplyStartTime
(
DateUtil
.
offset
(
date
,
DateField
.
YEAR
,
-
1
));
downloadReportQDTQ
.
setApplyEndTime
(
date
);
downloadReportQDTQ
.
setProjectCode
(
"haoban_new"
);
downloadReportQDTQ
.
setApplyStatus
(
2
);
Page
<
DownloadReportDTO
>
page
=
downloadReportService
.
listDownloadReportByPage
(
downloadReportQDTQ
);
return
RestResponse
.
successResult
(
page
)
;
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/export/ContentMaterialClerkUsedDataHandler.java
0 → 100644
View file @
8e530458
package
com
.
gic
.
haoban
.
manage
.
web
.
export
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.Page
;
import
com.gic.commons.util.DateUtil
;
import
com.gic.enterprise.api.dto.security.DownloadReportDTO
;
import
com.gic.haoban.manage.api.util.notify.NoticeMessageUtil
;
import
com.gic.haoban.manage.web.controller.content.adaptor.MaterialDataAdaptor
;
import
com.gic.haoban.manage.web.qo.content.statistics.MaterialAnalyzeDataQO
;
import
com.gic.haoban.manage.web.vo.content.statistics.MaterialClerkUsedDataVO
;
import
com.gic.web.common.download.DownloadHandlerAbstract
;
import
com.gic.web.common.download.context.Context
;
import
com.google.common.collect.Lists
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.Collections
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Objects
;
@Component
public
class
ContentMaterialClerkUsedDataHandler
extends
DownloadHandlerAbstract
<
MaterialClerkUsedDataVO
>
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
ContentMaterialClerkUsedDataHandler
.
class
);
@Autowired
private
MaterialDataAdaptor
materialDataAdaptor
;
@Override
public
List
<
MaterialClerkUsedDataVO
>
getData
(
Context
context
,
String
searchDataParams
,
Integer
currentPage
)
{
MaterialAnalyzeDataQO
materialStatisticsBaseQO
=
JSON
.
parseObject
(
searchDataParams
,
MaterialAnalyzeDataQO
.
class
);
materialStatisticsBaseQO
.
setPageNum
(
currentPage
);
materialStatisticsBaseQO
.
setPageSize
(
this
.
getPageSize
());
Page
<
MaterialClerkUsedDataVO
>
clerkUsedData
=
materialDataAdaptor
.
queryMaterialClerkUsedData
(
materialStatisticsBaseQO
,
materialStatisticsBaseQO
.
getStoreIdList
());
List
<
MaterialClerkUsedDataVO
>
result
=
clerkUsedData
.
getResult
();
if
(
CollectionUtils
.
isEmpty
(
result
))
{
return
Collections
.
emptyList
();
}
Integer
mallType
=
materialStatisticsBaseQO
.
getMallType
();
if
(
Objects
.
equals
(
mallType
,
0
))
{
result
.
forEach
(
x
->
{
x
.
setConvsUserNum
(
x
.
getOfflineConvsUserNum
());
x
.
setConvsAmt
(
x
.
getOfflineConvsAmt
());
});
}
return
result
;
}
@Override
public
List
<
String
>
getColumns
()
{
return
Lists
.
newArrayList
(
"storeName"
,
"storeCode"
,
"clerkName"
,
"clerkCode"
,
"useMatlDayNum"
,
"useMatlNum"
,
"singleMatlAvgCnt"
,
"convsUserNum"
,
"convsAmt"
);
}
@Override
public
LinkedHashMap
<
String
,
List
<
String
>>
doubleColumnNames
()
{
return
null
;
}
@Override
public
List
<
String
>
getColumnNames
()
{
return
Lists
.
newArrayList
(
"门店名称"
,
"门店code"
,
"导购姓名"
,
"导购code"
,
"使用素材天数"
,
"使用素材数"
,
"单个素材平均使用次数"
,
"转化客户数"
,
"转化金额"
);
}
@Override
public
void
callBack
(
Context
context
,
boolean
success
)
{
if
(
success
)
{
DownloadReportDTO
downloadReportDTO
=
context
.
getDownloadReportDTO
();
String
clerkId
=
downloadReportDTO
.
getApplyClerkId
();
String
enterpriseId
=
downloadReportDTO
.
getEnterpriseId
();
NoticeMessageUtil
.
sendDataExportNotify
(
enterpriseId
,
clerkId
,
downloadReportDTO
.
getReportName
(),
downloadReportDTO
.
getApplyTime
());
}
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/export/ContentMaterialStoreUsedDataHandler.java
0 → 100644
View file @
8e530458
package
com
.
gic
.
haoban
.
manage
.
web
.
export
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.Page
;
import
com.gic.enterprise.api.dto.security.DownloadReportDTO
;
import
com.gic.haoban.manage.api.util.notify.NoticeMessageUtil
;
import
com.gic.haoban.manage.web.controller.content.adaptor.MaterialDataAdaptor
;
import
com.gic.haoban.manage.web.qo.content.statistics.MaterialAnalyzeDataQO
;
import
com.gic.haoban.manage.web.qo.content.statistics.MaterialStoreAnalyzeDataQO
;
import
com.gic.haoban.manage.web.vo.content.statistics.MaterialClerkUsedDataVO
;
import
com.gic.haoban.manage.web.vo.content.statistics.MaterialStoreUsedDataVO
;
import
com.gic.web.common.download.DownloadHandlerAbstract
;
import
com.gic.web.common.download.context.Context
;
import
com.google.common.collect.Lists
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.Collections
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Objects
;
@Component
public
class
ContentMaterialStoreUsedDataHandler
extends
DownloadHandlerAbstract
<
MaterialStoreUsedDataVO
>
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
ContentMaterialStoreUsedDataHandler
.
class
);
@Autowired
private
MaterialDataAdaptor
materialDataAdaptor
;
@Override
public
List
<
MaterialStoreUsedDataVO
>
getData
(
Context
context
,
String
searchDataParams
,
Integer
currentPage
)
{
MaterialStoreAnalyzeDataQO
materialStatisticsBaseQO
=
JSON
.
parseObject
(
searchDataParams
,
MaterialStoreAnalyzeDataQO
.
class
);
materialStatisticsBaseQO
.
setPageNum
(
currentPage
);
materialStatisticsBaseQO
.
setPageSize
(
this
.
getPageSize
());
Page
<
MaterialStoreUsedDataVO
>
storeUsedData
=
materialDataAdaptor
.
queryMaterialStoreUsedData
(
materialStatisticsBaseQO
,
materialStatisticsBaseQO
.
getStoreIdList
());
List
<
MaterialStoreUsedDataVO
>
result
=
storeUsedData
.
getResult
();
if
(
CollectionUtils
.
isEmpty
(
result
))
{
return
Collections
.
emptyList
();
}
Integer
mallType
=
materialStatisticsBaseQO
.
getMallType
();
if
(
Objects
.
equals
(
mallType
,
0
))
{
result
.
forEach
(
x
->
{
x
.
setConvUserNum
(
x
.
getOfflineConvUserNum
());
x
.
setConvSalesNmt
(
x
.
getOfflineConvSalesNmt
());
});
}
return
result
;
}
@Override
public
List
<
String
>
getColumns
()
{
return
Lists
.
newArrayList
(
"storeName"
,
"storeCode"
,
"dayAvgUseRate"
,
"clickUserNum"
,
"convUserNum"
,
"convSalesNmt"
);
}
@Override
public
LinkedHashMap
<
String
,
List
<
String
>>
doubleColumnNames
()
{
return
null
;
}
@Override
public
List
<
String
>
getColumnNames
()
{
return
Lists
.
newArrayList
(
"门店名称"
,
"门店code"
,
"日均使用导购占比"
,
"点击客户数"
,
"转化客户数"
,
"转化金额"
);
}
@Override
public
void
callBack
(
Context
context
,
boolean
success
)
{
if
(
success
)
{
DownloadReportDTO
downloadReportDTO
=
context
.
getDownloadReportDTO
();
String
clerkId
=
downloadReportDTO
.
getApplyClerkId
();
String
enterpriseId
=
downloadReportDTO
.
getEnterpriseId
();
NoticeMessageUtil
.
sendDataExportNotify
(
enterpriseId
,
clerkId
,
downloadReportDTO
.
getReportName
(),
downloadReportDTO
.
getApplyTime
());
}
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/content/ContentMaterialQO.java
View file @
8e530458
...
@@ -3,6 +3,8 @@ package com.gic.haoban.manage.web.qo.content;
...
@@ -3,6 +3,8 @@ package com.gic.haoban.manage.web.qo.content;
import
com.gic.commons.web.qo.PageQo
;
import
com.gic.commons.web.qo.PageQo
;
import
com.gic.content.api.enums.MaterialSearchSceneEnum
;
import
com.gic.content.api.enums.MaterialSearchSceneEnum
;
import
java.util.List
;
/**
/**
* @Author MUSI
* @Author MUSI
* @Date 2022/10/28 1:38 PM
* @Date 2022/10/28 1:38 PM
...
@@ -27,6 +29,11 @@ public class ContentMaterialQO extends PageQo {
...
@@ -27,6 +29,11 @@ public class ContentMaterialQO extends PageQo {
private
String
wxEnterpriseId
;
private
String
wxEnterpriseId
;
/**
/**
* 素材id列表
*/
private
List
<
Long
>
contentMaterialIdList
;
/**
* 门店id
* 门店id
*/
*/
private
String
storeId
;
private
String
storeId
;
...
@@ -118,6 +125,14 @@ public class ContentMaterialQO extends PageQo {
...
@@ -118,6 +125,14 @@ public class ContentMaterialQO extends PageQo {
this
.
wxEnterpriseId
=
wxEnterpriseId
;
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
}
public
List
<
Long
>
getContentMaterialIdList
()
{
return
contentMaterialIdList
;
}
public
void
setContentMaterialIdList
(
List
<
Long
>
contentMaterialIdList
)
{
this
.
contentMaterialIdList
=
contentMaterialIdList
;
}
public
String
getStoreId
()
{
public
String
getStoreId
()
{
return
storeId
;
return
storeId
;
}
}
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/content/statistics/MaterialStatisticsBaseQO.java
View file @
8e530458
...
@@ -7,6 +7,8 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -7,6 +7,8 @@ import org.apache.commons.lang3.StringUtils;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.apache.commons.lang3.time.DateUtils
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
/**
/**
* @Author MUSI
* @Author MUSI
...
@@ -38,6 +40,11 @@ public class MaterialStatisticsBaseQO extends BasePageInfo {
...
@@ -38,6 +40,11 @@ public class MaterialStatisticsBaseQO extends BasePageInfo {
private
String
storeId
;
private
String
storeId
;
/**
/**
* 门店id列表
*/
private
List
<
String
>
storeIdList
;
/**
* 开始时间
* 开始时间
*/
*/
private
String
startDate
;
private
String
startDate
;
...
@@ -55,6 +62,11 @@ public class MaterialStatisticsBaseQO extends BasePageInfo {
...
@@ -55,6 +62,11 @@ public class MaterialStatisticsBaseQO extends BasePageInfo {
private
Integer
storeStatusFilter
;
private
Integer
storeStatusFilter
;
/**
* 0线下 1线上
*/
private
Integer
mallType
;
public
String
getEnterpriseId
()
{
public
String
getEnterpriseId
()
{
return
enterpriseId
;
return
enterpriseId
;
...
@@ -80,6 +92,14 @@ public class MaterialStatisticsBaseQO extends BasePageInfo {
...
@@ -80,6 +92,14 @@ public class MaterialStatisticsBaseQO extends BasePageInfo {
this
.
storeId
=
storeId
;
this
.
storeId
=
storeId
;
}
}
public
List
<
String
>
getStoreIdList
()
{
return
storeIdList
;
}
public
void
setStoreIdList
(
List
<
String
>
storeIdList
)
{
this
.
storeIdList
=
storeIdList
;
}
public
String
getStartDate
()
{
public
String
getStartDate
()
{
if
(
StringUtils
.
isNotBlank
(
this
.
startDate
))
{
if
(
StringUtils
.
isNotBlank
(
this
.
startDate
))
{
return
this
.
startDate
;
return
this
.
startDate
;
...
@@ -140,4 +160,21 @@ public class MaterialStatisticsBaseQO extends BasePageInfo {
...
@@ -140,4 +160,21 @@ public class MaterialStatisticsBaseQO extends BasePageInfo {
return
null
;
return
null
;
}
}
}
}
public
Integer
getMallType
()
{
return
mallType
;
}
public
void
setMallType
(
Integer
mallType
)
{
this
.
mallType
=
mallType
;
}
public
String
getMallDesc
()
{
if
(
Objects
.
equals
(
this
.
mallType
,
0
))
{
return
"线下"
;
}
else
if
(
Objects
.
equals
(
this
.
mallType
,
1
))
{
return
"商城"
;
}
return
""
;
}
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/content/statistics/MaterialTodayDetailDataQO.java
0 → 100644
View file @
8e530458
package
com
.
gic
.
haoban
.
manage
.
web
.
qo
.
content
.
statistics
;
import
lombok.Data
;
import
java.util.HashMap
;
import
java.util.Map
;
@Data
public
class
MaterialTodayDetailDataQO
extends
MaterialStatisticsBaseQO
{
private
static
final
long
serialVersionUID
=
3422937373665522931L
;
/**
* 1企业2门店3导购
*/
private
Integer
dataType
=
1
;
/**
* 排序字段
* 日均使用导购占比
* 转化客户数
*/
private
String
orderByField
;
/**
* asc
* desc
*/
private
String
order
;
public
Map
<
String
,
Integer
>
getFieldsOrder
()
{
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
map
.
put
(
"convUserNum"
,
1
);
map
.
put
(
"convSalesAmt"
,
2
);
map
.
put
(
"offlineConvUserNum"
,
3
);
map
.
put
(
"offlineConvSalesAmt"
,
4
);
map
.
put
(
"clickUserNum"
,
5
);
map
.
put
(
"useMatluserCnt"
,
6
);
map
.
put
(
"useMatlClerkNum"
,
7
);
map
.
put
(
"unusedMatlClerkNum"
,
8
);
return
map
;
}
public
String
getDefaultFields
()
{
return
"useMatluserCnt"
;
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/data/DataExportListQO.java
0 → 100644
View file @
8e530458
package
com
.
gic
.
haoban
.
manage
.
web
.
qo
.
data
;
import
com.gic.commons.web.qo.PageQo
;
import
java.io.Serializable
;
public
class
DataExportListQO
extends
PageQo
implements
Serializable
{
/**
* 导购ID
*/
private
String
clerkId
;
/**
* 企业ID
*/
private
String
enterpriseId
;
public
String
getClerkId
()
{
return
clerkId
;
}
public
void
setClerkId
(
String
clerkId
)
{
this
.
clerkId
=
clerkId
;
}
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/content/ContentMaterialInfoVO.java
View file @
8e530458
...
@@ -4,6 +4,7 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
...
@@ -4,6 +4,7 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import
com.fasterxml.jackson.databind.ser.std.ToStringSerializer
;
import
com.fasterxml.jackson.databind.ser.std.ToStringSerializer
;
import
com.gic.content.api.dto.additional.ContentMaterialAdditionalDTO
;
import
com.gic.content.api.dto.additional.ContentMaterialAdditionalDTO
;
import
com.gic.content.api.dto.ext.ContentMaterialExt
;
import
com.gic.content.api.dto.ext.ContentMaterialExt
;
import
com.gic.content.api.dto.material.ContentMaterialJson
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
java.io.Serializable
;
import
java.io.Serializable
;
...
@@ -43,6 +44,11 @@ public class ContentMaterialInfoVO implements Serializable {
...
@@ -43,6 +44,11 @@ public class ContentMaterialInfoVO implements Serializable {
private
String
materialContent
;
private
String
materialContent
;
/**
/**
* 素材JSON内容
*/
private
ContentMaterialJson
materialJson
;
/**
* 素材类型1图文2纯文字3纯图片4视频5图文/视频6文件7富文本
* 素材类型1图文2纯文字3纯图片4视频5图文/视频6文件7富文本
*/
*/
private
Integer
materialType
;
private
Integer
materialType
;
...
@@ -237,6 +243,14 @@ public class ContentMaterialInfoVO implements Serializable {
...
@@ -237,6 +243,14 @@ public class ContentMaterialInfoVO implements Serializable {
this
.
materialContent
=
materialContent
;
this
.
materialContent
=
materialContent
;
}
}
public
ContentMaterialJson
getMaterialJson
()
{
return
materialJson
;
}
public
void
setMaterialJson
(
ContentMaterialJson
materialJson
)
{
this
.
materialJson
=
materialJson
;
}
public
Integer
getMaterialType
()
{
public
Integer
getMaterialType
()
{
return
materialType
;
return
materialType
;
}
}
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/content/creative/ContentMaterialVO.java
View file @
8e530458
...
@@ -3,6 +3,7 @@ package com.gic.haoban.manage.web.vo.content.creative;
...
@@ -3,6 +3,7 @@ package com.gic.haoban.manage.web.vo.content.creative;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.databind.ser.std.ToStringSerializer
;
import
com.fasterxml.jackson.databind.ser.std.ToStringSerializer
;
import
com.gic.content.api.dto.material.ContentMaterialJson
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -52,6 +53,10 @@ public class ContentMaterialVO extends ContentMaterialConvsVO{
...
@@ -52,6 +53,10 @@ public class ContentMaterialVO extends ContentMaterialConvsVO{
*/
*/
private
String
materialContent
;
private
String
materialContent
;
/**
/**
* 素材JSON内容
*/
private
ContentMaterialJson
materialJson
;
/**
* 素材图片url列表
* 素材图片url列表
*/
*/
private
String
materialImageUrls
;
private
String
materialImageUrls
;
...
@@ -193,6 +198,14 @@ public class ContentMaterialVO extends ContentMaterialConvsVO{
...
@@ -193,6 +198,14 @@ public class ContentMaterialVO extends ContentMaterialConvsVO{
this
.
materialContent
=
materialContent
;
this
.
materialContent
=
materialContent
;
}
}
public
ContentMaterialJson
getMaterialJson
()
{
return
materialJson
;
}
public
void
setMaterialJson
(
ContentMaterialJson
materialJson
)
{
this
.
materialJson
=
materialJson
;
}
public
String
getMaterialImageUrls
()
{
public
String
getMaterialImageUrls
()
{
return
materialImageUrls
;
return
materialImageUrls
;
}
}
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/content/statistics/MaterialRealDataVO.java
View file @
8e530458
...
@@ -26,6 +26,11 @@ public class MaterialRealDataVO implements Serializable {
...
@@ -26,6 +26,11 @@ public class MaterialRealDataVO implements Serializable {
private
Integer
clickUserNum
;
private
Integer
clickUserNum
;
/**
/**
* 使用次数
*/
private
Integer
useMatluserCnt
;
/**
* 转换客户数
* 转换客户数
*/
*/
private
Integer
convUserNum
;
private
Integer
convUserNum
;
...
@@ -82,6 +87,14 @@ public class MaterialRealDataVO implements Serializable {
...
@@ -82,6 +87,14 @@ public class MaterialRealDataVO implements Serializable {
this
.
clickUserNum
=
clickUserNum
;
this
.
clickUserNum
=
clickUserNum
;
}
}
public
Integer
getUseMatluserCnt
()
{
return
useMatluserCnt
;
}
public
void
setUseMatluserCnt
(
Integer
useMatluserCnt
)
{
this
.
useMatluserCnt
=
useMatluserCnt
;
}
public
Integer
getConvUserNum
()
{
public
Integer
getConvUserNum
()
{
return
convUserNum
;
return
convUserNum
;
}
}
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/content/statistics/MaterialRealDetailDataVO.java
0 → 100644
View file @
8e530458
package
com
.
gic
.
haoban
.
manage
.
web
.
vo
.
content
.
statistics
;
import
java.io.Serializable
;
public
class
MaterialRealDetailDataVO
extends
MaterialRealDataVO
implements
Serializable
{
/**
* 门店id
*/
private
String
storeId
;
/**
* 门店code
*/
private
String
storeCode
;
/**
* 门店名称
*/
private
String
storeName
;
/**
* 导购id
*/
private
String
clerkId
;
/**
* 导购名称
*/
private
String
clerkName
;
/**
* 导购code
*/
private
String
clerkCode
;
public
String
getStoreId
()
{
return
storeId
;
}
public
void
setStoreId
(
String
storeId
)
{
this
.
storeId
=
storeId
;
}
public
String
getStoreCode
()
{
return
storeCode
;
}
public
void
setStoreCode
(
String
storeCode
)
{
this
.
storeCode
=
storeCode
;
}
public
String
getStoreName
()
{
return
storeName
;
}
public
void
setStoreName
(
String
storeName
)
{
this
.
storeName
=
storeName
;
}
public
String
getClerkId
()
{
return
clerkId
;
}
public
void
setClerkId
(
String
clerkId
)
{
this
.
clerkId
=
clerkId
;
}
public
String
getClerkName
()
{
return
clerkName
;
}
public
void
setClerkName
(
String
clerkName
)
{
this
.
clerkName
=
clerkName
;
}
public
String
getClerkCode
()
{
return
clerkCode
;
}
public
void
setClerkCode
(
String
clerkCode
)
{
this
.
clerkCode
=
clerkCode
;
}
}
haoban-manage3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
View file @
8e530458
...
@@ -121,6 +121,8 @@
...
@@ -121,6 +121,8 @@
<dubbo:reference
interface=
"com.gic.marketing.pro.api.service.offline.OfflinePreApiService"
id=
"offlinePreApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
interface=
"com.gic.marketing.pro.api.service.offline.OfflinePreApiService"
id=
"offlinePreApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
interface=
"com.gic.enterprise.api.service.AccountService"
id=
"accountService"
/>
<dubbo:reference
interface=
"com.gic.enterprise.api.service.AccountService"
id=
"accountService"
/>
<dubbo:reference
interface=
"com.gic.enterprise.api.service.DownloadReportService"
id=
"downloadReportService"
timeout=
"10000"
/>
<dubbo:reference
interface=
"com.gic.content.api.service.ContentColumnApiService"
id=
"contentColumnApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
interface=
"com.gic.content.api.service.ContentColumnApiService"
id=
"contentColumnApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
interface=
"com.gic.content.api.service.ContentMaterialApiService"
id=
"contentMaterialApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
interface=
"com.gic.content.api.service.ContentMaterialApiService"
id=
"contentMaterialApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
...
...
haoban-manage3-wx/src/main/webapp/WEB-INF/spring-servlet.xml
View file @
8e530458
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"
>
http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"
>
<!-- 扫描注解包路径,多个包用逗号分隔,不填pacakge表示扫描当前ApplicationContext中所有的类 -->
<!-- 扫描注解包路径,多个包用逗号分隔,不填pacakge表示扫描当前ApplicationContext中所有的类 -->
<context:component-scan
base-package=
"com.gic.haoban.*"
/>
<context:component-scan
base-package=
"com.gic.haoban.*
,com.gic.web.common.*
"
/>
<!-- 启动对@AspectJ注解的支持 -->
<!-- 启动对@AspectJ注解的支持 -->
<aop:aspectj-autoproxy
/>
<aop:aspectj-autoproxy
/>
...
...
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