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
13cabb11
Commit
13cabb11
authored
Apr 02, 2023
by
songyinghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 门店code
parent
9e1563b8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
8 deletions
+32
-8
TabHaobanInteractRecord.java
...anage/service/entity/content/TabHaobanInteractRecord.java
+6
-2
MaterialReportContext.java
...ervice/pojo/bo/content/context/MaterialReportContext.java
+4
-3
MaterialReportBuilder.java
...ervice/service/content/adaptor/MaterialReportBuilder.java
+1
-1
MaterialReportServiceImpl.java
...rvice/service/content/impl/MaterialReportServiceImpl.java
+1
-0
MaterialReportServiceTest.java
...age3-service/src/test/java/MaterialReportServiceTest.java
+19
-2
WxStaffController.java
...m/gic/haoban/manage/web/controller/WxStaffController.java
+1
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/content/TabHaobanInteractRecord.java
View file @
13cabb11
package
com
.
gic
.
haoban
.
manage
.
service
.
entity
.
content
;
import
com.gic.haoban.manage.api.enums.content.TriggerCustomerChannelType
;
import
java.util.Date
;
import
java.io.Serializable
;
...
...
@@ -44,11 +46,13 @@ public class TabHaobanInteractRecord implements Serializable {
*/
private
String
storeId
;
/**
* 线索来源 1朋友圈; 2客户群; 3 对话框; 0其他
* 线索来源 1朋友圈; 2客户群; 3 对话框; 4 复制文案; 5 下载素材
* @see TriggerCustomerChannelType
*/
private
Integer
channelSource
;
/**
* 事件类型 1浏览商品;2浏览并点击; 3浏览并查看; 4 浏览并购买; 5查看并购买
* 事件类型 1浏览素材;2浏览商品; 3 购买商品
* @see com.gic.haoban.manage.api.enums.content.MaterialInteractRecordEventType
*/
private
Integer
eventType
;
/**
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/bo/content/context/MaterialReportContext.java
View file @
13cabb11
...
...
@@ -119,7 +119,7 @@ public class MaterialReportContext {
noticeMessageBO
.
setDescription
(
this
.
getMessageDesc
());
noticeMessageBO
.
setEnterpriseId
(
this
.
enterpriseId
);
noticeMessageBO
.
setRelationId
(
this
.
clerkId
);
noticeMessageBO
.
setMessageContent
(
this
.
extendParams
());
noticeMessageBO
.
setMessageContent
(
this
.
extendParams
(
item
.
getStoreId
()
));
return
noticeMessageBO
;
})
.
collect
(
Collectors
.
toList
());
...
...
@@ -151,10 +151,11 @@ public class MaterialReportContext {
return
String
.
format
(
month_desc
,
monthBeginStr
,
monthEndStr
);
}
public
String
extendParams
()
{
public
String
extendParams
(
String
storeId
)
{
JSONObject
params
=
new
JSONObject
();
params
.
put
(
"clerkId"
,
this
.
clerkId
);
params
.
put
(
"storeId"
,
this
.
mainStoreId
);
params
.
put
(
"storeId"
,
storeId
);
params
.
put
(
"reportTYpe"
,
this
.
reportType
);
return
params
.
toJSONString
();
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/adaptor/MaterialReportBuilder.java
View file @
13cabb11
...
...
@@ -153,7 +153,7 @@ public class MaterialReportBuilder {
articleInfo
.
setAppid
(
config
.
getAppid
());
articleInfo
.
setTitle
(
context
.
getMessageTitle
());
articleInfo
.
setDescription
(
context
.
getMessageDesc
());
articleInfo
.
setPagepath
(
NoticeMessageUtil
.
buildMiniAppUrl
(
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY
,
context
.
extendParams
()));
articleInfo
.
setPagepath
(
NoticeMessageUtil
.
buildMiniAppUrl
(
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY
,
context
.
extendParams
(
context
.
getMainStoreId
()
)));
articleInfo
.
setPicurl
(
context
.
getMaterialReportUrl
());
newsSendMessage
.
setArticleMessages
(
Collections
.
singletonList
(
articleInfo
));
return
newsSendMessage
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/impl/MaterialReportServiceImpl.java
View file @
13cabb11
...
...
@@ -89,6 +89,7 @@ public class MaterialReportServiceImpl implements MaterialReportService {
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
staffInfo
.
getWxEnterpriseId
());
QywxNewsSendMessageDTO
newsSendMessageDTO
=
materialReportBuilder
.
buildQywxNewsMessage
(
context
,
qwDTO
);
if
(
newsSendMessageDTO
==
null
)
{
log
.
info
(
"构建企业应用消息异常 {}"
);
return
;
}
log
.
info
(
"发送企业图文消息参数{}"
,
JSON
.
toJSONString
(
newsSendMessageDTO
));
...
...
haoban-manage3-service/src/test/java/MaterialReportServiceTest.java
View file @
13cabb11
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum
;
import
com.gic.haoban.manage.api.enums.content.MaterialReportType
;
import
com.gic.haoban.manage.api.service.content.task.QywxGroupMsgTaskApiService
;
import
com.gic.haoban.manage.api.util.notify.NoticeMessageUtil
;
import
com.gic.haoban.manage.service.dao.mapper.content.TabHaobanInteractRecordMapper
;
import
com.gic.haoban.manage.service.entity.content.TabHaobanInteractRecord
;
import
com.gic.haoban.manage.service.service.content.MaterialReportService
;
...
...
@@ -22,8 +25,8 @@ import java.util.List;
* @Version
**/
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@ContextConfiguration
(
locations
=
{
"classpath:applicationContext-conf.xml"
})
//
@RunWith(SpringJUnit4ClassRunner.class)
//
@ContextConfiguration(locations = {"classpath:applicationContext-conf.xml"})
public
class
MaterialReportServiceTest
{
public
MaterialReportServiceTest
(){
...
...
@@ -50,6 +53,7 @@ public class MaterialReportServiceTest {
@Test
public
void
weekReport
(){
qywxGroupMsgTaskApiService
.
handlerMaterialMonthReport
(
""
);
qywxGroupMsgTaskApiService
.
handlerMaterialWeekReport
(
""
);
}
@Test
...
...
@@ -75,4 +79,17 @@ public class MaterialReportServiceTest {
List
<
TabHaobanInteractRecord
>
tabHaobanInteractRecords
=
interactRecordMapper
.
queryAllByLimit
(
temp
);
System
.
out
.
println
(
JSON
.
toJSONString
(
tabHaobanInteractRecords
));
}
@Test
public
void
urlTest
(){
JSONObject
params
=
new
JSONObject
();
//params.put("clerkId", "300b60c7f8874ca2b9cc696ad6b6a480");
params
.
put
(
"s"
,
"ff8080816e216c04016e34294282004a"
);
params
.
put
(
"t"
,
1
);
String
s
=
params
.
toJSONString
();
String
s1
=
NoticeMessageUtil
.
buildMiniAppUrl
(
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY
,
s
);
System
.
out
.
println
(
"/pages/route/index?pageType=hbapp_material_report&data="
.
length
());
System
.
out
.
println
(
s1
);
System
.
out
.
println
(
s1
.
length
());
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/WxStaffController.java
View file @
13cabb11
...
...
@@ -1614,6 +1614,7 @@ public class WxStaffController extends WebBaseController {
StoreListVO
vo
=
new
StoreListVO
();
vo
.
setStoreId
(
store
.
getStoreId
());
vo
.
setStoreName
(
store
.
getStoreName
());
vo
.
setStoreCode
(
store
.
getStoreCode
());
voList
.
add
(
vo
)
;
}
}
...
...
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