|
|
@@ -0,0 +1,27 @@
|
|
|
+package com.yc.ship.module.trade.job;
|
|
|
+
|
|
|
+import com.yc.ship.framework.quartz.core.handler.JobHandler;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 保险购买定时任务
|
|
|
+ * 1. 查询需要购买保险的订单,只有确认状态并且开航前一天才可购买保险
|
|
|
+ */
|
|
|
+@Component
|
|
|
+@Slf4j
|
|
|
+public class InsuranceJob implements JobHandler {
|
|
|
+ /**
|
|
|
+ * 执行定时任务
|
|
|
+ * 1.该定时任务会每天去查询开航前一天的航次,
|
|
|
+ * 2.根据航次去查询确认状态的订单,
|
|
|
+ * 3.购买保险
|
|
|
+ * @param param 传入的参数(当前未使用)
|
|
|
+ * @return 固定返回字符串"成功"
|
|
|
+ * @throws Exception 任务异常
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public String execute(String param) {
|
|
|
+ return "success";
|
|
|
+ }
|
|
|
+}
|