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