applicationContext-quartz.xml
5.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:util="http://www.springframework.org/schema/util" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<!-- <description>定时任务调度配置</description> -->
<bean id="jobInvokeBean" class="com.sibu.orderHelper.integralWeb.quart.ScheduleTask"></bean>
<bean id="generateRoomStock"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="jobInvokeBean"/>
<property name="targetMethod" value="generateRoomStock" />
<property name="concurrent" value="false" />
</bean>
<bean id="generateRoomStockCronTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail" ref="generateRoomStock" />
<property name="cronExpression" value="0 0/30 3-5 * * ?" />
</bean>
<!-- 定时发送入住前通知短信 -->
<bean id="sendCheckinNoticeMessage"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="jobInvokeBean"/>
<property name="targetMethod" value="sendCheckinHotelNoticeMessage" />
<property name="concurrent" value="false" />
</bean>
<bean id="sendCheckinNoticeMessageCronTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail" ref="sendCheckinNoticeMessage" />
<property name="cronExpression" value="0 0 8 * * ?" />
</bean>
<!-- 退款订单(仅退款,退全款),不同意退款状态超过3天时间, 自动关闭退单,并恢复订单原来流程状态 -->
<bean id="autoCloseRefundMoneyOrderTypeAndDisagreeRefundMoneyStatusOrderTaskCronTrigger"
class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail">
<bean class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="autoCloseRefundMoneyOrderTypeAndDisagreeRefundMoneyStatusOrderTaskImpl"/>
<property name="targetMethod" value="execute"/>
<property name="concurrent" value="false"/>
</bean>
</property>
<property name="cronExpression" value="0 0/15 * * * ? *"/>
</bean>
<!-- 退款退货订单,不同意退款状态,超过7天时间,自动关闭退单,并恢复订单原来流程状态 -->
<bean id="autoCloseRefundMoneyAndGoodsOrderTypeAndDisagreeRefundMoneyStatusOrderTaskCronTrigger"
class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail">
<bean class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="autoCloseRefundMoneyAndGoodsOrderTypeAndDisagreeRefundMoneyStatusOrderTaskImpl"/>
<property name="targetMethod" value="execute"/>
<property name="concurrent" value="false"/>
</bean>
</property>
<property name="cronExpression" value="0 0/15 * * * ? *"/>
</bean>
<!-- 退款退货订单,不同意退货状态,超过7天时间,自动关闭退单,并恢复订单原来流程状态 -->
<bean id="autoCloseRefundMoneyAndGoodsOrderTypeAndDisagreeRefundGoodsStatusOrderTaskCronTrigger"
class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail">
<bean class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="autoCloseRefundMoneyAndGoodsOrderTypeAndDisagreeRefundGoodsStatusOrderTaskImpl"/>
<property name="targetMethod" value="execute"/>
<property name="concurrent" value="false"/>
</bean>
</property>
<property name="cronExpression" value="0 0/15 * * * ? *"/>
</bean>
<!-- 定时更新订单结算时间 -->
<bean id="settlementAmount"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="jobInvokeBean"/>
<property name="targetMethod" value="settlementAmount" />
<property name="concurrent" value="false" />
</bean>
<bean id="settlementAmountCronTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail" ref="settlementAmount" />
<property name="cronExpression" value="0 0 0 20 * ?" />
</bean>
<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="generateRoomStockCronTrigger"/>
<ref bean="sendCheckinNoticeMessageCronTrigger"/>
<ref bean="settlementAmountCronTrigger"/>
<!--<ref bean="autoCloseRefundMoneyOrderTypeAndDisagreeRefundMoneyStatusOrderTaskCronTrigger"/>-->
<!--<ref bean="autoCloseRefundMoneyAndGoodsOrderTypeAndDisagreeRefundMoneyStatusOrderTaskCronTrigger"/>-->
<!--<ref bean="autoCloseRefundMoneyAndGoodsOrderTypeAndDisagreeRefundGoodsStatusOrderTaskCronTrigger"/>-->
</list>
</property>
</bean>
</beans>