feat(WmsAttendanceCheckBo): 添加日期格式化注解支持
- 引入 org.springframework.format.annotation.DateTimeFormat 依赖 - 为 startDate 字段添加 @DateTimeFormat 注解 - 为 endDate 字段添加 @DateTimeFormat 注解 - 保持 yyyy-MM-dd 日期格式的一致性配置
This commit is contained in:
@@ -2,6 +2,7 @@ package com.klp.domain.bo;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@@ -13,8 +14,10 @@ public class WmsAttendanceCheckBo {
|
|||||||
private Long shiftId;
|
private Long shiftId;
|
||||||
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date startDate;
|
private Date startDate;
|
||||||
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date endDate;
|
private Date endDate;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user