代码逻辑补全
This commit is contained in:
+20
@@ -1,5 +1,7 @@
|
||||
package com.renkang.watch.dto;
|
||||
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -38,4 +40,22 @@ public class XjScreenAbnormalParam {
|
||||
*/
|
||||
@Schema(title = "查询条件(业务类型不同 查询条件数据代表的意义不同)")
|
||||
private Integer search = 0;
|
||||
|
||||
public Date getEndTime() {
|
||||
if (endTime == null) {
|
||||
//没传时间默认查一周
|
||||
endTime = DateUtil.endOfWeek(new Date());
|
||||
}
|
||||
endTime = DateUtil.beginOfDay(endTime);
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public Date getStartTime() {
|
||||
if (startTime == null) {
|
||||
//没传时间默认查一周
|
||||
startTime = DateUtil.beginOfWeek(new Date());
|
||||
}
|
||||
endTime = DateUtil.endOfDay(endTime).offset(DateField.MILLISECOND,-999);
|
||||
return startTime;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user