浏览代码

每日推送接口BUG修改

huangwenjie 7 年之前
父节点
当前提交
c52f93c2a3

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

@ -109,8 +109,8 @@ public class JMJkEduArticleService extends BaseService {
//            sendCode = resultMap.size()>0?resultMap.get(0).get("roleCode").toString():sendCode;
//        }
        StringBuffer sql2 = new StringBuffer("select articleId,articleTitle,firstLevelCategoryName,secondLevelCategoryName,articleSource,createTime  from   " + esType +
                " where  doctorCode='" + sendCode + "'");
        StringBuffer sql2 = new StringBuffer("select * from   " + esType +
                " where  doctorCode='" + sendCode + "' and userType = 2");
        if(sendType==1){
            sql2.append(" and sendType='"+sendType+"' ");
@ -137,7 +137,7 @@ public class JMJkEduArticleService extends BaseService {
            sendTimeEnd = elasticsearchUtil.changeTime(sendTimeEnd);
            sql2.append(" and createTime <='"+sendTimeEnd+"'");
        }
        sql2.append(" group by articleId,articleTitle,firstLevelCategoryName,secondLevelCategoryName,articleSource,createTime  order by createTime limit " + page + "," + pagesize);
        sql2.append(" order by createTime limit " + page + "," + pagesize);
        List<HealthEduArticleES> esList = elasticsearchUtil.excute(sql2.toString(), HealthEduArticleES.class, esIndex, esType);
        Map<String, HealthEduArticlePatientModel> result = new HashMap<>();
        HealthEduArticlePatientModel heapm = null;
@ -218,8 +218,8 @@ public class JMJkEduArticleService extends BaseService {
    public List<HealthEduArticleES> pushArticleListCount(String sendCode,  String firstLevelCategoryId,String secondLevelCategoryId,Integer myArticle,Integer sendType,String currentUserRole,
                                                              String currentUserRoleLevel,String articleTitle,String sendTimeStart,String sendTimeEnd) throws Exception {
        StringBuffer sql2 = new StringBuffer("select articleId,articleTitle,firstLevelCategoryName,secondLevelCategoryName,articleSource,createTime  from   " + esType +
                " where  sendCode='" + sendCode + "'");
        StringBuffer sql2 = new StringBuffer("select from   " + esType +
                " where  sendCode='" + sendCode + "' and userType = 2" );
        if(sendType==1){
            sql2.append(" and sendType='"+sendType+"' ");
@ -246,7 +246,6 @@ public class JMJkEduArticleService extends BaseService {
            sendTimeEnd = elasticsearchUtil.changeTime(sendTimeEnd);
            sql2.append(" and createTime <='"+sendTimeEnd+"'");
        }
        sql2.append(" group by articleId,articleTitle,firstLevelCategoryName,secondLevelCategoryName,articleSource,createTime");
        List<HealthEduArticleES> esList = elasticsearchUtil.excute(sql2.toString(),HealthEduArticleES.class, esIndex, esType);
        return esList;
    }
@ -1163,7 +1162,7 @@ public class JMJkEduArticleService extends BaseService {
        pagesize = page * pagesize;
        page = (page - 1) * pagesize;
        String sql = "SELECT * FROM " + esType + "  where patientCode= '" + patientCode + "' ";
        String sql = "SELECT * FROM " + esType + "  where patientCode= '" + patientCode + "' and userType = 1";
        
        if(!StringUtils.isEmpty(level1Type)){
            sql= sql + " and firstLevelCategoryId = '"+level1Type+"' ";

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

@ -101,11 +101,11 @@ pushMes:
  redis_prescription_title: redisMessage
es:
  index:
    HealthEduArticlePatient: health_edu_article_patient_test3
    HealthEduArticlePatient: health_edu_article_patient_test6
    FollowUp: wlyy_followup
    Statistics: wlyy_quota_test
  type:
    HealthEduArticlePatient: health_edu_article_patient_test3
    HealthEduArticlePatient: health_edu_article_patient_test6
    FollowUpContent: wlyy_followup_content
    Statistics: wlyy_quota_test
  host:  http://172.19.103.68:9200