NewDriverJob.java
845 Bytes
package com.ruoyi.job;
import com.ruoyi.framework.security.filter.JwtAuthenticationTokenFilter;
import com.ruoyi.service.driver.NewDriverService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
@Component("newDriverJob")
@Slf4j
public class NewDriverJob implements InitializingBean {
@Autowired
private NewDriverService newDriverService;
@Transactional(rollbackFor = Exception.class)
public void syDriver() {
newDriverService.insertJob();
log.info("人员信息同步完毕");
}
@Override
public void afterPropertiesSet() throws Exception {
}
}