|
@@ -4,6 +4,7 @@ import org.fouram.core.util.DateUtil;
|
|
|
import org.fouram.core.util.LoggerUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
@Service
|
|
|
public class CheckTaskService {
|
|
@@ -29,13 +30,21 @@ public class CheckTaskService {
|
|
|
if (DateUtil.getHour().equals("10") || DateUtil.getHour().equals("20")) {
|
|
|
LoggerUtil.info("执行开始:" + DateUtil.getTime());
|
|
|
executeBiz(DateUtil.getDay());
|
|
|
- LoggerUtil.info("执行结束:" + DateUtil.getTime());
|
|
|
+ LoggerUtil.info("执行结束:" + DateUtil.getTime());
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
LoggerUtil.error(e);
|
|
|
+ try {
|
|
|
+ LoggerUtil.info("重试执行开始:" + DateUtil.getTime());
|
|
|
+ executeBiz(DateUtil.getDay());
|
|
|
+ LoggerUtil.info("重试执行结束:" + DateUtil.getTime());
|
|
|
+ } catch (Exception ex) {
|
|
|
+ LoggerUtil.error(ex);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Transactional
|
|
|
public void executeBiz(String checkinDay) throws Exception {
|
|
|
String startDay = checkinDay;
|
|
|
String endDay = checkinDay;
|