|
|
|
@ -37,6 +37,8 @@ import java.io.UnsupportedEncodingException;
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.net.URLEncoder;
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
import java.time.LocalTime;
|
|
|
|
|
import java.time.ZoneOffset;
|
|
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
@ -96,6 +98,8 @@ public class TaskController {
|
|
|
|
|
if (LocalDateTime.now().isAfter(task.getStart())) {
|
|
|
|
|
task.setStatus(1);
|
|
|
|
|
}
|
|
|
|
|
task.setStart( LocalDateTime.of(task.getStart().toLocalDate(), LocalTime.MIN));
|
|
|
|
|
task.setEnd( LocalDateTime.of(task.getEnd().toLocalDate(), LocalTime.MAX));
|
|
|
|
|
task.setCreatAt(LocalDateTime.now()).setUpdateAt(LocalDateTime.now());
|
|
|
|
|
taskService.save(task);
|
|
|
|
|
int id = task.getId();
|
|
|
|
@ -498,12 +502,18 @@ public class TaskController {
|
|
|
|
|
private Integer status;
|
|
|
|
|
@Schema(title = "月份区间")
|
|
|
|
|
private Integer month;
|
|
|
|
|
@Schema(title = "开始时间(yyyy-MM-dd HH:mm:ss)", description = "如果传入month以月份区间为条件")
|
|
|
|
|
@Schema(title = "开始时间起(yyyy-MM-dd HH:mm:ss)", description = "如果传入month以月份区间为条件")
|
|
|
|
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
|
|
|
private LocalDateTime beginTime;
|
|
|
|
|
@Schema(title = "结束时间(yyyy-MM-dd HH:mm:ss)", description = "如果传入month以月份区间为条件")
|
|
|
|
|
private LocalDateTime beginTime1;
|
|
|
|
|
@Schema(title = "开始时间末(yyyy-MM-dd HH:mm:ss)", description = "如果传入month以月份区间为条件")
|
|
|
|
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
|
|
|
private LocalDateTime endTime;
|
|
|
|
|
private LocalDateTime beginTime2;
|
|
|
|
|
@Schema(title = "结束时间起(yyyy-MM-dd HH:mm:ss)", description = "如果传入month以月份区间为条件")
|
|
|
|
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
|
|
|
private LocalDateTime endTime1;
|
|
|
|
|
@Schema(title = "结束时间末(yyyy-MM-dd HH:mm:ss)", description = "如果传入month以月份区间为条件")
|
|
|
|
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
|
|
|
private LocalDateTime endTime2;
|
|
|
|
|
@Schema(title = "tagId数组")
|
|
|
|
|
private List<Integer> tagIdList;
|
|
|
|
|
@Schema(title = "brandId数组")
|
|
|
|
@ -523,8 +533,10 @@ public class TaskController {
|
|
|
|
|
if (null != param.getMonth()) {
|
|
|
|
|
qw.between("t1.start", LocalDateTime.now().minusMonths(param.getMonth()), LocalDateTime.now());
|
|
|
|
|
} else {
|
|
|
|
|
qw.ge(param.getBeginTime() != null, "t1.start", param.getBeginTime());
|
|
|
|
|
qw.le(param.getEndTime() != null, "t1.start", param.getEndTime());
|
|
|
|
|
qw.ge(param.getBeginTime1() != null, "t1.start", param.getBeginTime1());
|
|
|
|
|
qw.le(param.getBeginTime2() != null, "t1.start", param.getBeginTime2());
|
|
|
|
|
qw.ge(param.getEndTime1() != null, "t1.end", param.getEndTime1());
|
|
|
|
|
qw.le(param.getEndTime2() != null, "t1.end", param.getEndTime2());
|
|
|
|
|
}
|
|
|
|
|
if (null != param.getKeyword()) {
|
|
|
|
|
qw.like("t1.title", param.getKeyword());
|
|
|
|
|