Browse Source

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

release_toaliyun_real
hupeng 7 years ago
parent
commit
840447f80e
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      mallinkAdmin/src/main/java/com/simple/schedule/DaliyAmountSchedule.java

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

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


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


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






Loading…
Cancel
Save