package com.stylefeng.guns.modular.system.warpper;
|
|
import com.stylefeng.guns.modular.system.model.TNotices;
|
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModelProperty;
|
|
import java.util.ArrayList;
|
import java.util.List;
|
|
@ApiModel("公告")
|
public class TNoticeWarpper {
|
@ApiModelProperty("主键")
|
private Integer id;
|
@ApiModelProperty("标题")
|
private String title;
|
@ApiModelProperty("内容")
|
private String content;
|
@ApiModelProperty("图片地址")
|
private String imgUrl;
|
@ApiModelProperty("发布时间")
|
private Long insertTime;
|
|
public Integer getId() {
|
return id;
|
}
|
|
public void setId(Integer id) {
|
this.id = id;
|
}
|
|
public String getTitle() {
|
return title;
|
}
|
|
public void setTitle(String title) {
|
this.title = title;
|
}
|
|
public String getContent() {
|
return content;
|
}
|
|
public void setContent(String content) {
|
this.content = content;
|
}
|
|
public String getImgUrl() {
|
return imgUrl;
|
}
|
|
public void setImgUrl(String imgUrl) {
|
this.imgUrl = imgUrl;
|
}
|
|
public Long getInsertTime() {
|
return insertTime;
|
}
|
|
public void setInsertTime(Long insertTime) {
|
this.insertTime = insertTime;
|
}
|
|
public static List<TNoticeWarpper> getTNoticeWarppers(List<TNotices> notices){
|
List<TNoticeWarpper> list = new ArrayList<>();
|
if(null != notices){
|
for(TNotices t : notices){
|
TNoticeWarpper noticeWarpper = new TNoticeWarpper();
|
noticeWarpper.setId(t.getId());
|
noticeWarpper.setTitle(t.getTitle());
|
noticeWarpper.setContent(t.getContent());
|
noticeWarpper.setImgUrl(t.getImgUrl());
|
noticeWarpper.setInsertTime(t.getInsertTime().getTime());
|
list.add(noticeWarpper);
|
}
|
}
|
return list;
|
}
|
}
|