Commit 4926846e by 王祖波

Merge branch 'feature-content202505' into 'master'

销售线索间隔修复

See merge request !2881
parents 69243cd3 e3408b45
...@@ -302,6 +302,7 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic ...@@ -302,6 +302,7 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic
} }
for (String enterpriseId : enterpriseIds) { for (String enterpriseId : enterpriseIds) {
Integer potentialNotifyInterval = 30; Integer potentialNotifyInterval = 30;
Date notifyStartTime = null;
ServiceResponse<ContentSettingDTO> response = contentSettingApiService.queryContentSettingInfo(enterpriseId); ServiceResponse<ContentSettingDTO> response = contentSettingApiService.queryContentSettingInfo(enterpriseId);
if (response.isSuccess() && response.getResult() != null) { if (response.isSuccess() && response.getResult() != null) {
potentialNotifyInterval = response.getResult().getPotentialNotifyInterval(); potentialNotifyInterval = response.getResult().getPotentialNotifyInterval();
...@@ -309,13 +310,15 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic ...@@ -309,13 +310,15 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic
if (potentialNotifyInterval <= 0 || cn.hutool.core.date.DateUtil.minute(now) % potentialNotifyInterval != 0) { if (potentialNotifyInterval <= 0 || cn.hutool.core.date.DateUtil.minute(now) % potentialNotifyInterval != 0) {
continue; continue;
} }
if (startTime == null) { if (startTime != null) {
startTime = cn.hutool.core.date.DateUtil.offsetMinute(now, -potentialNotifyInterval).toJdkDate(); notifyStartTime = startTime;
}else {
notifyStartTime = cn.hutool.core.date.DateUtil.offsetMinute(now, -potentialNotifyInterval).toJdkDate();
} }
log.info("销售线索执行eid:{},potentialNotifyInterval:{}", enterpriseId, potentialNotifyInterval); log.info("销售线索执行eid:{},potentialNotifyInterval:{}", enterpriseId, potentialNotifyInterval);
PotentialCustomerNotifyContext context = PotentialCustomerNotifyContext.builder() PotentialCustomerNotifyContext context = PotentialCustomerNotifyContext.builder()
.enterpriseId(enterpriseId) .enterpriseId(enterpriseId)
.startTime(startTime) .startTime(notifyStartTime)
.endTime(now) .endTime(now)
.build(); .build();
potentialCustomerService.sendPotentialCustomerNotice(context); potentialCustomerService.sendPotentialCustomerNotice(context);
......
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