|
|
|
|
@ -277,7 +277,7 @@ public class SiteInfoServiceImpl implements ISiteInfoService {
|
|
|
|
|
/* 5、推送频次 */
|
|
|
|
|
Integer pushType = info.getPushType();
|
|
|
|
|
if (info.getPushType() != null) {
|
|
|
|
|
// 5.1、每次进入,不用做判断
|
|
|
|
|
// 5.1、每次进入:每次页面刷新则展示,不用做判断
|
|
|
|
|
// 5.2、一次
|
|
|
|
|
if (SitePushTypeEnum.ONE.getCode() == pushType) {
|
|
|
|
|
SiteLog siteLog = new SiteLog();
|
|
|
|
|
@ -293,7 +293,7 @@ public class SiteInfoServiceImpl implements ISiteInfoService {
|
|
|
|
|
// 判断当前日期的星期是否在规定范围内
|
|
|
|
|
String pushTimer = info.getPushTimer();
|
|
|
|
|
if (StringUtils.isNotBlank(pushTimer)) {
|
|
|
|
|
List<String> weekList = Arrays.asList(pushTimer.split(","));
|
|
|
|
|
List<Integer> weekList = Arrays.asList(pushTimer.split(",")).stream().map(Integer::valueOf).collect(Collectors.toList());
|
|
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
|
|
// 获取当前星期几(1表示周日,2表示周一,依此类推)
|
|
|
|
|
int week = calendar.get(Calendar.DAY_OF_WEEK);
|
|
|
|
|
@ -309,7 +309,7 @@ public class SiteInfoServiceImpl implements ISiteInfoService {
|
|
|
|
|
siteLog.getParams().put("beginTime", LocalDateTime.of(now.toLocalDate(), LocalTime.MIN));
|
|
|
|
|
siteLog.getParams().put("endTime", LocalDateTime.of(now.toLocalDate(), LocalTime.MAX));
|
|
|
|
|
List<SiteLog> siteLogs = siteLogMapper.selectSiteLogList(siteLog);
|
|
|
|
|
if (siteLogs == null || siteLogs.size() >= info.getPushNumber()) {
|
|
|
|
|
if (siteLogs != null && siteLogs.size() >= info.getPushNumber()) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|