|
|
@ -44,9 +44,15 @@ import java.util.*; |
|
|
import java.util.concurrent.ScheduledFuture; |
|
|
import java.util.concurrent.ScheduledFuture; |
|
|
import java.time.ZoneId; |
|
|
import java.time.ZoneId; |
|
|
import java.time.ZonedDateTime; |
|
|
import java.time.ZonedDateTime; |
|
|
|
|
|
import java.util.regex.Pattern; |
|
|
|
|
|
|
|
|
@Slf4j |
|
|
@Slf4j |
|
|
@Service |
|
|
@Service |
|
|
public class MonitoringService { |
|
|
public class MonitoringService { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final Pattern DATE_PATTERN = Pattern.compile("^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"); |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private CommonOpt commonOpt; |
|
|
private CommonOpt commonOpt; |
|
|
@Autowired |
|
|
@Autowired |
|
|
@ -202,6 +208,13 @@ public class MonitoringService { |
|
|
public PageInfo<MonitorVO> getListPage(MonitorSearchParams pageSearchParam, Long companyId, Long userId, |
|
|
public PageInfo<MonitorVO> getListPage(MonitorSearchParams pageSearchParam, Long companyId, Long userId, |
|
|
Integer languageType, Integer uTCOffset){ |
|
|
Integer languageType, Integer uTCOffset){ |
|
|
|
|
|
|
|
|
|
|
|
if (!DATE_PATTERN.matcher(pageSearchParam.getStartDate()).matches()) { |
|
|
|
|
|
throw new IllegalArgumentException("Invalid startDate"); |
|
|
|
|
|
} |
|
|
|
|
|
if (!DATE_PATTERN.matcher(pageSearchParam.getEndDate()).matches()) { |
|
|
|
|
|
throw new IllegalArgumentException("Invalid endDate"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
String target=pageSearchParam.getSearchTarget(); |
|
|
String target=pageSearchParam.getSearchTarget(); |
|
|
if (StringUtils.isBlank(pageSearchParam.getCompanyIds())) { |
|
|
if (StringUtils.isBlank(pageSearchParam.getCompanyIds())) { |
|
|
pageSearchParam.setCompanyIdList(Arrays.asList(companyId)); |
|
|
pageSearchParam.setCompanyIdList(Arrays.asList(companyId)); |
|
|
|