|
|
@@ -210,7 +210,7 @@ public class QwExternalContactRatingMoreSevenDaysServiceImpl implements QwExtern
|
|
|
|
|
|
// 如果连续3天没有看课记录,标记为E级
|
|
|
if (ratingVOS == null || ratingVOS.isEmpty()) {
|
|
|
- return buildELevelContactIfEligible(externalId, config,
|
|
|
+ return buildELevelContactIfEligible(logsInfo, config,
|
|
|
"连续{}天没有看课记录,标记为E级,externalId: {}");
|
|
|
}
|
|
|
|
|
|
@@ -219,13 +219,14 @@ public class QwExternalContactRatingMoreSevenDaysServiceImpl implements QwExtern
|
|
|
|
|
|
if (!hasWatchDuration) {
|
|
|
// 有记录但观看时长为0,也认为连续3天未看课,标记为E级
|
|
|
- return buildELevelContactIfEligible(externalId, config,
|
|
|
+ return buildELevelContactIfEligible(logsInfo, config,
|
|
|
"连续{}天看课时长为0,标记为E级,externalId: {}");
|
|
|
} else {
|
|
|
// 有看课记录且时长>0,不是E级,恢复为ABCD评级
|
|
|
log.info("最近{}天有看课记录,不是E级,externalId: {}", config.getNotStudyDays(), externalId);
|
|
|
QwExternalContact externalContact = new QwExternalContact();
|
|
|
externalContact.setId(externalId);
|
|
|
+ externalContact.setSopUserLogsInfoId(logsInfo.getId());
|
|
|
// 检查当前等级是否为E级,如果是则需要重新计算
|
|
|
Integer currentLevel = ratingVOS.get(0).getLevel();
|
|
|
if (currentLevel != null && currentLevel == 5) {
|
|
|
@@ -352,7 +353,8 @@ public class QwExternalContactRatingMoreSevenDaysServiceImpl implements QwExtern
|
|
|
return daysSinceCreate > 3;
|
|
|
}
|
|
|
|
|
|
- private QwExternalContact buildELevelContactIfEligible(Long externalId, QwRatingConfig config, String logPattern) {
|
|
|
+ private QwExternalContact buildELevelContactIfEligible(SopUserLogsInfo logsInfo, QwRatingConfig config, String logPattern) {
|
|
|
+ Long externalId = logsInfo.getExternalId();
|
|
|
if (!canRateTransferContactAsELevel(externalId)) {
|
|
|
log.info("转接客户创建未满3天,跳过E级评定,externalId: {}", externalId);
|
|
|
return null;
|
|
|
@@ -360,6 +362,7 @@ public class QwExternalContactRatingMoreSevenDaysServiceImpl implements QwExtern
|
|
|
log.info(logPattern, config.getNotStudyDays(), externalId);
|
|
|
QwExternalContact externalContact = new QwExternalContact();
|
|
|
externalContact.setId(externalId);
|
|
|
+ externalContact.setSopUserLogsInfoId(logsInfo.getId());
|
|
|
externalContact.setLevel(5);
|
|
|
externalContact.setLevelType(2);
|
|
|
externalContact.setIsDaysNotStudy(1);
|