|
@@ -19,6 +19,7 @@ package com.zbkj.admin.task.sms;
|
|
|
*/
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.sun.corba.se.spi.ior.iiop.IIOPFactories;
|
|
|
import com.zbkj.admin.task.order.OrderReceiptTask;
|
|
|
import com.zbkj.common.model.merchant.MerchantSmsTiming;
|
|
|
import com.zbkj.service.service.MerchantSmsTimingService;
|
|
@@ -70,22 +71,27 @@ public class DynamicScheduledTask {
|
|
|
String hour = sendTime.substring(11, 13);
|
|
|
String minute = sendTime.substring(14, 16);
|
|
|
//单次发送
|
|
|
- if (list.get(i).getSendType() == 1) {
|
|
|
+ if (1==list.get(i).getSendType()) {
|
|
|
cronExpression = "0 " + minute + "" + hour + "" + day + "" + month + " ? ";
|
|
|
System.out.println(cronExpression);
|
|
|
//循环发送
|
|
|
} else {
|
|
|
//每天
|
|
|
- if (list.get(i).getIsCirculate() == 1) {
|
|
|
+ if (1==list.get(i).getIsCirculate()) {
|
|
|
cronExpression = "0 " + minute + "" + hour + "" + "*" + "" + "*" + " ? ";
|
|
|
|
|
|
//每月
|
|
|
} else {
|
|
|
//每月最后一天
|
|
|
- if (list.get(i).getIsLastDay() == 1) {
|
|
|
- cronExpression = "0 " + minute + "" + hour + "" + "28-31" + "" + "*" + " ? ";
|
|
|
- } else {
|
|
|
- cronExpression = "0 " + minute + "" + hour + "" + "*" + "" + month + " ? ";
|
|
|
+ if (null!=list.get(i).getIsLastDay()) {
|
|
|
+ if (1==list.get(i).getIsLastDay()) {
|
|
|
+ cronExpression = "0 " + "0" + " " + "0" + " " + "28-31" + " " + "*" + " ? ";
|
|
|
+ } else {
|
|
|
+ cronExpression = "0 " + minute + " " + hour + " " + "*" + " " + month + " ? ";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ cronExpression = "0 " + minute + " " + hour + " " + "*" + " " + month + " ? ";
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -120,21 +126,27 @@ public class DynamicScheduledTask {
|
|
|
String hour = sendTime.substring(11, 13);
|
|
|
String minute = sendTime.substring(14, 16);
|
|
|
//单次发送
|
|
|
- if (list.get(i).getSendType() == 1) {
|
|
|
+ if (1==list.get(i).getSendType()) {
|
|
|
cronExpression = "0 " + minute + " " + hour + " " + day + " " + month + " ? ";
|
|
|
//循环发送
|
|
|
} else {
|
|
|
//每天
|
|
|
- if (list.get(i).getIsCirculate() == 1) {
|
|
|
+ if (1==list.get(i).getIsCirculate()) {
|
|
|
cronExpression = "0 " + minute + " " + hour + " " + "*" + " " + "*" + " ? ";
|
|
|
//每月
|
|
|
} else {
|
|
|
//每月最后一天
|
|
|
- if (list.get(i).getIsLastDay() == 1) {
|
|
|
- cronExpression = "0 " + "0" + " " + "0" + " " + "28-31" + " " + "*" + " ? ";
|
|
|
- } else {
|
|
|
+ if (null!=list.get(i).getIsLastDay()) {
|
|
|
+ if (1==list.get(i).getIsLastDay()) {
|
|
|
+ cronExpression = "0 " + "0" + " " + "0" + " " + "28-31" + " " + "*" + " ? ";
|
|
|
+ } else {
|
|
|
+ cronExpression = "0 " + minute + " " + hour + " " + "*" + " " + month + " ? ";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
cronExpression = "0 " + minute + " " + hour + " " + "*" + " " + month + " ? ";
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
String tempId = list.get(i).getTempId();
|