39 lines
1.2 KiB
Java
39 lines
1.2 KiB
Java
package com.zhgd.xmgl.task;
|
|
|
|
import cn.hutool.core.date.DateTime;
|
|
import cn.hutool.core.date.DateUtil;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.zhgd.xmgl.modules.location.entity.LocationData;
|
|
import com.zhgd.xmgl.modules.location.mapper.LocationDataMapper;
|
|
import io.swagger.annotations.Api;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
|
|
@Slf4j
|
|
@Component
|
|
@Api(tags = "隧道定位")
|
|
@RestController
|
|
@RequestMapping
|
|
public class LocationDataTask {
|
|
@Autowired
|
|
private LocationDataMapper locationDataMapper;
|
|
|
|
/**
|
|
* 隧道定位数据超时人员标签清除
|
|
*/
|
|
@Scheduled(cron = "0 0/10 * * * ?")
|
|
@GetMapping("/xmgl/task/clearLocationData")
|
|
public void clearLocationData() {
|
|
log.info("隧道定位数据超时人员标签清除执行");
|
|
locationDataMapper.clearLocationData();
|
|
}
|
|
}
|