Commit bee2b62b by gaopeng

需求1001516&solr加字段

parent 9d1cfbad
......@@ -102,5 +102,8 @@ public enum AppProductTypeEnum {
*/
public static final String[] MEMBER_INCLUDE_APP_TYPE = {AppTypeEnum.ANSWER.value, AppTypeEnum.ITEM_BANK.value,
AppTypeEnum.EBOOK.value, AppTypeEnum.TEACH_RESOURCE.value, AppTypeEnum.COURSE_WARE.value,
AppTypeEnum.TEST_PAPER.value};
AppTypeEnum.TEST_PAPER.value, AppTypeEnum.AUDIO.value, AppTypeEnum.VIDEO.value, AppTypeEnum.MATCH_LISTEN.value,
AppTypeEnum.PBSTORY.value, AppTypeEnum.WORD_DICTATION.value, AppTypeEnum.ENGLISH_WALKMAN.value,
AppTypeEnum.ARTICLE_READING.value, AppTypeEnum.ORAL_EVALUATION.value, AppTypeEnum.IMAGE.value,
AppTypeEnum.STROKE_ORDER.value, AppTypeEnum.SUBJECTNOTE.value, AppTypeEnum.ZSCORE.value, AppTypeEnum.RECITE_WORD.value};
}
......@@ -133,6 +133,12 @@ public class SolrDto implements Serializable {
@Field
private String sceneCode;
/**
* 标题长度
*/
@Field
private Integer titleLength;
public String getId() {
return id;
}
......@@ -296,6 +302,14 @@ public class SolrDto implements Serializable {
this.sceneCode = sceneCode;
}
public Integer getTitleLength() {
return titleLength;
}
public void setTitleLength(Integer titleLength) {
this.titleLength = titleLength;
}
@Override
public String toString() {
return "SolrDto{" +
......@@ -316,6 +330,7 @@ public class SolrDto implements Serializable {
", createdDate=" + createdDate +
", lastModifiedDate=" + lastModifiedDate +
", channelId=" + channelId +
", titleLength=" + titleLength +
'}';
}
}
......@@ -44,7 +44,7 @@ public class SolrQueryParam {
/**
* 返回字段
*/
private String fl = "id,saleId,saleCode,typeId,typeCode,typeName,title,startDate,endDate,coverImg,description,createdUser,createdDate,lastModifiedDate,channelId,saleState,sceneCode";
private String fl = "id,saleId,saleCode,typeId,typeCode,typeName,title,startDate,endDate,coverImg,description,createdUser,createdDate,lastModifiedDate,channelId,saleState,sceneCode,titleLength";
public String getQ() {
return q;
......
......@@ -416,6 +416,7 @@ public class SolrUtils {
solrDto.setTypeId((Long) document.get("typeId"));
solrDto.setTypeCode((String) document.get("typeCode"));
solrDto.setTypeName((String) document.get("typeName"));
solrDto.setSceneCode((String)document.get("sceneCode"));
solrDto.setStartDate((Date) document.get("startDate"));
solrDto.setEndDate((Date) document.get("endDate"));
solrDto.setCoverImg((String) document.get("coverImg"));
......@@ -428,6 +429,7 @@ public class SolrUtils {
solrDto.setCreatedDate((Date) document.get("createdDate"));
solrDto.setLastModifiedDate((Date) document.get("lastModifiedDate"));
solrDto.setChannelId((Long) document.get("channelId"));
solrDto.setTitleLength((Integer)document.get("titleLength"));
return solrDto;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment