Commit 103ad187 by 王祖波

Merge branch 'feature-recommend3' into 'developer'

Feature recommend3

See merge request !2940
parents 1d10bb2a 09375e00
......@@ -61,6 +61,11 @@ public class TabContactLog implements Serializable {
private Date potentialTime;
/**
* 潜客分
*/
private Integer potentialScore;
/**
* 来源日志id
*/
private Long sourceLogId;
......@@ -197,6 +202,14 @@ public class TabContactLog implements Serializable {
this.potentialTime = potentialTime;
}
public Integer getPotentialScore() {
return potentialScore;
}
public void setPotentialScore(Integer potentialScore) {
this.potentialScore = potentialScore;
}
public Integer getSourceType() {
return sourceType;
}
......
......@@ -225,6 +225,10 @@ public class ContactLogServiceImpl implements ContactLogService {
contactLog.setStoreCode(store.getStoreCode());
}
}
JSONObject jsonObject = esMemberInfoService.queryDataSingle(enterpriseId, memberId, "potentialScore");
if (jsonObject != null && jsonObject.getInteger("potentialScore") != null) {
contactLog.setPotentialScore(jsonObject.getInteger("potentialScore"));
}
Long logId = UniqueIdUtils.uniqueLong();
contactLog.setLogId(logId);
contactLog.setMemberId(memberId);
......@@ -234,6 +238,7 @@ public class ContactLogServiceImpl implements ContactLogService {
contactLog.setContactCycleFirst(contactCycleFirst);
// 成为潜客时间 无用暂不写
contactLog.setPotentialTime(null);
contactLog.setSourceType(sourceType);
contactLog.setBizType(bizType);
contactLog.setEnterpriseId(enterpriseId);
......@@ -405,7 +410,7 @@ public class ContactLogServiceImpl implements ContactLogService {
ContactBizTypeEnum bizTypeEnum = ContactBizTypeEnum.fromType(bizType);
Long bizContactTime = bizTypeEnum.getEsClerkContactTime(contactTime);
clerkContactTimeList = clerkContactTimeList.stream().map(time -> {
if (String.valueOf(time).length() == 16) {
if (String.valueOf(time).length() == 14) {
return null;
}
if (String.valueOf(time).startsWith(bizTypeEnum.getCodePre())) {
......@@ -417,7 +422,9 @@ public class ContactLogServiceImpl implements ContactLogService {
.collect(Collectors.toList());
}
// 增加原始创建时间用于排序
if (CollectionUtils.isNotEmpty(clerkContactTimeList)) {
clerkContactTimeList.add(contactTime);
}
logger.info("刷新建联时间:{},memberId:{}", clerkContactTimeList,memberId);
DynamicDocDTO dynamicDocDTO = new DynamicDocDTO();
......
......@@ -14,6 +14,7 @@
<result property="contactCycle" column="contact_cycle" jdbcType="INTEGER"/>
<result property="contactCycleFirst" column="contact_cycle_first" jdbcType="INTEGER"/>
<result property="potentialTime" column="potential_time" jdbcType="TIMESTAMP"/>
<result property="potentialScore" column="potential_score" jdbcType="INTEGER"/>
<result property="sourceType" column="source_type" jdbcType="INTEGER"/>
<result property="sourceLogId" column="source_log_id" jdbcType="BIGINT"/>
<result property="bizType" column="biz_type" jdbcType="INTEGER" />
......@@ -155,6 +156,7 @@
contact_cycle,
contact_cycle_first,
potential_time,
potential_score,
source_type,
source_log_id,
biz_type,
......@@ -175,6 +177,7 @@
#{contactCycle},
#{contactCycleFirst},
#{potentialTime},
#{potentialScore},
#{sourceType},
#{sourceLogId},
#{bizType},
......@@ -220,6 +223,9 @@
<if test="potentialTime != null">
potential_time = #{potentialTime},
</if>
<if test="potentialScore != null">
potential_score = #{potentialScore},
</if>
<if test="sourceType != null">
source_type = #{sourceType},
</if>
......
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