Commit f8b68b16 by 王祖波

商品组分享销售线索

parent 695350c4
......@@ -49,6 +49,11 @@ public class InteractRecordInfoDTO implements Serializable {
private Integer channelSource;
/**
* 分享使用的业务来源 -1其他1意向客户2智能选款3连单推荐
*/
private Integer shareSource;
/**
* 记录事件类型
* 1浏览素材;2 查看商品; 3 购买商品
* 通过此类型区分 弹窗提示
......@@ -162,6 +167,14 @@ public class InteractRecordInfoDTO implements Serializable {
this.channelSource = channelSource;
}
public Integer getShareSource() {
return shareSource;
}
public void setShareSource(Integer shareSource) {
this.shareSource = shareSource;
}
public Integer getVisitGoodsNum() {
return visitGoodsNum;
}
......
......@@ -9,10 +9,10 @@ package com.gic.haoban.manage.api.enums.content;
**/
public enum MaterialInteractRecordEventType {
VISIT_MATERIAL(1, "浏览了你分享的%s"),
VISIT_PRODUCT(2, "浏览了你分享的%s,并查看了关联商品"),
ORDER(3, "浏览了你分享的%s,并购买了商品"),
ADD_SHOPPING_CART(4, "浏览你分享的%s,并加入了购物车");
VISIT_MATERIAL(1, "浏览了你%s分享的%s"),
VISIT_PRODUCT(2, "浏览了你%s分享的%s,并查看了关联商品"),
ORDER(3, "浏览了你%s分享的%s,并购买了商品"),
ADD_SHOPPING_CART(4, "浏览你%s分享的%s,并加入了购物车");
MaterialInteractRecordEventType(Integer code, String desc) {
this.code = code;
......
......@@ -10,7 +10,9 @@ package com.gic.haoban.manage.api.enums.content;
public enum ShareBizType {
MATERIAL(1, "素材"),
GOODS(2, "商品");
GOODS(2, "商品"),
MULTIPLE_GOODS(3, "多商品页面");
ShareBizType(Integer code, String desc) {
this.code = code;
this.desc = desc;
......
package com.gic.haoban.manage.api.enums.content;
import java.util.Objects;
public enum ShareCustomerSourceType {
OTHER(-1, "其他"),
INTENT_CUSTOMER(1, "意向客户"),
SMART_SELECTION(2, "智能选款"),
LINKED_ORDER_RECOMMENDATION(3, "连单推荐");
public static ShareCustomerSourceType getInstance(Integer code) {
for (ShareCustomerSourceType shareCustomerSourceType : values()) {
if (shareCustomerSourceType.code.equals(code)) {
return shareCustomerSourceType;
}
}
return null;
}
public static String getDesc(Integer code) {
for (ShareCustomerSourceType shareCustomerSourceType : values()) {
if (Objects.equals(code, ShareCustomerSourceType.OTHER.code)) {
return "";
}
if (shareCustomerSourceType.code.equals(code)) {
return shareCustomerSourceType.getDesc();
}
}
return "";
}
ShareCustomerSourceType(Integer code, String desc) {
this.code = code;
this.desc = desc;
}
private Integer code;
private String desc;
public Integer getCode() {
return code;
}
public String getDesc() {
return desc;
}
}
......@@ -17,6 +17,7 @@ public enum TriggerCustomerChannelType {
DIALOG_BOX(3, "对话框"),
CONTENT_COPY(4, "复制文案"),
CONTENT_DOWNLOAD(5, "下载素材"),
@Deprecated
RECOMMEND(6, "发送给潜客")
;
......
......@@ -51,6 +51,11 @@ public class TabHaobanInteractRecord implements Serializable {
*/
private Integer channelSource;
/**
* 分享使用的业务来源 -1其他1意向客户2智能选款3连单推荐
* @see com.gic.haoban.manage.api.enums.content.ShareCustomerSourceType
*/
private Integer shareSource;
/**
* 事件类型 1浏览素材;2浏览商品; 3 购买商品
* @see com.gic.haoban.manage.api.enums.content.MaterialInteractRecordEventType
*/
......@@ -164,6 +169,14 @@ public class TabHaobanInteractRecord implements Serializable {
this.channelSource = channelSource;
}
public Integer getShareSource() {
return shareSource;
}
public void setShareSource(Integer shareSource) {
this.shareSource = shareSource;
}
public Integer getEventType() {
return eventType;
}
......
......@@ -49,6 +49,11 @@ public class TabHaobanPotentialCustomer implements Serializable {
*/
private Integer channelSource;
/**
* 分享使用的业务来源 -1其他1意向客户2智能选款3连单推荐
* @see com.gic.haoban.manage.api.enums.content.ShareCustomerSourceType
*/
private Integer shareSource;
/**
* 事件类型 1访问素材;2访问商品; 3购买商品;
*/
private Integer eventType;
......
......@@ -50,6 +50,10 @@ public class InteractRecordBO {
*/
private Integer channelSource;
/**
* 分享使用的业务来源 -1其他1意向客户2智能选款3连单推荐
*/
private Integer shareSource;
/**
* 事件类型 1浏览商品;2浏览并点击; 3浏览并查看; 4 浏览并购买; 5查看并购买
*/
private Integer eventType;
......
......@@ -37,11 +37,31 @@ public class InteractRecordExtendInfoBO implements Serializable {
*/
private List<String> goodsIds;
/**
* 分享的商品组id
*/
private List<List<String>> groupGoodsIds;
/**
* 按组分享素材扩展商品信息
*/
private List<List<ExtendGoodsInfo>> groupExtendGoodsInfos;
/**
* 按组分享失效商品数量
*/
private Integer groupInvalidGoodsNum;
@Data
public static class ExtendGoodsInfo implements Serializable {
/**
* 商品id
*/
private String goodsId;
/**
* 商品名称
*/
private String goodsName;
......
......@@ -47,6 +47,11 @@ public class PotentialCustomerBO {
*/
private Integer channelSource;
/**
* 分享使用的业务来源 -1其他1意向客户2智能选款3连单推荐
* @see com.gic.haoban.manage.api.enums.content.ShareCustomerSourceType
*/
private Integer shareSource;
/**
* 事件类型 1访问素材;2访问商品; 3购买商品;
*/
private Integer eventType;
......
......@@ -49,6 +49,8 @@ public class InteractRecordMessageContext {
if (StringUtils.isNotBlank(interactRecordMessageBO.getMaterialId())
&& NumberUtils.isDigits(interactRecordMessageBO.getMaterialId())) {
return ShareBizType.MATERIAL.getCode();
} else if (StringUtils.isNotBlank(interactRecordMessageBO.getWxaLinkId())) {
return ShareBizType.MULTIPLE_GOODS.getCode();
}
return ShareBizType.GOODS.getCode();
}
......@@ -61,6 +63,9 @@ public class InteractRecordMessageContext {
if (ShareBizType.GOODS.getCode().equals(bizType)) {
return interactRecordMessageBO.getGoodsId();
}
if (ShareBizType.MULTIPLE_GOODS.getCode().equals(bizType)) {
return interactRecordMessageBO.getWxaLinkId();
}
return StringUtils.EMPTY;
}
......@@ -116,6 +121,7 @@ public class InteractRecordMessageContext {
temp.setClerkId(this.interactRecordMessageBO.getClerkId());
temp.setStoreId(this.interactRecordMessageBO.getStoreId());
temp.setChannelSource(this.interactRecordMessageBO.getChannelSource());
temp.setShareSource(this.interactRecordMessageBO.getShareSource());
temp.setEventType(this.interactRecordMessageBO.getEventType());
Integer durationTime = Optional.ofNullable(this.interactRecordMessageBO.getDurationTime()).orElse(0);
temp.setDurationTime(durationTime / 1000);
......
......@@ -3,7 +3,6 @@ package com.gic.haoban.manage.service.pojo.bo.content.message;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Author MUSI
......@@ -45,6 +44,11 @@ public class InteractRecordMessageBO implements Serializable {
*/
private Integer channelSource;
/**
* 分享使用的业务来源 -1其他1意向客户2智能选款3连单推荐
* @see com.gic.haoban.manage.api.enums.content.ShareCustomerSourceType
*/
private Integer shareSource;
/**
* 事件类型 1浏览素材;2查看商品; 3购买商品 4 加入购物车
*/
private Integer eventType;
......@@ -69,6 +73,11 @@ public class InteractRecordMessageBO implements Serializable {
private String goodsId;
/**
* 中转页id
*/
private String wxaLinkId;
/**
* 是否是微盟商品
* true 是
* false 否
......
......@@ -48,6 +48,11 @@ public class PotentialCustomerMessageBO {
*/
private Integer channelSource;
/**
* 分享使用的业务来源 -1其他1意向客户2智能选款3连单推荐
* @see com.gic.haoban.manage.api.enums.content.ShareCustomerSourceType
*/
private Integer shareSource;
/**
* 事件类型 1访问素材;2访问商品; 3购买商品;
*/
private Integer eventType;
......
......@@ -5,6 +5,7 @@ import com.alibaba.fastjson.TypeReference;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.haoban.manage.api.enums.content.MaterialInteractRecordEventType;
import com.gic.haoban.manage.api.enums.content.ShareBizType;
import com.gic.haoban.manage.api.enums.content.ShareCustomerSourceType;
import com.gic.haoban.manage.api.enums.content.TriggerCustomerChannelType;
import com.gic.haoban.manage.service.entity.content.TabHaobanInteractRecord;
import com.gic.haoban.manage.service.pojo.bo.content.InteractRecordBO;
......@@ -21,11 +22,8 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
......@@ -52,7 +50,7 @@ public class InteractRecordBuilder {
* @return
*/
public String buildDesc(TabHaobanInteractRecord interactRecord) {
return this.buildDesc(interactRecord.getChannelSource(), interactRecord.getEventType(), interactRecord.getBizType());
return this.buildDesc(interactRecord.getChannelSource(), interactRecord.getShareSource(),interactRecord.getEventType(), interactRecord.getBizType());
}
/**
......@@ -62,7 +60,7 @@ public class InteractRecordBuilder {
* @param eventType
* @return
*/
public String buildDesc(Integer channelSource, Integer eventType, Integer bizType) {
public String buildDesc(Integer channelSource, Integer shareSource,Integer eventType, Integer bizType) {
StringBuilder stringBuilder = new StringBuilder();
if (TriggerCustomerChannelType.showDescChannel().contains(channelSource)) {
TriggerCustomerChannelType channelType = TriggerCustomerChannelType.getInstance(channelSource);
......@@ -72,7 +70,9 @@ public class InteractRecordBuilder {
}
MaterialInteractRecordEventType instance = MaterialInteractRecordEventType.getInstance(eventType);
if (instance != null) {
String text = String.format(instance.getDesc(), ShareBizType.getDescWithCode(bizType));
String shareSourceMessage = shareSource != null && StringUtils.isNotBlank(ShareCustomerSourceType.getDesc(shareSource)) ?
"使用" + ShareCustomerSourceType.getDesc(shareSource) : "";
String text = String.format(instance.getDesc(), ShareBizType.getDescWithCode(bizType), shareSourceMessage);
if (MaterialInteractRecordEventType.VISIT_PRODUCT.getCode().equals(eventType) && ShareBizType.GOODS.getCode().equals(bizType)) {
text = "浏览了你分享的商品";
}
......@@ -106,7 +106,27 @@ public class InteractRecordBuilder {
});
if (MaterialInteractRecordEventType.VISIT_PRODUCT.getCode().equals(interactRecord.getEventType())
|| MaterialInteractRecordEventType.ADD_SHOPPING_CART.getCode().equals(interactRecord.getEventType())
|| MaterialInteractRecordEventType.ORDER.getCode().equals(interactRecord.getEventType())) {
|| MaterialInteractRecordEventType.ORDER.getCode().equals(interactRecord.getEventType())
|| MaterialInteractRecordEventType.VISIT_MATERIAL.getCode().equals(interactRecord.getEventType())) {
List<List<String>> groupGoodsIds = extendInfo.getGroupGoodsIds();
// 组装商品组数据
if (CollectionUtils.isNotEmpty(groupGoodsIds)) {
List<String> groupGoodsIdList = groupGoodsIds.stream().flatMap(Collection::stream).collect(Collectors.toList());
List<InteractRecordExtendInfoBO.ExtendGoodsInfo> extendGoodsInfos =
this.convertGoodsInfo(groupGoodsIdList, interactRecord.getEnterpriseId());
if (CollectionUtils.isNotEmpty(extendGoodsInfos)) {
Map<String, InteractRecordExtendInfoBO.ExtendGoodsInfo> goodsInfoMap = extendGoodsInfos.stream()
.collect(Collectors.toMap(InteractRecordExtendInfoBO.ExtendGoodsInfo::getGoodsId, Function.identity(),(e,x)->e));
List<List<InteractRecordExtendInfoBO.ExtendGoodsInfo>> groupExtendGoodsInfos = groupGoodsIds.stream()
.map(group -> group.stream()
.map(goodsInfoMap::get)
.filter(Objects::nonNull)
.collect(Collectors.toList()))
.collect(Collectors.toList());
extendInfo.setGroupExtendGoodsInfos(groupExtendGoodsInfos);
extendInfo.setGroupInvalidGoodsNum(groupGoodsIdList.size() - extendGoodsInfos.size());
}
}
// 浏览商品事件
List<String> visitGoodsIds = extendInfo.getGoodsIds();
if (CollectionUtils.isEmpty(visitGoodsIds)) {
......@@ -157,6 +177,7 @@ public class InteractRecordBuilder {
.filter(item -> !excludeStatus.contains(item.getStatus()))
.map(item -> {
InteractRecordExtendInfoBO.ExtendGoodsInfo extendGoodsInfo = new InteractRecordExtendInfoBO.ExtendGoodsInfo();
extendGoodsInfo.setGoodsId(item.getGoodsId());
extendGoodsInfo.setGoodsName(item.getGoodsName());
extendGoodsInfo.setGoodsCode(item.getGoodsCode());
extendGoodsInfo.setGoodsImageUrl(item.getGoodsImageUrl());
......
......@@ -229,6 +229,7 @@ public class InteractRecordMessageBuilder {
.stream()
.map(item -> {
InteractRecordExtendInfoBO.ExtendGoodsInfo goodsInfo = new InteractRecordExtendInfoBO.ExtendGoodsInfo();
goodsInfo.setGoodsId(item.getMallProId());
goodsInfo.setGoodsCode(item.getProCode());
goodsInfo.setGoodsName(item.getMallProName());
goodsInfo.setOrderNum(item.getMallProNumber().intValue());
......@@ -268,6 +269,7 @@ public class InteractRecordMessageBuilder {
List<InteractRecordExtendInfoBO.ExtendGoodsInfo> extendGoodsInfos = new ArrayList<>();
for (EorderItemDTO eorderItemDTO : eorderDTO.getItem()) {
InteractRecordExtendInfoBO.ExtendGoodsInfo extendGoodsInfo = new InteractRecordExtendInfoBO.ExtendGoodsInfo();
extendGoodsInfo.setGoodsId(eorderItemDTO.getGoodsId());
extendGoodsInfo.setGoodsName(eorderItemDTO.getGoodsTitle());
extendGoodsInfo.setGoodsImageUrl(eorderItemDTO.getImageUrl());
extendGoodsInfo.setGoodsCode(eorderItemDTO.getGoodsCode());
......
......@@ -72,6 +72,8 @@ public class MessageConvertHelper {
String shareMaterialChannel = cuspJson.getString("share_material_channel");
interactRecordMessageBO.setChannelSource(this.convertChannelSource(shareMaterialChannel));
String shareSource = cuspJson.getString("share_source");
interactRecordMessageBO.setShareSource(this.convertShareSource(shareSource));
String eventCode = jsonObject.getString("event_code");
interactRecordMessageBO.setEventType(this.convertEventType(eventCode));
......@@ -82,6 +84,8 @@ public class MessageConvertHelper {
interactRecordMessageBO.setGoodsChannel(goodsChannel);
String goodsId = cuspJson.getString("goods_id");
interactRecordMessageBO.setGoodsId(goodsId);
String wxaLinkId = cuspJson.getString("wxa_link_id");
interactRecordMessageBO.setWxaLinkId(wxaLinkId);
String goodsCode = cuspJson.getString("goods_code");
interactRecordMessageBO.setGoodsCode(goodsCode);
String goodsName = cuspJson.getString("goods_name");
......@@ -130,6 +134,26 @@ public class MessageConvertHelper {
}
}
private Integer convertShareSource(String shareSource) {
if (StringUtils.isBlank(shareSource)) {
return null;
}
switch (shareSource) {
case "null" :
case "NULL":
return null;
case "意向客户":
return 1;
case "智能选款":
return 2;
case "连单推荐":
return 3;
case "其他":
default:
return -1;
}
}
private void dealRecordFilter(String eventCode,InteractRecordMessageBO interactRecordMessageBO) {
if (StringUtils.isBlank(eventCode) || interactRecordMessageBO == null) {
return;
......@@ -148,6 +172,7 @@ public class MessageConvertHelper {
switch (eventCode) {
case "material_page":
case "material_page_duration":
case "recommended_product_list":
return MaterialInteractRecordEventType.VISIT_MATERIAL.getCode();
case "store_goods_detail":
case "click_goods":
......
package com.gic.haoban.manage.service.service.content.message;
import cn.hutool.core.lang.TypeReference;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
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.enterprise.api.dto.page.EnterpriseWxaLinkDTO;
import com.gic.enterprise.api.service.EnterpriseWxaLinkService;
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.InteractRecordExtendInfoBO;
......@@ -19,11 +24,13 @@ import com.gic.haoban.manage.service.util.IntervalUtils;
import com.gic.redis.data.util.RedisUtil;
import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
......@@ -46,6 +53,8 @@ public class InteractRecordMessageService {
PotentialCustomerService potentialCustomerService;
@Autowired
ContentSettingApiService contentSettingApiService;
@Autowired
EnterpriseWxaLinkService enterpriseWxaLinkService;
/**
* 处理互动记录
......@@ -115,6 +124,10 @@ public class InteractRecordMessageService {
log.info("非素材浏览事件,初始化扩展字段");
interactRecordBO.setExtendInfo(InteractRecordExtendInfoBO.empty());
}
// 冗余分享的商品组信息
saveGroupGoodsId(interactRecordMessageBO, interactRecordBO);
// 组装扩展信息
if (MaterialInteractRecordEventType.VISIT_PRODUCT.getCode()
.equals(interactRecordMessageBO.getEventType())
......@@ -161,6 +174,7 @@ public class InteractRecordMessageService {
potentialCustomerBO.setBizType(interactRecordBO.getBizType());
potentialCustomerBO.setEventType(interactRecordBO.getEventType());
potentialCustomerBO.setChannelSource(interactRecordBO.getChannelSource());
potentialCustomerBO.setShareSource(interactRecordBO.getShareSource());
potentialCustomerBO.setDurationTime(interactRecordBO.getDurationTime());
potentialCustomerBO.setTimes(interactRecordBO.getTimes());
potentialCustomerService.saveOrUpdatePotentialCustomer(potentialCustomerBO);
......@@ -185,6 +199,43 @@ public class InteractRecordMessageService {
}
}
private void saveGroupGoodsId(InteractRecordMessageBO interactRecordMessageBO, InteractRecordBO interactRecordBO) {
if (StringUtils.isBlank(interactRecordMessageBO.getWxaLinkId())) {
return;
}
if (interactRecordBO.getExtendInfo() != null && CollectionUtils.isNotEmpty(interactRecordBO.getExtendInfo().getGroupGoodsIds())) {
return;
}
EnterpriseWxaLinkDTO linkInfo = enterpriseWxaLinkService.getLinkInfo(interactRecordMessageBO.getWxaLinkId());
if (linkInfo == null) {
return;
}
String pageLink = linkInfo.getPageLink();
if (StringUtils.isBlank(pageLink)) {
return;
}
String params = JSONObject.parseObject(pageLink).getString("params");
if (StringUtils.isBlank(params)) {
return;
}
String proIdJSON = JSONObject.parseObject(params).getString("proIdJSON");
if (StringUtils.isBlank(proIdJSON)) {
return;
}
List<List<String>> groupGoodsIds = JSON.parseObject(proIdJSON, new TypeReference<List<String>>() {
});
if (interactRecordBO.getExtendInfo() == null) {
interactRecordBO.setExtendInfo(InteractRecordExtendInfoBO.empty());
}
interactRecordBO.getExtendInfo().setGroupGoodsIds(groupGoodsIds);
}
/**
查询订单事件的互动记录
* @param interactRecordMessageBO
......
......@@ -56,7 +56,7 @@ public class PotentialCustomerApiServiceImpl implements PotentialCustomerApiServ
PotentialCustomerDTO temp = new PotentialCustomerDTO();
BeanUtils.copyProperties(item, temp);
temp.setPotentialCustomerId(item.getId());
temp.setDesc(interactRecordBuilder.buildDesc(item.getChannelSource(), item.getEventType(), item.getBizType()));
temp.setDesc(interactRecordBuilder.buildDesc(item.getChannelSource(), item.getShareSource(),item.getEventType(), item.getBizType()));
return temp;
})
.collect(Collectors.toList());
......
......@@ -13,6 +13,7 @@
<result property="bizType" column="biz_type" jdbcType="INTEGER"/>
<result property="storeId" column="store_id" jdbcType="VARCHAR"/>
<result property="channelSource" column="channel_source" jdbcType="INTEGER"/>
<result property="shareSource" column="share_source" jdbcType="INTEGER"/>
<result property="eventType" column="event_type" jdbcType="INTEGER"/>
<result property="durationTime" column="duration_time" jdbcType="INTEGER"/>
<result property="times" column="times" jdbcType="INTEGER"/>
......@@ -34,6 +35,7 @@
biz_type,
store_id,
channel_source,
share_source,
event_type,
duration_time,
times,
......@@ -56,6 +58,7 @@
biz_type,
store_id,
channel_source,
share_source,
event_type,
duration_time,
times,
......@@ -71,7 +74,7 @@
<!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="TabHaobanInteractRecordMap">
select
id, enterprise_id, member_id, union_id, clerk_id, trace_id, biz_id, biz_type, store_id, channel_source,
id, enterprise_id, member_id, union_id, clerk_id, trace_id, biz_id, biz_type, store_id, channel_source,share_source,
event_type, duration_time, times, delete_flag, extend_info, create_time, update_time,last_access_time
from tab_haoban_interact_record
<where>
......@@ -116,6 +119,9 @@
<if test="channelSource != null">
and channel_source = #{channelSource}
</if>
<if test="shareSource != null">
and share_source = #{shareSource}
</if>
<if test="eventType != null">
and event_type = #{eventType}
</if>
......@@ -143,20 +149,20 @@
<!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into tab_haoban_interact_record(id, enterprise_id, member_id, union_id, clerk_id, trace_id, biz_id, biz_type,
store_id, channel_source, event_type, duration_time, times, delete_flag,
store_id, channel_source,share_source, event_type, duration_time, times, delete_flag,
extend_info, create_time, update_time, last_access_time)
values (#{id}, #{enterpriseId}, #{memberId}, #{unionId}, #{clerkId}, #{traceId}, #{bizId}, #{bizType}, #{storeId},
#{channelSource}, #{eventType}, #{durationTime}, #{times}, #{deleteFlag}, #{extendInfo}, #{createTime},
#{channelSource}, #{shareSource},#{eventType}, #{durationTime}, #{times}, #{deleteFlag}, #{extendInfo}, #{createTime},
#{updateTime}, #{lastAccessTime})
</insert>
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
insert into tab_haoban_interact_record(enterprise_id, member_id, union_id, clerk_id, trace_id, biz_id, biz_type,
store_id, channel_source, event_type, duration_time, times, delete_flag, extend_info, create_time, update_time, last_access_time)
store_id, channel_source,share_source, event_type, duration_time, times, delete_flag, extend_info, create_time, update_time, last_access_time)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.enterpriseId}, #{entity.memberId}, #{entity.unionId}, #{entity.clerkId}, #{entity.traceId},
#{entity.bizId}, #{entity.bizType}, #{entity.storeId}, #{entity.channelSource}, #{entity.eventType},
#{entity.bizId}, #{entity.bizType}, #{entity.storeId}, #{entity.channelSource}, #{entity.shareSource},#{entity.eventType},
#{entity.durationTime}, #{entity.times}, #{entity.deleteFlag}, #{entity.extendInfo}, #{entity.createTime},
#{entity.updateTime}, #{entity.lastAccessTime})
</foreach>
......@@ -164,11 +170,11 @@
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into tab_haoban_interact_record(enterprise_id, member_id, union_id, clerk_id, trace_id, biz_id, biz_type,
store_id, channel_source, event_type, duration_time, times, delete_flag, extend_info, create_time, update_time)
store_id, channel_source, share_source,event_type, duration_time, times, delete_flag, extend_info, create_time, update_time)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.enterpriseId}, #{entity.memberId}, #{entity.unionId}, #{entity.clerkId}, #{entity.traceId},
#{entity.bizId}, #{entity.bizType}, #{entity.storeId}, #{entity.channelSource}, #{entity.eventType},
#{entity.bizId}, #{entity.bizType}, #{entity.storeId}, #{entity.channelSource},#{entity.shareSource}, #{entity.eventType},
#{entity.durationTime}, #{entity.times}, #{entity.deleteFlag}, #{entity.extendInfo}, #{entity.createTime},
#{entity.updateTime})
</foreach>
......@@ -182,6 +188,7 @@
biz_type = values(biz_type),
store_id = values(store_id),
channel_source = values(channel_source),
share_source = values(share_source),
event_type = values(event_type),
duration_time = values(duration_time),
times = values(times),
......@@ -222,6 +229,9 @@
<if test="channelSource != null">
channel_source = #{channelSource},
</if>
<if test="shareSource != null">
share_source = #{shareSource},
</if>
<if test="eventType != null">
event_type = #{eventType},
</if>
......
......@@ -13,6 +13,7 @@
<result property="bizType" column="biz_type" jdbcType="INTEGER"/>
<result property="storeId" column="store_id" jdbcType="VARCHAR"/>
<result property="channelSource" column="channel_source" jdbcType="INTEGER"/>
<result property="shareSource" column="share_source" jdbcType="INTEGER"/>
<result property="eventType" column="event_type" jdbcType="INTEGER"/>
<result property="durationTime" column="duration_time" jdbcType="INTEGER"/>
<result property="times" column="times" jdbcType="INTEGER"/>
......@@ -38,6 +39,7 @@
biz_type,
store_id,
channel_source,
share_source,
event_type,
duration_time,
times,
......@@ -93,6 +95,9 @@
<if test="channelSource != null">
and channel_source = #{channelSource}
</if>
<if test="shareSource != null">
and share_source = #{shareSource}
</if>
<if test="eventType != null">
and event_type = #{eventType}
</if>
......@@ -135,23 +140,23 @@
<!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into tab_haoban_potential_customer(id, enterprise_id, member_id, union_id, clerk_id, biz_id, biz_type,
store_id, channel_source, event_type, duration_time, times, member_name,
store_id, channel_source, share_source,event_type, duration_time, times, member_name,
member_nick_name, member_image_url, member_phone, deal_record_num, star_flag, see_flag,
last_access_time, delete_flag, create_time, update_time)
values (#{id}, #{enterpriseId}, #{memberId}, #{unionId}, #{clerkId}, #{bizId}, #{bizType}, #{storeId},
#{channelSource}, #{eventType}, #{durationTime}, #{times},#{memberName}, #{memberNickName}, #{memberImageUrl}, #{memberPhone},
#{channelSource},#{shareSource}, #{eventType}, #{durationTime}, #{times},#{memberName}, #{memberNickName}, #{memberImageUrl}, #{memberPhone},
#{dealRecordNum}, #{starFlag}, #{seeFlag}, #{lastAccessTime}, #{deleteFlag}, #{createTime},
#{updateTime})
</insert>
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
insert into tab_haoban_potential_customer(id, enterprise_id, member_id, union_id, clerk_id, biz_id, biz_type,
store_id, channel_source, event_type, duration_time, times, member_name, member_nick_name, member_image_url, member_phone,
store_id, channel_source, share_source,event_type, duration_time, times, member_name, member_nick_name, member_image_url, member_phone,
deal_record_num, star_flag, see_flag, last_access_time, delete_flag, create_time, update_time)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.id}, #{entity.enterpriseId}, #{entity.memberId}, #{entity.unionId}, #{entity.clerkId}, #{entity.bizId},
#{entity.bizType}, #{entity.storeId}, #{entity.channelSource}, #{entity.eventType}, #{entity.durationTime},#{entity.times},
#{entity.bizType}, #{entity.storeId}, #{entity.channelSource},#{shareSource}, #{entity.eventType}, #{entity.durationTime},#{entity.times},
#{entity.memberName}, #{entity.memberNickName}, #{entity.memberImageUrl}, #{entity.memberPhone}, #{entity.dealRecordNum},
#{entity.starFlag}, #{entity.seeFlag}, #{entity.lastAccessTime}, #{entity.deleteFlag}, #{entity.createTime},
#{entity.updateTime})
......@@ -186,6 +191,9 @@
<if test="channelSource != null">
channel_source = #{channelSource},
</if>
<if test="shareSource != null">
share_source = #{shareSource},
</if>
<if test="eventType != null">
event_type = #{eventType},
</if>
......
......@@ -49,6 +49,12 @@ public class ContentMaterialShareQO implements Serializable {
private Integer channelSource;
/**
* 分享使用的业务来源 -1其他1意向客户2智能选款3连单推荐
* @see com.gic.haoban.manage.api.enums.content.ShareCustomerSourceType
*/
private Integer shareSource;
/**
* 喜好推荐、商品中心、商品素材、其他
*/
private String goodsDetailSource;
......@@ -145,6 +151,14 @@ public class ContentMaterialShareQO implements Serializable {
this.channelSource = channelSource;
}
public Integer getShareSource() {
return shareSource;
}
public void setShareSource(Integer shareSource) {
this.shareSource = shareSource;
}
public String getGoodsDetailSource() {
return goodsDetailSource;
}
......
......@@ -48,6 +48,12 @@ public class InteractRecordVO implements Serializable {
private Integer channelSource;
/**
* 分享使用的业务来源 -1其他1意向客户2智能选款3连单推荐
* @see com.gic.haoban.manage.api.enums.content.ShareCustomerSourceType
*/
private Integer shareSource;
/**
* 记录事件类型
* 1浏览素材;2 查看商品; 3 购买商品; 4 加入购物车
* 通过此类型区分 弹窗提示
......
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