Просмотр исходного кода

[系统][修复]:每天总额统计增加事务处理

release_toaliyun_real
hupeng 7 лет назад
Родитель
Сommit
840447f80e
1 измененных файлов: 3 добавлений и 0 удалений
  1. +3
    -0
      mallinkAdmin/src/main/java/com/simple/schedule/DaliyAmountSchedule.java

+ 3
- 0
mallinkAdmin/src/main/java/com/simple/schedule/DaliyAmountSchedule.java Просмотреть файл

@@ -12,6 +12,8 @@ import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.text.ParseException;
import java.text.SimpleDateFormat;
@@ -42,6 +44,7 @@ public class DaliyAmountSchedule {

@Scheduled(cron = "0 0 23 * * ?") // 每天晚上11点盘点
//@Scheduled(cron = "*/10 * * * * ?") // 测试10秒中一次
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class})
public void daliyAmountSchedule() {




Загрузка…
Отмена
Сохранить