ソースを参照

Merge branch 'dev' of liuwenbin/patient-co-management into dev

huangwenjie 7 年 前
コミット
87c69d6461

+ 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;
    }
}

+ 13 - 2
edu-article/JkEdu/src/com/yihu/jk/api/BehaviorApi.java

@ -92,11 +92,22 @@ public class BehaviorApi {
		try {
			subDao.saveArticleCollection(vo);
			if (userType == 2) {
//			if (userType == 2) {
				int behaviorAction = 6;
				int number = 1;
				ArticleApi.updateArticleStatistic(articleId, behaviorAction, number);
			}
//			}
			Behavior behavior = new Behavior();
			behavior.setArticleId(articleId);
			behavior.setBehaviorAction(behaviorAction);
			behavior.setcName(cName);
			behavior.setUserId(userId);
//			ArticleStatistic arvo = new ArticleStatistic();
			arvo.setArticleId(articleId);
			subDao.saveBehavior(behavior);
			ArticleApi.updateArticleStatistic(articleId, behaviorAction, number);
			return ApiUtil.getRespJSON(10000, "成功").toString();
		} catch (SQLException e) {
			e.printStackTrace();

+ 7 - 3
edu-article/JkEdu/src/com/yihu/jk/api/CategoryApiTest.java

@ -26,16 +26,20 @@ public class CategoryApiTest {
	// 获取系统配置 认证 评论开关
	public static void addCategory()throws Exception{
		CategoryApi api = new CategoryApi();
		BehaviorApi api = new BehaviorApi();//
		InterfaceMessage im = new InterfaceMessage();
		JSONObject obj = new JSONObject();
		obj.put("categoryName","内部通知");
		obj.put("articleId","内部通知");
		obj.put("cName","2");
		obj.put("userId","2");
		obj.put("userType","2");
		obj.put("categoryLevel","2");
		obj.put("categoryLevel","2");
		im.setParam(obj.toString());
		initDB();
		System.out.println(api.checkCategory(im));
		System.out.println(api.saveArticleCollection(im));
	}

+ 1 - 1
edu-article/JkEdu/src/com/yihu/jk/dao/ArticleDao.java

@ -297,7 +297,7 @@ public class ArticleDao {
	public void insertArticleStatistic(String articleId) throws SQLException {
		Sql sql = DB.me().createSql(ArticleSqlNameEnum.insertArticleStatistic);
		sql.addParamValue(articleId);
//		sql.addParamValue(articleId);
		sql.addParamValue(articleId);
//		System.out.println(sql.toString());
		DB.me().insert(MyDatabaseEnum.JkEduDB, sql);
	}

+ 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 {