PicConfigVo.java
949 Bytes
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
package com.viontech.storage.vo;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.json.JSONUtil;
import com.viontech.storage.entity.Context;
import com.viontech.storage.model.PicConfig;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
/**
* .
*
* @author 谢明辉
* @date 2021/11/8
*/
@Getter
@Setter
public class PicConfigVo extends PicConfig {
List<Context> contexts;
private String nameLike;
private Integer pictureQualityGte;
private Integer pictureQualityLte;
public static PicConfigVo copy(PicConfig picConfig) {
if (picConfig == null) {
return null;
}
PicConfigVo picConfigVo = new PicConfigVo();
BeanUtil.copyProperties(picConfig, picConfigVo, true);
if (picConfigVo.getContext() != null) {
picConfigVo.setContexts(JSONUtil.toList(picConfigVo.getContext(), Context.class));
}
return picConfigVo;
}
}