liujie
2026-06-09 c96fbe6b0aeb413a17c429133ee6d81d138144b9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package com.xiaopeng.map.dto;
 
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
 
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
 
@Data
@ApiModel(value = "白名单编辑DTO")
public class WhitelistEditDto {
    @ApiModelProperty(value = "id", required = true)
    @NotNull(message = "id不能为空")
    private Long id;
    @ApiModelProperty(value = "账号 多个逗号隔开", required = true)
    @NotBlank(message = "账号不能为空")
    private String account;
 
    @ApiModelProperty(value = "优先派单 1=是 0=否", required = true)
    @NotNull(message = "优先派单不能为空")
    private Boolean isPriorityDispatch;
 
    @ApiModelProperty(value = "用户名称")
    private String nickName;
 
    @ApiModelProperty(value = "状态 0=冻结 1=正常", required = true)
    @NotNull(message = "状态不能为空")
    private Boolean status;
 
 
    @ApiModelProperty(value = "有限期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate expireTime;
 
    @ApiModelProperty(value = "最大下单数量")
    @Min(value = 0, message = "不能为负")
    private Integer maxOrderNum;
 
    public Boolean getStatus() {
        if (LocalDate.now().isAfter(expireTime)) {
            return false;
        }
        return status;
    }
 
 
}