Browse Source

集美宣教代码提交

liuwenbin 7 years ago
parent
commit
eef0dc970d

+ 10 - 0
common/common-entity/src/main/java/com/yihu/es/entity/HealthEduArticleES.java

@ -61,6 +61,8 @@ public class HealthEduArticleES {
    @Transient
    private Boolean newArricleFlag;//新版文章推送标志
    private Integer userType; // 1、患者,2医生
    public String getId() {
        return id;
    }
@ -356,4 +358,12 @@ public class HealthEduArticleES {
    public void setNewArricleFlag(Boolean newArricleFlag) {
        this.newArricleFlag = newArricleFlag;
    }
    public Integer getUserType() {
        return userType;
    }
    public void setUserType(Integer userType) {
        this.userType = userType;
    }
}

+ 7 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/jimeiJkEdu/JMJkEduArticleService.java

@ -612,11 +612,18 @@ public class JMJkEduArticleService extends BaseService {
            healthEduArticleES.setCurrentUserRoleLevel(currentUserRoleLevel);
//            healthEduArticleES.setSendSource();
            healthEduArticleES.setAllCount(patientSet.size());
            healthEduArticleES.setUserType(1);
            healthEduArticleESList.add(healthEduArticleES);
        }
        //保存到ES中
        elastricSearchSave.save(healthEduArticleESList, esIndex, esType);
        HealthEduArticleES e = healthEduArticleESList.get(0);
        e.setUserType(2);
        e.setPatientCode(null);
        e.setPatientName(null);
        elastricSearchSave.save(e, esIndex, esType);
        return healthEduArticleESList;
    }
    public JSONObject pushArticleConfirm(String articleId, String labelUnit, String labelSex, String labelServe, String labelDisease, String labelHealth,String userCode,String currentUserRole, String currentUserRoleLevel) throws Exception {