package com.zhentao.pojo; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import lombok.Data; import javax.validation.constraints.*; import java.util.Date; @Data public class AppRequest { @NotBlank(message = "id不能为空") private String appId; @NotBlank(message = "签名不能为空") private String sign; @NotNull(message = "reqTime不能为空") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8",shape = JsonFormat.Shape.STRING) private Long reqTime; @NotBlank(message = "goodsId不能为空") private String goodsID; @NotNull(message = "amount不能为空") @DecimalMin(value = "1",message = "最小值1") private Integer amount; @NotNull(message = "price不能为空") @DecimalMin(value = "0",message = "最小值0") @DecimalMax(value = "9999",message = "最大值9999") private Double price; @NotBlank(message = "手机号不能为空") @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确") private String mobile; @NotNull(message = "日期不能为空") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8",shape = JsonFormat.Shape.STRING) private Long nowDate; }