package org.sxkj.resource.vo;
|
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
import lombok.Data;
|
import org.springframework.util.StringUtils;
|
|
import java.util.Date;
|
import java.util.Optional;
|
|
/**
|
* 分析对比
|
*/
|
@Data
|
public class AnalysisAttachVo {
|
//附件id
|
private Long id;
|
//事件名称
|
//事件名称
|
private String eventName;
|
private String nickName;
|
|
private String name;
|
|
private String extension;
|
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
private Date createTime;
|
/**
|
* 地址
|
*/
|
private String link;
|
|
private Integer resultType;
|
/**
|
* 是否被选中
|
*/
|
private Boolean isCheck;
|
public String getNickName() {
|
if(!StringUtils.isEmpty(this.eventName)){
|
return eventName;
|
}
|
if(!StringUtils.isEmpty(this.nickName)) {
|
return this.nickName+ Optional.ofNullable(this.extension).orElse("");
|
}
|
return this.name.substring(this.name.lastIndexOf("/")+1);
|
}
|
|
|
}
|