Bläddra i källkod

调查随访问卷ES脚本、ES实体类对象提交、相关配置文件修改

huangwenjie 7 år sedan
förälder
incheckning
9ffac0440e

+ 129 - 0
common/common-entity/src/main/java/com/yihu/es/entity/QuestionnaireWinningESDO.java

@ -0,0 +1,129 @@
package com.yihu.es.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.searchbox.annotations.JestId;
import org.springframework.data.annotation.CreatedDate;
import java.util.Date;
/**
 * 调查问卷中奖纪录
 * @author huangwenjie
 * @date 2018/1/28 19:51
 */
public class QuestionnaireWinningESDO {
	
	@JestId
	private String id;
	// 业务主键
	private String code;
	//用户CODE
	private String userCode;
	//用户身份证信息
	private String userIdcard;
	//中奖人姓名
	private String userName;
	//中奖人openid
	private String userOpenid;
	//奖品类型:1电影票
	private Integer prizeType;
	//奖品兑奖码
	private String prizeCode;
	//0为未删除,1为删除
	private Integer del;
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyyMMdd'T'HHmmss.SSS'Z'")
	@CreatedDate
	private Date create_time;
	
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyyMMdd'T'HHmmss.SSS'Z'")
	private Date update_time;
	
	
	public String getId() {
		return id;
	}
	
	public void setId(String id) {
		this.id = id;
	}
	
	public String getCode() {
		return code;
	}
	
	public void setCode(String code) {
		this.code = code;
	}
	
	public String getUserCode() {
		return userCode;
	}
	
	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}
	
	public String getUserIdcard() {
		return userIdcard;
	}
	
	public void setUserIdcard(String userIdcard) {
		this.userIdcard = userIdcard;
	}
	
	public String getUserName() {
		return userName;
	}
	
	public void setUserName(String userName) {
		this.userName = userName;
	}
	
	public String getUserOpenid() {
		return userOpenid;
	}
	
	public void setUserOpenid(String userOpenid) {
		this.userOpenid = userOpenid;
	}
	
	public Integer getPrizeType() {
		return prizeType;
	}
	
	public void setPrizeType(Integer prizeType) {
		this.prizeType = prizeType;
	}
	
	public String getPrizeCode() {
		return prizeCode;
	}
	
	public void setPrizeCode(String prizeCode) {
		this.prizeCode = prizeCode;
	}
	
	public Integer getDel() {
		return del;
	}
	
	public void setDel(Integer del) {
		this.del = del;
	}
	
	public Date getCreate_time() {
		return create_time;
	}
	
	public void setCreate_time(Date create_time) {
		this.create_time = create_time;
	}
	
	public Date getUpdate_time() {
		return update_time;
	}
	
	public void setUpdate_time(Date update_time) {
		this.update_time = update_time;
	}
}

+ 58 - 0
patient-co/patient-co-wlyy/doc/技术文档/es/回访问卷新增索引.txt

@ -0,0 +1,58 @@
创建索引
POST  http://172.19.103.68:9200/wlyy_questionnaire_winning
查询索引
GET http://172.19.103.68:9200/wlyy_questionnaire_winning/
给索引加mapping
POST http://172.19.103.68:9200/wlyy_questionnaire_winning/wlyy_questionnaire_winning/_mapping
{
    "wlyy_questionnaire_winning": {
        "properties": {
            "code": {
                "type": "string",
                "index": "not_analyzed"
            },
            "userCode": {
                "type": "string",
                "index": "not_analyzed"
            },
            "userIdcard": {
                "type": "string",
                "index": "not_analyzed"
            },
            "userName": {
                "type": "string",
                "index": "not_analyzed"
            },
            "userOpenid": {
                "type": "string",
                "index": "not_analyzed"
            },
            "prizeCode": {
                "type": "string",
                "index": "not_analyzed"
            },
            "del": {
                "type": "string",
                "index": "not_analyzed"
            },
            "create_time": {
                "type": "string",
                "index": "not_analyzed"
            },
            "update_time": {
                "type": "string",
                "index": "not_analyzed"
            }
        }
    }
}
增加索引搜索大小
PUT  http://172.19.103.68:9200/wlyy_questionnaire_winning/_settings
{
  "index": {
    "max_result_window": 500000
  }
}

+ 2 - 0
patient-co/patient-co-wlyy/src/main/resources/application-dev.yml

@ -110,10 +110,12 @@ es:
    HealthEduArticlePatient: health_edu_article_patient_test2
    Statistics: wlyy_quota_test
    FollowUp: wlyy_followup
    QuestionnaireWinning: wlyy_questionnaire_winning
  type:
    HealthEduArticlePatient: health_edu_article_patient_test2
    Statistics: wlyy_quota_test
    FollowUpContent: wlyy_followup_content
    QuestionnaireWinning: wlyy_questionnaire_winning
  host:  http://172.19.103.68:9200
  tHost: 172.19.103.68:9300
  clusterName: jkzl

+ 2 - 0
patient-co/patient-co-wlyy/src/main/resources/application-devtest.yml

@ -108,10 +108,12 @@ es:
    HealthEduArticlePatient: health_edu_article_patient_test3
    FollowUp: wlyy_followup
    Statistics: wlyy_quota_test
    QuestionnaireWinning: wlyy_questionnaire_winning
  type:
    HealthEduArticlePatient: health_edu_article_patient_test3
    FollowUpContent: wlyy_followup_content
    Statistics: wlyy_quota_test
    QuestionnaireWinning: wlyy_questionnaire_winning
  host:  http://172.19.103.68:9200
  tHost: 172.19.103.68:9300
  clusterName: jkzl

+ 2 - 0
patient-co/patient-co-wlyy/src/main/resources/application-local.yml

@ -102,10 +102,12 @@ es:
    HealthEduArticlePatient: health_edu_article_patient_test
    Statistics: wlyy_quota_prod
    FollowUp: wlyy_followup
    QuestionnaireWinning: wlyy_questionnaire_winning
  type:
    HealthEduArticlePatient: health_edu_article_patient_test
    Statistics: wlyy_quota_prod
    FollowUpContent: wlyy_followup_content
    QuestionnaireWinning: wlyy_questionnaire_winning
  host:  http://10.95.22.155:9200,http://10.95.22.156:9200
  tHost: 10.95.22.155:9300,10.95.22.156:9300
  clusterName: jkzl

+ 2 - 0
patient-co/patient-co-wlyy/src/main/resources/application-localtest.yml

@ -103,10 +103,12 @@ es:
    HealthEduArticlePatient: health_edu_article_patient_test
    Statistics: wlyy_quota_test
    FollowUp: wlyy_followup
    QuestionnaireWinning: wlyy_questionnaire_winning
  type:
    HealthEduArticlePatient: health_edu_article_patient_test
    Statistics: wlyy_quota_test
    FollowUpContent: wlyy_followup_content
    QuestionnaireWinning: wlyy_questionnaire_winning
  host:  http://172.19.103.68:9200
  tHost: 172.19.103.68:9300
  clusterName: jkzl

+ 2 - 0
patient-co/patient-co-wlyy/src/main/resources/application-prod.yml

@ -108,10 +108,12 @@ es:
    HealthEduArticlePatient: health_edu_article_patient
    Statistics: wlyy_quota_prod
    FollowUp: wlyy_followup
    QuestionnaireWinning: wlyy_questionnaire_winning
  type:
    HealthEduArticlePatient: health_edu_article_patient
    Statistics: wlyy_quota_prod
    FollowUpContent: wlyy_followup_content
    QuestionnaireWinning: wlyy_questionnaire_winning
  host:  http://59.61.92.90:9065,http://59.61.92.90:9067
  tHost: 59.61.92.90:9066,59.61.92.90:9068
  clusterName: jkzl

+ 2 - 0
patient-co/patient-co-wlyy/src/main/resources/application-test.yml

@ -101,10 +101,12 @@ es:
    HealthEduArticlePatient: health_edu_article_patient_test3
    FollowUp: wlyy_followup
    Statistics: wlyy_quota_test
    QuestionnaireWinning: wlyy_questionnaire_winning
  type:
    HealthEduArticlePatient: health_edu_article_patient_test3
    FollowUpContent: wlyy_followup_content
    Statistics: wlyy_quota_test
    QuestionnaireWinning: wlyy_questionnaire_winning
  host:  http://172.19.103.68:9200
  tHost: 172.19.103.68:9300
  clusterName: jkzl