1.举例
这是dto层的
Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SlaTargetCommand {
private Date startTime;
private Long timeLimit;
private List<SlaServiceTimeDTO> serviceTimeList;
private List<WorkCalendarDTO> workCalendarList;
private SlaServiceType serviceType;
}
2.然后我们再ctroller层进行调用
SlaTargetCommand.builder()
.startTime(simpleDateFormat.parse("2022-01-01 00:00:00"))
.timeLimit(36000000L)
.serviceTimeList(list)
.workCalendarList(obj)
.serviceType(SlaServiceType.IGNORE_DATE_AND_TIME)
.build()