|
|
@@ -1,27 +0,0 @@
|
|
|
-package com.xunmei.core.resumption.listener;
|
|
|
-
|
|
|
-import com.xunmei.common.core.event.WorkTimeChangeEvent;
|
|
|
-import com.xunmei.core.edu.service.ICoreEduTrainingTaskService;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.context.ApplicationListener;
|
|
|
-import org.springframework.context.event.EventListener;
|
|
|
-import org.springframework.stereotype.Component;
|
|
|
-import org.springframework.transaction.event.TransactionPhase;
|
|
|
-import org.springframework.transaction.event.TransactionalEventListener;
|
|
|
-
|
|
|
-@Component
|
|
|
-public class WorkTimeChangeEventListener implements ApplicationListener<WorkTimeChangeEvent> {
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private ICoreEduTrainingTaskService coreEduTrainingTaskService;
|
|
|
-
|
|
|
- @Override
|
|
|
- @EventListener(WorkTimeChangeEvent.class)
|
|
|
- @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT)
|
|
|
- public void onApplicationEvent(WorkTimeChangeEvent event) {
|
|
|
-
|
|
|
- coreEduTrainingTaskService.taskChangeForTimeWorkChange(event);
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
-}
|