admin
2021-05-13 4a8f1bec26519a25f073739534e653a4f7c9e11d
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
package com.tejia.lijin.app.entity.common;
 
import java.io.File;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
 
public class ImageShowEntity implements Serializable {
    //文件路径
    private String filePath;
    //图片链接
    private String url;
 
    public ImageShowEntity(String filePath, String url) {
        this.filePath = filePath;
        this.url = url;
    }
 
    public String getFilePath() {
        return filePath;
    }
 
    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }
 
    public String getUrl() {
        return url;
    }
 
    public void setUrl(String url) {
        this.url = url;
    }
 
    public static List<ImageShowEntity> create(List<String> urlList) {
        List<ImageShowEntity> list = new ArrayList<>();
        if (urlList != null)
            for (String url : urlList)
                list.add(new ImageShowEntity(null, url));
        return list;
    }
 
    public static List<ImageShowEntity> create(File f) {
        List<ImageShowEntity> list = new ArrayList<>();
        if (f != null)
            list.add(new ImageShowEntity(f.getAbsolutePath(), null));
        return list;
    }
}