Sfoglia il codice sorgente

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

release_toaliyun_real
hupeng 7 anni fa
parent
commit
840447f80e
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. +3
    -0
      mallinkAdmin/src/main/java/com/simple/schedule/DaliyAmountSchedule.java

+ 3
- 0
mallinkAdmin/src/main/java/com/simple/schedule/DaliyAmountSchedule.java Vedi File

@@ -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() {




Caricamento…
Annulla
Salva