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
9ac16bb8
Commit
9ac16bb8
authored
Apr 24, 2023
by
songyinghui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bugfix_0424' into 'master'
Bugfix 0424 See merge request
!1205
parents
720c1b9f
7f6227f1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
7 deletions
+40
-7
MaterialReportBuilder.java
...ervice/service/content/adaptor/MaterialReportBuilder.java
+2
-1
QywxGroupMsgTaskApiServiceImpl.java
...out/impl/content/task/QywxGroupMsgTaskApiServiceImpl.java
+13
-6
MaterialDataAdaptor.java
...e/web/controller/content/adaptor/MaterialDataAdaptor.java
+20
-0
MaterialAreaUsedDataVO.java
...age/web/vo/content/statistics/MaterialAreaUsedDataVO.java
+5
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/adaptor/MaterialReportBuilder.java
View file @
9ac16bb8
...
@@ -197,7 +197,8 @@ public class MaterialReportBuilder {
...
@@ -197,7 +197,8 @@ public class MaterialReportBuilder {
articleInfo
.
setAppid
(
config
.
getAppid
());
articleInfo
.
setAppid
(
config
.
getAppid
());
articleInfo
.
setTitle
(
context
.
getMessageTitle
());
articleInfo
.
setTitle
(
context
.
getMessageTitle
());
articleInfo
.
setDescription
(
context
.
getMessageDesc
());
articleInfo
.
setDescription
(
context
.
getMessageDesc
());
articleInfo
.
setPagepath
(
NoticeMessageUtil
.
buildMiniAppUrl
(
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY
,
context
.
extendParams
(
context
.
getMainStoreId
())));
String
extendParams
=
StringUtils
.
isNotBlank
(
context
.
getMainStoreId
())
?
context
.
getMainStoreId
()
:
context
.
getEnterpriseId
();
articleInfo
.
setPagepath
(
NoticeMessageUtil
.
buildMiniAppUrl
(
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY
,
context
.
extendParams
(
extendParams
)));
articleInfo
.
setPicurl
(
context
.
getMaterialReportUrl
());
articleInfo
.
setPicurl
(
context
.
getMaterialReportUrl
());
newsSendMessage
.
setArticleMessages
(
Collections
.
singletonList
(
articleInfo
));
newsSendMessage
.
setArticleMessages
(
Collections
.
singletonList
(
articleInfo
));
return
newsSendMessage
;
return
newsSendMessage
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/content/task/QywxGroupMsgTaskApiServiceImpl.java
View file @
9ac16bb8
...
@@ -110,14 +110,14 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic
...
@@ -110,14 +110,14 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic
*/
*/
@Override
@Override
public
ServiceResponse
<
Void
>
handlerMaterialWeekReport
(
String
params
)
{
public
ServiceResponse
<
Void
>
handlerMaterialWeekReport
(
String
params
)
{
log
.
info
(
"handlerMaterialWeekReport 执行素材周报任务开始 >>>>>
{}"
,
DateUtil
.
datetimeToString
(
new
Date
()));
log
.
info
(
"handlerMaterialWeekReport 执行素材周报任务开始 >>>>>
params:{} date: {}"
,
params
,
DateUtil
.
datetimeToString
(
new
Date
()));
Date
now
=
new
Date
();
Date
now
=
new
Date
();
Week
week
=
cn
.
hutool
.
core
.
date
.
DateUtil
.
dayOfWeekEnum
(
now
);
Week
week
=
cn
.
hutool
.
core
.
date
.
DateUtil
.
dayOfWeekEnum
(
now
);
if
(!
Week
.
MONDAY
.
equals
(
week
))
{
if
(!
Week
.
MONDAY
.
equals
(
week
))
{
log
.
info
(
"handlerMaterialWeekReport 当前时间 不是周一 忽略 》》》
{}"
,
DateUtil
.
datetimeToString
(
new
Date
()));
log
.
info
(
"handlerMaterialWeekReport 当前时间 不是周一 忽略 》》》
params:{}, date:{}"
,
params
,
DateUtil
.
datetimeToString
(
new
Date
()));
return
ServiceResponse
.
success
();
return
ServiceResponse
.
success
();
}
}
return
doHandlerReportInner
(
MaterialReportType
.
WEEK
.
getCode
());
return
doHandlerReportInner
(
MaterialReportType
.
WEEK
.
getCode
()
,
params
);
}
}
/**
/**
...
@@ -129,7 +129,7 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic
...
@@ -129,7 +129,7 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic
@Override
@Override
public
ServiceResponse
<
Void
>
handlerMaterialMonthReport
(
String
params
)
{
public
ServiceResponse
<
Void
>
handlerMaterialMonthReport
(
String
params
)
{
log
.
info
(
"handlerMaterialWeekReport 执行素材月报任务开始 >>>>> {}"
,
DateUtil
.
datetimeToString
(
new
Date
()));
log
.
info
(
"handlerMaterialWeekReport 执行素材月报任务开始 >>>>> {}"
,
DateUtil
.
datetimeToString
(
new
Date
()));
return
doHandlerReportInner
(
MaterialReportType
.
MONTH
.
getCode
());
return
doHandlerReportInner
(
MaterialReportType
.
MONTH
.
getCode
()
,
params
);
}
}
/**
/**
...
@@ -138,13 +138,20 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic
...
@@ -138,13 +138,20 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic
* @param reportType
* @param reportType
* @return
* @return
*/
*/
private
ServiceResponse
<
Void
>
doHandlerReportInner
(
Integer
reportType
)
{
private
ServiceResponse
<
Void
>
doHandlerReportInner
(
Integer
reportType
,
String
params
)
{
List
<
String
>
enterpriseIds
=
groupMessageService
.
hasMaterialRightEnterprise
(
MaterialEnterpriseAdaptor
.
MaterialLevel
.
LOW
.
getCode
());
List
<
String
>
enterpriseIds
=
groupMessageService
.
hasMaterialRightEnterprise
(
MaterialEnterpriseAdaptor
.
MaterialLevel
.
LOW
.
getCode
());
if
(
CollectionUtils
.
isEmpty
(
enterpriseIds
))
{
if
(
CollectionUtils
.
isEmpty
(
enterpriseIds
))
{
return
ServiceResponse
.
success
();
return
ServiceResponse
.
success
();
}
}
for
(
String
enterpriseId
:
enterpriseIds
)
{
for
(
String
enterpriseId
:
enterpriseIds
)
{
if
(
StringUtils
.
isNotBlank
(
params
)
&&
!
StringUtils
.
equals
(
"-1"
,
params
))
{
log
.
info
(
"执行指定企业的数据 {}"
,
params
);
if
(!
StringUtils
.
equals
(
params
,
enterpriseId
))
{
log
.
info
(
"企业{}非目标企业,忽略"
,
enterpriseId
);
continue
;
}
}
List
<
String
>
wxEnterpriseIds
=
wxEnterpriseService
.
queryWxEnterpriseWithEnterpriseId
(
enterpriseId
);
List
<
String
>
wxEnterpriseIds
=
wxEnterpriseService
.
queryWxEnterpriseWithEnterpriseId
(
enterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
wxEnterpriseIds
))
{
if
(
CollectionUtils
.
isEmpty
(
wxEnterpriseIds
))
{
log
.
info
(
"企业 {}未关联企微"
,
enterpriseId
);
log
.
info
(
"企业 {}未关联企微"
,
enterpriseId
);
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/content/adaptor/MaterialDataAdaptor.java
View file @
9ac16bb8
...
@@ -6,6 +6,8 @@ import cn.hutool.core.date.DateUtil;
...
@@ -6,6 +6,8 @@ import cn.hutool.core.date.DateUtil;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
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.MaterialReportQO
;
import
com.gic.haoban.manage.web.qo.content.statistics.MaterialReportQO
;
import
com.gic.haoban.manage.web.utils.target.DataTargetHttpUtils
;
import
com.gic.haoban.manage.web.utils.target.DataTargetHttpUtils
;
...
@@ -19,6 +21,7 @@ import com.gic.haoban.manage.web.vo.content.statistics.report.MaterialPersonalUs
...
@@ -19,6 +21,7 @@ import com.gic.haoban.manage.web.vo.content.statistics.report.MaterialPersonalUs
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.Collections
;
import
java.util.Collections
;
...
@@ -87,6 +90,9 @@ public class MaterialDataAdaptor {
...
@@ -87,6 +90,9 @@ public class MaterialDataAdaptor {
*/
*/
private
static
final
String
MEMBER_RECENTLY_30_DAY_VISIT
=
"data_matl_haoban_user_30day_stats_real"
;
private
static
final
String
MEMBER_RECENTLY_30_DAY_VISIT
=
"data_matl_haoban_user_30day_stats_real"
;
@Autowired
private
EnterpriseService
enterpriseService
;
/**
/**
* 查询素材首页使用数据
* 查询素材首页使用数据
...
@@ -409,6 +415,17 @@ public class MaterialDataAdaptor {
...
@@ -409,6 +415,17 @@ public class MaterialDataAdaptor {
endTime
=
DateUtil
.
endOfMonth
(
DateUtil
.
lastMonth
());
endTime
=
DateUtil
.
endOfMonth
(
DateUtil
.
lastMonth
());
apolloKey
=
MATERIAL_AREA_MONTH_DATA
;
apolloKey
=
MATERIAL_AREA_MONTH_DATA
;
}
}
EnterpriseDTO
enterpriseDTO
=
enterpriseService
.
getEnterpriseById
(
enterpriseId
);
if
(
enterpriseDTO
==
null
)
{
MaterialAreaUsedDataVO
materialAreaUsedDataVO
=
new
MaterialAreaUsedDataVO
();
materialAreaUsedDataVO
.
setStartTime
(
startTime
);
materialAreaUsedDataVO
.
setEndTime
(
endTime
);
log
.
info
(
"企业{}不存在"
,
enterpriseId
);
return
materialAreaUsedDataVO
;
}
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
inlineParams
=
new
HashMap
<>();
Map
<
String
,
Object
>
inlineParams
=
new
HashMap
<>();
params
.
put
(
"inFields"
,
inlineParams
);
params
.
put
(
"inFields"
,
inlineParams
);
...
@@ -425,6 +442,7 @@ public class MaterialDataAdaptor {
...
@@ -425,6 +442,7 @@ public class MaterialDataAdaptor {
MaterialAreaUsedDataVO
materialAreaUsedDataVO
=
new
MaterialAreaUsedDataVO
();
MaterialAreaUsedDataVO
materialAreaUsedDataVO
=
new
MaterialAreaUsedDataVO
();
materialAreaUsedDataVO
.
setStartTime
(
startTime
);
materialAreaUsedDataVO
.
setStartTime
(
startTime
);
materialAreaUsedDataVO
.
setEndTime
(
endTime
);
materialAreaUsedDataVO
.
setEndTime
(
endTime
);
materialAreaUsedDataVO
.
setBrandName
(
enterpriseDTO
.
getBrandName
());
return
materialAreaUsedDataVO
;
return
materialAreaUsedDataVO
;
}
}
List
<
JSONObject
>
jsonObjects
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
result
.
get
(
"data"
)),
JSONObject
.
class
);
List
<
JSONObject
>
jsonObjects
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
result
.
get
(
"data"
)),
JSONObject
.
class
);
...
@@ -432,6 +450,7 @@ public class MaterialDataAdaptor {
...
@@ -432,6 +450,7 @@ public class MaterialDataAdaptor {
MaterialAreaUsedDataVO
materialAreaUsedDataVO
=
new
MaterialAreaUsedDataVO
();
MaterialAreaUsedDataVO
materialAreaUsedDataVO
=
new
MaterialAreaUsedDataVO
();
materialAreaUsedDataVO
.
setStartTime
(
startTime
);
materialAreaUsedDataVO
.
setStartTime
(
startTime
);
materialAreaUsedDataVO
.
setEndTime
(
endTime
);
materialAreaUsedDataVO
.
setEndTime
(
endTime
);
materialAreaUsedDataVO
.
setBrandName
(
enterpriseDTO
.
getBrandName
());
return
materialAreaUsedDataVO
;
return
materialAreaUsedDataVO
;
}
}
List
<
MaterialAreaUsedDataVO
>
areaUsedDataVOS
=
jsonObjects
.
stream
()
List
<
MaterialAreaUsedDataVO
>
areaUsedDataVOS
=
jsonObjects
.
stream
()
...
@@ -446,6 +465,7 @@ public class MaterialDataAdaptor {
...
@@ -446,6 +465,7 @@ public class MaterialDataAdaptor {
MaterialAreaUsedDataVO
materialAreaUsedDataVO
=
areaUsedDataVOS
.
get
(
0
);
MaterialAreaUsedDataVO
materialAreaUsedDataVO
=
areaUsedDataVOS
.
get
(
0
);
materialAreaUsedDataVO
.
setStartTime
(
startTime
);
materialAreaUsedDataVO
.
setStartTime
(
startTime
);
materialAreaUsedDataVO
.
setEndTime
(
endTime
);
materialAreaUsedDataVO
.
setEndTime
(
endTime
);
materialAreaUsedDataVO
.
setBrandName
(
enterpriseDTO
.
getBrandName
());
return
materialAreaUsedDataVO
;
return
materialAreaUsedDataVO
;
}
}
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/content/statistics/MaterialAreaUsedDataVO.java
View file @
9ac16bb8
...
@@ -96,4 +96,9 @@ public class MaterialAreaUsedDataVO implements Serializable {
...
@@ -96,4 +96,9 @@ public class MaterialAreaUsedDataVO implements Serializable {
* 结束时间
* 结束时间
*/
*/
private
Date
endTime
;
private
Date
endTime
;
/**
* 品牌名称
*/
private
String
brandName
;
}
}
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