Commit 13cabb11 by songyinghui

feat: 门店code

parent 9e1563b8
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;
/**
......
......@@ -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();
}
......
......@@ -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;
......
......@@ -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));
......
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());
}
}
......@@ -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) ;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment