java后端接收LocalDateTime类型参数

//QTO层

    @ApiModelProperty("账单开始时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime billStartTime;
    
    @ApiModelProperty("账单结束时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime billEndTime;

LocalDateTime时间类型请求类型要改Post,加@RequestBody注解
@ApiOperation(“列表”)
@PostMapping("/list")
public ResponseData> list(@RequestBody TradeSettlementQTO.PcQTO qto){
return ResponseData.data(ipcMarketSettlementRpc.settlementPageData(qto));
}

你可能感兴趣的:(LocalDateTime,java)