Преглед изворни кода

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

# Conflicts:
#	svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/PatientConsultEndpoint.java
wangzhinan пре 4 година
родитељ
комит
653389d4a1

+ 9 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/article/KnowledgeArticleDO.java

@ -41,6 +41,7 @@ public class KnowledgeArticleDO extends UuidIdentityEntity {
	private Integer collection;//收藏数量
	private Integer fabulous;//点赞数量
	private Integer share;//分享 数量
	private String intro;//简介
	@Transient
	private Integer isUsed;//是否已设置常用
@ -265,4 +266,12 @@ public class KnowledgeArticleDO extends UuidIdentityEntity {
	public void setKnowledgeArticleUserDO(KnowledgeArticleUserDO knowledgeArticleUserDO) {
		this.knowledgeArticleUserDO = knowledgeArticleUserDO;
	}
	public String getIntro() {
		return intro;
	}
	public void setIntro(String intro) {
		this.intro = intro;
	}
}

+ 6 - 6
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/KnowledgeArticleService.java

@ -1,6 +1,7 @@
package com.yihu.jw.hospital.service.consult;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.patient.BasePatientBusinessDO;
@ -16,7 +17,6 @@ import com.yihu.jw.im.util.ImUtil;
import com.yihu.jw.patient.dao.BasePatientBusinessDao;
import com.yihu.jw.utils.EntityUtils;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -223,11 +223,11 @@ public class KnowledgeArticleService extends BaseJpaService<KnowledgeArticleDO,
				if (patientBusinessDO.getRelationType()==1){
					KnowledgeArticleDO knowledgeArticleDO = knowledgeArticleDao.findByIdAndDel(patientBusinessDO.getRelationCode());
					System.out.println("content:"+JSON.toJSONString(knowledgeArticleDO));
					Map<String,Object> map = new HashedMap();
					map.put("id",knowledgeArticleDO.getId());
					map.put("title",knowledgeArticleDO.getTitle());
					map.put("content",knowledgeArticleDO.getContent());
					imUtil.sendImMsg(patientBusinessDO.getDoctor(), patientBusinessDO.getDoctorName(), patientBusinessDO.getSessionId(), "4", map.toString(),"1");
					JSONObject object = new JSONObject();
					object.put("id",knowledgeArticleDO.getId());
					object.put("title",knowledgeArticleDO.getTitle());
					object.put("content",knowledgeArticleDO.getIntro());
					imUtil.sendImMsg(patientBusinessDO.getDoctor(), patientBusinessDO.getDoctorName(), patientBusinessDO.getSessionId(), "4", object.toJSONString(),"1");
				}
			}