Commit bee2b62b by gaopeng

需求1001516&solr加字段

parent 9d1cfbad
...@@ -102,5 +102,8 @@ public enum AppProductTypeEnum { ...@@ -102,5 +102,8 @@ public enum AppProductTypeEnum {
*/ */
public static final String[] MEMBER_INCLUDE_APP_TYPE = {AppTypeEnum.ANSWER.value, AppTypeEnum.ITEM_BANK.value, 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.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 { ...@@ -133,6 +133,12 @@ public class SolrDto implements Serializable {
@Field @Field
private String sceneCode; private String sceneCode;
/**
* 标题长度
*/
@Field
private Integer titleLength;
public String getId() { public String getId() {
return id; return id;
} }
...@@ -296,6 +302,14 @@ public class SolrDto implements Serializable { ...@@ -296,6 +302,14 @@ public class SolrDto implements Serializable {
this.sceneCode = sceneCode; this.sceneCode = sceneCode;
} }
public Integer getTitleLength() {
return titleLength;
}
public void setTitleLength(Integer titleLength) {
this.titleLength = titleLength;
}
@Override @Override
public String toString() { public String toString() {
return "SolrDto{" + return "SolrDto{" +
...@@ -316,6 +330,7 @@ public class SolrDto implements Serializable { ...@@ -316,6 +330,7 @@ public class SolrDto implements Serializable {
", createdDate=" + createdDate + ", createdDate=" + createdDate +
", lastModifiedDate=" + lastModifiedDate + ", lastModifiedDate=" + lastModifiedDate +
", channelId=" + channelId + ", channelId=" + channelId +
", titleLength=" + titleLength +
'}'; '}';
} }
} }
...@@ -44,7 +44,7 @@ public class SolrQueryParam { ...@@ -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() { public String getQ() {
return q; return q;
......
...@@ -416,6 +416,7 @@ public class SolrUtils { ...@@ -416,6 +416,7 @@ public class SolrUtils {
solrDto.setTypeId((Long) document.get("typeId")); solrDto.setTypeId((Long) document.get("typeId"));
solrDto.setTypeCode((String) document.get("typeCode")); solrDto.setTypeCode((String) document.get("typeCode"));
solrDto.setTypeName((String) document.get("typeName")); solrDto.setTypeName((String) document.get("typeName"));
solrDto.setSceneCode((String)document.get("sceneCode"));
solrDto.setStartDate((Date) document.get("startDate")); solrDto.setStartDate((Date) document.get("startDate"));
solrDto.setEndDate((Date) document.get("endDate")); solrDto.setEndDate((Date) document.get("endDate"));
solrDto.setCoverImg((String) document.get("coverImg")); solrDto.setCoverImg((String) document.get("coverImg"));
...@@ -428,6 +429,7 @@ public class SolrUtils { ...@@ -428,6 +429,7 @@ public class SolrUtils {
solrDto.setCreatedDate((Date) document.get("createdDate")); solrDto.setCreatedDate((Date) document.get("createdDate"));
solrDto.setLastModifiedDate((Date) document.get("lastModifiedDate")); solrDto.setLastModifiedDate((Date) document.get("lastModifiedDate"));
solrDto.setChannelId((Long) document.get("channelId")); solrDto.setChannelId((Long) document.get("channelId"));
solrDto.setTitleLength((Integer)document.get("titleLength"));
return solrDto; 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