wushunjie
吴顺杰 8 months ago
parent 3c91d0b370
commit 155faedd30

@ -71,6 +71,7 @@ public class AlarmQuartz {
} }
} catch (Exception e) { } catch (Exception e) {
quartzLog.setStatus(2); quartzLog.setStatus(2);
e.printStackTrace();
} finally { } finally {
quartzLogService.save(quartzLog); quartzLogService.save(quartzLog);
} }

@ -6,7 +6,7 @@
<insert id="saveAll"> <insert id="saveAll">
INSERT INTO `alarm`( INSERT IGNORE INTO `alarm`(
emergency_event_time, emergency_event_time,
emergency_event_desc, emergency_event_desc,
emergency_event_address, emergency_event_address,

@ -10,6 +10,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@ -37,7 +38,7 @@ public class FireQuartz {
* *
*/ */
@Async @Async
// @Scheduled(cron = "0 */5 * * * ? ") @Scheduled(cron = "0 */5 * * * ? ")
public void savaData() { public void savaData() {
log.info("119接口开始" + LocalDateTime.now()); log.info("119接口开始" + LocalDateTime.now());
QuartzLog quartzLog = new QuartzLog(); QuartzLog quartzLog = new QuartzLog();

Loading…
Cancel
Save