提交 08d35cef 编写于 作者: O o2sword

内容管理分页列表中增加首页图片信息

上级 47c5f0a2
......@@ -132,6 +132,9 @@ public class ActionQueryListWithFilterPaging extends BaseAction {
if( wo.getCreatorTopUnitName() != null && !wo.getCreatorTopUnitName().isEmpty() ) {
wo.setCreatorTopUnitNameShort( wo.getCreatorTopUnitName().split( "@" )[0]);
}
if(StringUtils.isNoneBlank(document.getIndexPics())) {
wo.setPictureList(ListTools.toList(document.getIndexPics().split(",")));
}
if( wi.getNeedData() ) {
//需要组装数据
wo.setData( documentQueryService.getDocumentData( document ) );
......
......@@ -91,6 +91,9 @@ public class ActionQueryListWithFilterPagingAdmin extends BaseAction {
if( wo.getCreatorTopUnitName() != null && !wo.getCreatorTopUnitName().isEmpty() ) {
wo.setCreatorTopUnitNameShort( wo.getCreatorTopUnitName().split( "@" )[0]);
}
if(StringUtils.isNoneBlank(document.getIndexPics())) {
wo.setPictureList(ListTools.toList(document.getIndexPics().split(",")));
}
if( wi.getNeedData() ) {
//需要组装数据
wo.setData( documentQueryService.getDocumentData( document ) );
......
......@@ -92,6 +92,12 @@ public class WrapInDocumentFilter {
@FieldDescribe("业务数据Long值02.")
private Long longValue02;
@FieldDescribe("业务数据Double值01.")
private Double doubleValue01;
@FieldDescribe("业务数据Double值02.")
private Double doubleValue02;
public String getTopFlag() {
return topFlag;
}
......@@ -300,6 +306,22 @@ public class WrapInDocumentFilter {
this.longValue02 = longValue02;
}
public Double getDoubleValue01() {
return doubleValue01;
}
public void setDoubleValue01(Double doubleValue01) {
this.doubleValue01 = doubleValue01;
}
public Double getDoubleValue02() {
return doubleValue02;
}
public void setDoubleValue02(Double doubleValue02) {
this.doubleValue02 = doubleValue02;
}
/**
* 根据传入的查询参数,组织一个完整的QueryFilter对象
* @return
......@@ -483,6 +505,14 @@ public class WrapInDocumentFilter {
queryFilter.addEqualsTerm( new EqualsTerm(Document.longValue02_FIELDNAME, this.getLongValue02() ) );
}
if( this.getDoubleValue01() != null) {
queryFilter.addEqualsTerm( new EqualsTerm(Document.doubleValue01_FIELDNAME, this.getDoubleValue01() ) );
}
if( this.getDoubleValue02() != null) {
queryFilter.addEqualsTerm( new EqualsTerm(Document.doubleValue02_FIELDNAME, this.getDoubleValue02() ) );
}
return queryFilter;
}
......
......@@ -73,7 +73,7 @@ public class WrapOutDocumentList extends GsonPropertyObject {
@FieldDescribe("是否含有首页图片")
private Boolean hasIndexPic = false;
@FieldDescribe("首页图片列表")
@FieldDescribe("首页图片列表,分页展现返回前3个图片")
private List<String> pictureList;
@FieldDescribe("文档所有数据信息.")
......@@ -103,6 +103,12 @@ public class WrapOutDocumentList extends GsonPropertyObject {
@FieldDescribe("业务数据Long值02.")
private Long longValue02;
@FieldDescribe("业务数据Double值01.")
private Double doubleValue01;
@FieldDescribe("业务数据Double值02.")
private Double doubleValue02;
@FieldDescribe("业务数据DateTime值01.")
private Date dateTimeValue01;
......@@ -391,6 +397,22 @@ public class WrapOutDocumentList extends GsonPropertyObject {
this.longValue02 = longValue02;
}
public Double getDoubleValue01() {
return doubleValue01;
}
public void setDoubleValue01(Double doubleValue01) {
this.doubleValue01 = doubleValue01;
}
public Double getDoubleValue02() {
return doubleValue02;
}
public void setDoubleValue02(Double doubleValue02) {
this.doubleValue02 = doubleValue02;
}
public Date getDateTimeValue01() {
return dateTimeValue01;
}
......
......@@ -40,6 +40,7 @@ import java.util.concurrent.locks.ReentrantLock;
/**
* 对文档信息进行持久化服务类
* @author sword
*/
public class DocumentPersistService {
private static Logger logger = LoggerFactory.getLogger(DocumentPersistService.class);
......@@ -51,8 +52,13 @@ public class DocumentPersistService {
if( document == null ){
throw new Exception("document is null!");
}
if (document.getPictureList() != null && !document.getPictureList().isEmpty()) {
if (ListTools.isNotEmpty(document.getPictureList())) {
document.setHasIndexPic(true);
if(document.getPictureList().size() > 3){
document.setIndexPics(StringUtils.join(document.getPictureList().subList(0, 2), ","));
}else{
document.setIndexPics(StringUtils.join(document.getPictureList(), ","));
}
}
try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
document.setModifyTime( new Date());
......
......@@ -265,6 +265,12 @@ public class Document extends SliceJpaObject {
@CheckPersist(allowEmpty = true)
private Boolean reviewed = false;
public static final String indexPics_FIELDNAME = "indexPics";
@FieldDescribe("首页图片,取自pictureList的前3个图片用于列表展示")
@Column(name = ColumnNamePrefix + indexPics_FIELDNAME)
@CheckPersist(allowEmpty = true)
private String indexPics;
public static final String sequenceTitle_FIELDNAME = "sequenceTitle";
@FieldDescribe("用于标题排序的sequence")
@Column(length = JpaObject.length_255B, name = ColumnNamePrefix + sequenceTitle_FIELDNAME)
......@@ -657,6 +663,14 @@ public class Document extends SliceJpaObject {
this.hasIndexPic = hasIndexPic;
}
public String getIndexPics() {
return indexPics;
}
public void setIndexPics(String indexPics) {
this.indexPics = indexPics;
}
public String getSummary() {
return summary;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册