|
@@ -14,6 +14,7 @@ import com.caimei365.tools.utils.SmsUtil;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.apache.commons.lang3.time.DateFormatUtils;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
import org.springframework.data.redis.core.RedisCallback;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
@@ -177,7 +178,7 @@ public class StatisticsTask {
|
|
|
public void behaviorRecordMinute() {
|
|
|
try {
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
- String dateNewStr = new SimpleDateFormat("yyyy-MM-dd").format(calendar.getTime());
|
|
|
+ String dateNewStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:00").format(calendar.getTime());
|
|
|
calendar.add(Calendar.MINUTE, -5);
|
|
|
String dateStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(calendar.getTime());
|
|
|
List<Map<String, Object>> behaviorRecordClubMinute = baseMapper.getBehaviorRecordClubMinute(dateStr);
|
|
@@ -225,7 +226,7 @@ public class StatisticsTask {
|
|
|
ArrayList<String> keyWords = new ArrayList<>();
|
|
|
keyWords.add(name+"...等"+count+"家机构客户访问了您的内容库资料分享");
|
|
|
keyWords.add(pageLabel);
|
|
|
- keyWords.add(dateNewStr);
|
|
|
+ keyWords.add(DateFormatUtils.format(calendar.getTime(), "yyyy-MM-dd"));
|
|
|
MessageModel<WechatTemplateMessage> wechatTemplateMessageMessageModel = new MessageModel<WechatTemplateMessage>()
|
|
|
.code(MessageType.WECHAT_TEMPLATE_MESSAGE)
|
|
|
.mqInfo(new MqInfo().topic("MessageLine").delay(3).async(1))
|
|
@@ -236,7 +237,7 @@ public class StatisticsTask {
|
|
|
.templateId("Zd7ewJw9-bN-gIgra9flKW96W3YehikRPPkDXPfhmQ0")
|
|
|
.keyWords(keyWords)
|
|
|
.remark("为了更好给您服务,请及时联系采美客服!")
|
|
|
- .pagePath("pages/seller/notice/service/Institutional_visits?type=1&spId="+spId+"&accDateTime="+dateStr));
|
|
|
+ .pagePath("pages/seller/notice/service/Institutional_visits?type=1&spId="+spId+"&accDateTime="+dateNewStr));
|
|
|
messageSender.messageSend(wechatTemplateMessageMessageModel);
|
|
|
}
|
|
|
log.info(">>>>>>>>>>>【定时任务】统计内容库访问活跃行为,统计成功");
|