Przeglądaj źródła

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

yeshijie 7 lat temu
rodzic
commit
2892fa5c14

+ 9 - 9
edu-article/JkEdu/src/com/yihu/jk/api/ArticleApi.java

@ -557,15 +557,15 @@ public class ArticleApi {
			orgArticleVo.setArticleSource(orgName);
			//新增文章时 保存分享数,阅读数等数据
			ArticleStatistic statistic = new ArticleStatistic();
			statistic.setBrowseNumber(0);
			statistic.setPointNumber(0);
			statistic.setCommentNumber(0);
			statistic.setShareNumber(0);
			statistic.setCollectionNumber(0);
			statistic.setArticleId(articleId);
			dao.insertArticleInitStatistic(statistic);
//			ArticleStatistic statistic = new ArticleStatistic();
//			statistic.setBrowseNumber(0);
//			statistic.setPointNumber(0);
//			statistic.setCommentNumber(0);
//			statistic.setShareNumber(0);
//			statistic.setCollectionNumber(0);
//			statistic.setArticleId(articleId);
//			dao.insertArticleInitStatistic(statistic);
			dao.insertArticleStatistic(articleId);
			return dao.saveArticle(orgArticleVo).toString();
		}else{
			orgArticleVo.setArticleId(articleId);

+ 10 - 7
edu-article/JkEdu/src/com/yihu/jk/api/ArticleApiTest.java

@ -68,20 +68,23 @@ public class ArticleApiTest {
//		obj.put("articlelevel","1");
//		obj.put("articleTitle","1");
//		obj.put("userCode","0de7295862dd11e69faffa163e8aee56");
		obj.put("roleType",1);
		obj.put("currentUserRole","3502030700");
		obj.put("currentUserRoleLevel",4);//
//		obj.put("currentUserRole","3502110400");
		obj.put("userCode","0de7295862dd11e69faffa163e8aee56");//ylp201703150222
		//obj.put("roleType",1);
		obj.put("currentUserRole","3502110400");
		//obj.put("userCode","0de7295862dd11e69faffa163e8aee56");//ylp201703150222
		obj.put("isMyArticle",true);
		obj.put("page","0");
		obj.put("pageSize","10");
		obj.put("pageSize","9");
		obj.put("currentUserRoleLevel",4);//
		obj.put("sEcho","1");
//		obj.put("articleTitle","我口试");
		im.setParam(obj.toString());
		initDB();
		try{
//			api.authenticationArticle(im);
			System.out.println(api.queryArticleAPPList(im));
//			System.out.println(api.authenArticlePCList(im));//initArticleStatistic
			api.initArticleStatistic();
		}catch(Exception e){
			e.printStackTrace();
		}

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

@ -297,8 +297,8 @@ public class ArticleDao {
	public void insertArticleStatistic(String articleId) throws SQLException {
		Sql sql = DB.me().createSql(ArticleSqlNameEnum.insertArticleStatistic);
		sql.addParamValue(articleId);
		sql.addParamValue(articleId);
		System.out.println(sql.toString());
//		sql.addParamValue(articleId);
//		System.out.println(sql.toString());
		DB.me().insert(MyDatabaseEnum.JkEduDB, sql);
	}
@ -684,9 +684,9 @@ public class ArticleDao {
		}else if("4".equals(vo.getOperatorRoleLevel())){//社区、机构
			param.append(" and OperatorRoleCode = '"+vo.getOperatorRoleCode()+"' ");
		}
		param.append(" and UserScope <= ? ");
		if(StringUtil.isNotEmpty(vo.getOperatorRoleLevel())){
		if(StringUtil.isNotEmpty(vo.getOperatorRoleLevel())){
			param.append(" and UserScope <= ? ");
			sql.addParamValue(Integer.valueOf(vo.getOperatorRoleLevel())-1);
		}else{
			sql.addParamValue(3);
@ -778,6 +778,7 @@ public class ArticleDao {
        Sql sql = DB.me().createSql(ArticleSqlNameEnum.getArticlePcList);
        StringBuffer param = new StringBuffer();
		StringBuffer param2 = new StringBuffer();
        StringBuffer pageParam = new StringBuffer();
        if (StringUtil.isNotEmpty(vo.getFirstLevelCategoryId())) {
            param.append(" and FirstLevelCategoryId = ? ");
@ -811,6 +812,7 @@ public class ArticleDao {
        }
        sql.addVar("@Condition", param.toString());
        sql.addVar("@PageParam", pageParam.toString());
		sql.addVar("@Condition2", param2.toString());
        return DB.me().queryForJson(MyDatabaseEnum.JkEduDB, sql, start, pageSize);
    }

+ 36 - 28
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/jimeiJkEdu/JMJkEduArticleService.java

@ -109,7 +109,7 @@ public class JMJkEduArticleService extends BaseService {
//            sendCode = resultMap.size()>0?resultMap.get(0).get("roleCode").toString():sendCode;
//        }
        StringBuffer sql2 = new StringBuffer("select *  from   " + esType +
        StringBuffer sql2 = new StringBuffer("select articleId,articleTitle,firstLevelCategoryName,secondLevelCategoryName,articleSource,createTime  from   " + esType +
                " where  doctorCode='" + sendCode + "'");
        if(sendType==1){
@ -137,7 +137,7 @@ public class JMJkEduArticleService extends BaseService {
            sendTimeEnd = elasticsearchUtil.changeTime(sendTimeEnd);
            sql2.append(" and createTime <='"+sendTimeEnd+"'");
        }
        sql2.append("  order by createTime limit " + page + "," + pagesize);
        sql2.append(" group by articleId,articleTitle,firstLevelCategoryName,secondLevelCategoryName,articleSource,createTime  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;
@ -194,9 +194,10 @@ public class JMJkEduArticleService extends BaseService {
            if(article.getString("insertTime")!=null){
                heapm.setComputeTime(computeTime(article.getString("insertTime")));
            }
            doctor = doctorDao.findByCode(one.getDoctorCode());
            doctor = doctorDao.findByCode(sendCode);
            heapm.setPhoto(doctor.getPhoto());
            heapm.setOperatorName(article.getString("operatorName"));
            heapm.setArticleSource(one.getArticleSource());
            // heapm.setTime();//时间  xx小时前  2017-10-11
            resultList.add(heapm);
            result.put(one.getArticleId(), heapm);
@ -217,7 +218,7 @@ 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 *  from   " + esType +
        StringBuffer sql2 = new StringBuffer("select articleId,articleTitle,firstLevelCategoryName,secondLevelCategoryName,articleSource,createTime  from   " + esType +
                " where  sendCode='" + sendCode + "'");
        if(sendType==1){
@ -245,6 +246,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");
        List<HealthEduArticleES> esList = elasticsearchUtil.excute(sql2.toString(),HealthEduArticleES.class, esIndex, esType);
        return esList;
    }
@ -534,6 +536,33 @@ public class JMJkEduArticleService extends BaseService {
        }
        Patient one = null;
        String batchNo = UUID.randomUUID().toString();
        String sendName = "";
        if(sendType==2){
            String resultSql ="";
            String whereSql ="";
            switch (currentUserRoleLevel){
                case "1":{resultSql +=" DISTINCT (province_name) as name";
                    whereSql+=" and province ='"+currentUserRoleCode+"'";break;}
                case "2":{resultSql +=" DISTINCT (city_name) as name";
                    whereSql+=" and city ='"+currentUserRoleCode+"'";break;}
                case "3":{resultSql +=" DISTINCT (town_name) as name";
                    whereSql+=" and town ='"+currentUserRoleCode+"'";break;}
                case "4":{resultSql +=" DISTINCT (name) as name";
                    whereSql+=" and code ='"+currentUserRoleCode+"'";break;}
            }
            String sql = "select "+resultSql+" from dm_hospital  where level=2 "+whereSql ;
            List<Map<String, Object>> returnList = jdbcTemplate.queryForList(sql);
            sendName = returnList.get(0).get("name")+"";
        }
        Map<String,Object> resultMap = labelService.fetchUserHighestAuthority(sendCode);
        List<String> roleList = (List<String>)resultMap.get("roleList");
        List<RoleVo> roleVoLists= new ArrayList<>();
        for(String temp:roleList){
            RoleVo roleVo = new RoleVo();
            roleVo.setCode(temp);
            roleVoLists.add(roleVo);
        }
        JSONObject article = thirdJkEduArticleService.getArticalById(articleId,"");
        for (String patient : patientSet) {
            one = patientDao.findByCode(patient);
@ -544,21 +573,7 @@ public class JMJkEduArticleService extends BaseService {
            healthEduArticleES.setPatientCode(patient);
            healthEduArticleES.setPatientName(one.getName());
            if(sendType==2){
                String resultSql ="";
                String whereSql ="";
                switch (currentUserRoleLevel){
                    case "1":{resultSql +=" DISTINCT (province_name) as name";
                        whereSql+=" and province ='"+currentUserRoleCode+"'";break;}
                    case "2":{resultSql +=" DISTINCT (city_name) as name";
                        whereSql+=" and city ='"+currentUserRoleCode+"'";break;}
                    case "3":{resultSql +=" DISTINCT (town_name) as name";
                        whereSql+=" and town ='"+currentUserRoleCode+"'";break;}
                    case "4":{resultSql +=" DISTINCT (name) as name";
                        whereSql+=" and code ='"+currentUserRoleCode+"'";break;}
                }
                String sql = "select "+resultSql+" from dm_hospital  where level=2 "+whereSql ;
                List<Map<String, Object>> returnList = jdbcTemplate.queryForList(sql);
                String sendName = returnList.get(0).get("name")+"";
                healthEduArticleES.setSendName(sendName);
                healthEduArticleES.setSendLevel("4");
@ -580,7 +595,7 @@ public class JMJkEduArticleService extends BaseService {
            healthEduArticleES.setTownName(doctor.getTownName());
            healthEduArticleES.setCreateTime(new Date());
            healthEduArticleES.setSendType(sendType);
            JSONObject article = thirdJkEduArticleService.getArticalById(articleId,"");
            healthEduArticleES.setArticleId(article.get("articleId") + "");
            healthEduArticleES.setArticleTitle(article.get("articleTitle") + "");
            healthEduArticleES.setArticleCover(article.get("articleCover") + "");
@ -592,14 +607,7 @@ public class JMJkEduArticleService extends BaseService {
            healthEduArticleES.setSecondLevelCategoryName(article.get("secondLevelCategoryName") + "");
            healthEduArticleES.setOperatorId(article.get("operatorId") + "");
            healthEduArticleES.setArticleSource(article.get("articleSource") + "");
            Map<String,Object> resultMap = labelService.fetchUserHighestAuthority(sendCode);
            List<String> roleList = (List<String>)resultMap.get("roleList");
            List<RoleVo> roleVoLists= new ArrayList<>();
            for(String temp:roleList){
                RoleVo roleVo = new RoleVo();
                roleVo.setCode(temp);
                roleVoLists.add(roleVo);
            }
            healthEduArticleES.setRoleList(roleVoLists);
            healthEduArticleES.setLeaveWords(leaveWords);
            healthEduArticleES.setCurrentUserRoleCode(currentUserRoleCode);

+ 30 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/jkEduArticle/ThirdJkEduArticleService.java

@ -28,6 +28,7 @@ import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import springfox.documentation.spring.web.json.Json;
import java.util.*;
@ -103,6 +104,7 @@ public class ThirdJkEduArticleService extends BaseService {
    private String updateArticleQRCode = "JkEdu.ArticleQR.updateArticleQRCode";//更新认证标识
    private String saveArticleQRCode = "JkEdu.ArticleQR.saveArticleQRCode";//添加认证标识
    private String getArticleQRCodeById = "JkEdu.ArticleQR.getArticleQRCodeById";//根据id获取认证标识
    private String saveBehavior = "JkEdu.Behavior.saveBehavior";//根据id获取认证标识
    /**
     * 封装入参
     *
@ -731,7 +733,7 @@ public class ThirdJkEduArticleService extends BaseService {
     * @return
     * @throws Exception
     */
    public void checkCategory(String categoryName,Integer categoryLevel) throws Exception {
    public boolean checkCategory(String categoryName,Integer categoryLevel) throws Exception {
        JSONObject json = null;
        try {
            JSONObject param = new JSONObject();
@ -739,12 +741,15 @@ public class ThirdJkEduArticleService extends BaseService {
            param.put("categoryLevel", categoryLevel);
            String response = httpClientUtil.httpPost(articleBaseUrl+"/WsPlatform/rest", getParamsMap(checkCategory, param.toString(), "1"));
            json = JSON.parseObject(response);
            JSONArray j = (JSONArray) json.get("result");
            if(j!=null&&j.size()>0){
                return true;
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        if (!"10000".equals(json.getString("Code"))) {
            new Exception(json.getString("Message"));
        }
        return false;
    }
    /**
@ -916,6 +921,27 @@ public class ThirdJkEduArticleService extends BaseService {
        }
    }
    /**************************************************** behaver *******************************************************/
    public void saveBehavior(String articleId,String cName,String userId) throws Exception {
        JSONObject json = null;
        try{
            JSONObject param = new JSONObject();
            param.put("articleId",articleId);// 文章ID
            param.put("cName",cName);//用户名称
            param.put("userId",userId);//用户ID
            String response = httpClientUtil.httpPost(articleBaseUrl+"/WsPlatform/rest", getParamsMap(saveBehavior, param.toString(), "1"));
            json = JSON.parseObject(response);
        }catch (Exception e) {
            e.printStackTrace();
        }
        if (!"10000".equals(json.getString("Code"))) {
            throw new Exception(json.getString("Message"));
        }
    }
    /**************************************************** other *******************************************************/
    /**

+ 17 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/ElasticsearchUtil.java

@ -23,6 +23,8 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;
import java.sql.Timestamp;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@ -111,12 +113,26 @@ public class ElasticsearchUtil {
                            if (heads.get(i).contains("date_histogram")) {
                                key = "setQuotaDate";
                            }
                            
                            try {
                                //yyyy-MM-dd'T'HH:mm:ssXX
                                value = dateFormat.parse(String.valueOf(one.get(i)));
                            } catch (Exception e) {
                                //yyyy-MM-dd HH:mm:ss
                                value = dateFormat1.parse(String.valueOf(one.get(i)));
                                try {
                                    value = dateFormat1.parse(String.valueOf(one.get(i)));
                                }catch (Exception e1){
                                    Timestamp ts = new Timestamp(Long.parseLong(String.valueOf(one.get(i))));
                                    try {
                                        Date date = new Date();
                                        date = ts;
                                        value =date;
                                    
                                    } catch (Exception e2) {
                                        value = String.valueOf(one.get(i));
                                    }
                                }
                                
                            }
//                            value = DateUtil.strToDate(String.valueOf(value).replace("T00:00:00+0800", " 00:00:00"), "yyyy-MM-dd HH:mm:ss");
                        }

+ 61 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/sms/SMSController.java

@ -1,7 +1,10 @@
package com.yihu.wlyy.web.common.sms;
import com.yihu.wlyy.service.app.prescription.PrescriptionInfoService;
import io.swagger.annotations.Api;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
@ -25,6 +28,8 @@ import java.util.List;
@Api(description = "短信")
public class SMSController extends BaseController {
	private static final Logger logger = LoggerFactory.getLogger(PrescriptionInfoService.class);
	@Autowired
	public SMSService smsService;
	@Autowired
@ -94,6 +99,62 @@ public class SMSController extends BaseController {
		}
	}
	@RequestMapping(value = "checkCaptcha", method = RequestMethod.POST)
	@ResponseBody
	public String send2(String mobile, int type, @RequestParam(required = false) String captchaToken) {
		try {
			logger.info("in checkCaptcha");
			if (type > 10 || type < 1) {
				return error(-1, "无效的请求!");
			}
			if (StringUtils.isEmpty(mobile)) {
				return error(-1, "手机号码不允许为空!");
			}
//			if (type == 4) {
//				// 登录时校验用户是否存在
//				List<Patient> patients = patientDao.findByMobile(mobile);
//				if (patients == null||patients.size()==0) {
//					return error(-1, "该手机号未注册!");
//				}
//			} else if (type == 5) {
//				// 登录时校验用户是否存在
//				Doctor doctor = doctorDao.findByMobile(mobile);
//				if (doctor == null) {
//					return error(-1, "该手机号未注册!");
//				}
//			}
			if (StringUtils.isNotEmpty(captchaToken)) {
				String ct = request.getSession().getAttribute("captchaToken").toString();
				if (!StringUtils.equalsIgnoreCase(captchaToken, ct)) {
					return error(-1, "图形验证码错误!");
				}
			}
			// 获取ip地址
			String ip = NetworkUtil.getIpAddress(request);
			if (StringUtils.isEmpty(ip)) {
				return error(-1, "无效的ip请求!");
			}
//			String res = smsService.send(mobile, ip, type, getUID());
			String res = null;
			//内网发送 通过redis的队列
			if("local".equals(springProfiles)){
				logger.info("sendToNeiWang");
				res = smsService.sendToNeiWang(mobile, ip, type);
			}else {
				logger.info("smsService.send");
				res = smsService.send(mobile, ip, type, getRepUID());
			}
			if (StringUtils.equals(res, "ok")) {
				return write(200, "验证码短信已发送!");
			} else {
				return error(-1, res);
			}
		} catch (Exception e) {
			error(e);
			return error(-1, "短信发送失败!");
		}
	}
	/**
	 * 验证手机验证码
	 * @param type 消息类型:1微信端注册,2微信端找回密码,3医生端找回密码

+ 8 - 8
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/jimeiJkEduPC/DoctorJMJkEduArticlePCController.java

@ -276,18 +276,18 @@ public class DoctorJMJkEduArticlePCController extends BaseController {
            }
            List<HealthEduArticlePatientModel> eduArticlePatients = jmJkEduArticleService.pushArticleList(page, pagesize, getUID(),firstLevelCategoryId,secondLevelCategoryId,myArticle,sendType,currentRoleCode,currentRoleLevel,articleTitle,sendTimeStart,sendTimeEnd);
//            Long count = jmJkEduArticleService.pushArticleListCount(getUID(),2);
            List<HealthEduArticleES> eduArticlePatientsCount = jmJkEduArticleService.pushArticleListCount(getUID(),firstLevelCategoryId,secondLevelCategoryId,myArticle,sendType,currentRoleCode,
            List<HealthEduArticleES> eduArticlePatientsCount = jmJkEduArticleService.pushArticleListCount( getUID(),firstLevelCategoryId,secondLevelCategoryId,myArticle,sendType,currentRoleCode,
                    currentRoleLevel, articleTitle,sendTimeStart, sendTimeEnd);
            net.sf.json.JSONObject obj = new net.sf.json.JSONObject();
            obj.put("Code", 100);
            obj.put("Message", "成功");
            JSONArray obj2 = new JSONArray();
            if(!eduArticlePatients.isEmpty()){
                for (int i = 0; i < eduArticlePatients.size(); i++) {
                    obj2.add(eduArticlePatients.get(i));
                }
            }
            obj.put("aaData",  obj2.toString());
//            JSONArray obj2 = new JSONArray();
//            if(!eduArticlePatients.isEmpty()){
//                for (int i = 0; i < eduArticlePatients.size(); i++) {
//                    obj2.add(eduArticlePatients.get(i));
//                }
//            }
            obj.put("aaData",  eduArticlePatients);
            obj.put("iTotalDisplayRecords", eduArticlePatientsCount.size());
            obj.put("iTotalRecords", eduArticlePatientsCount.size());
            obj.put("sEcho", sEcho);

+ 19 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/jimeiJkEdu/PatientJMJkEduArticleController.java

@ -3,6 +3,7 @@ package com.yihu.wlyy.web.patient.jimeiJkEdu;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.wlyy.service.jimeiJkEdu.JMJkEduArticleService;
import com.yihu.wlyy.service.third.jkEduArticle.ThirdJkEduArticleService;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -28,6 +29,8 @@ public class PatientJMJkEduArticleController extends BaseController {
    @Autowired
    private JMJkEduArticleService jmJkEduArticleService;
    @Autowired
    private ThirdJkEduArticleService thirdJkEduArticleService;
    @RequestMapping(value = "fetchArticlePushedList", method = RequestMethod.GET)
    @ApiOperation("居民获取被推送文章列表 ")
@ -183,4 +186,20 @@ public class PatientJMJkEduArticleController extends BaseController {
            return error(-1,"查询失败!");
        }
    }
    @RequestMapping(value = "saveBehavior", method = RequestMethod.POST)
    @ApiOperation("添加 浏览、转发、分享、点赞 ")
    public String saveBehavior(
            @ApiParam(name = "articleId", value = "文章ID", required = true) @RequestParam(value = "articleId", required = true) String articleId,
            @ApiParam(name = "cName", value = "用户名称", required = true) @RequestParam(value = "cName", required = true) String cName,
            @ApiParam(name = "userId", value = "用户ID", required = true) @RequestParam(value = "userId", required = false) String  userId){
        try {
            thirdJkEduArticleService.saveBehavior(articleId,cName,userId);
//            Long count = healthEducationArticleService.pushArticleLogsCount("ece5c665b16542b0847e52b4a9fee44a");
            return write(200,"保存成功!");
        }catch (Exception e) {
            e.printStackTrace();
            return error(-1,"保存失败!");
        }
    }
}

+ 12 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/gateway/vo/HealthEduArticlePatientModel.java

@ -47,10 +47,12 @@ public class HealthEduArticlePatientModel {
    private Integer sendType = 0;//发送类型 1医生发送 2卫纪委发送
    @ApiModelProperty(value = "已读未读标识:1已读,0未读", required = false, access = "response")
    private String isread;//已读未读
    @ApiModelProperty(value = "", required = false, access = "response")
    @ApiModelProperty(value = "医生留言", required = false, access = "response")
    private String leaveWords;//医生留言
    @ApiModelProperty(value = "", required = false, access = "response")
    @ApiModelProperty(value = "收藏数", required = false, access = "response")
    private Integer collectionNumber;//收藏数
    @ApiModelProperty(value = "文章来源", required = false, access = "response")
    private String articleSource;//文章来源
    
    private String computeTime;//时间
    private String photo;//医生头像
@ -247,4 +249,12 @@ public class HealthEduArticlePatientModel {
    public void setCollectionNumber(Integer collectionNumber) {
        this.collectionNumber = collectionNumber;
    }
    
    public String getArticleSource() {
        return articleSource;
    }
    
    public void setArticleSource(String articleSource) {
        this.articleSource = articleSource;
    }
}

+ 7 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/jkEduArticle/ThirdJkEduArticleController.java

@ -119,11 +119,11 @@ public class ThirdJkEduArticleController extends BaseController {
    public String getArticalById(@ApiParam(name = "articleId", value = "文章id",defaultValue = "1")
                                 @RequestParam(value = "articleId", required = true) String articleId,
                                 @ApiParam(name = "userType", value = "用户类型:1医生,2居民",defaultValue = "1")
                                 @RequestParam(value = "userType", required = true) Integer userType){
                                 @RequestParam(value = "userType", required = false) String userType){
        try {
            com.alibaba.fastjson.JSONObject response = thirdJkEduArticleService.getArticalById(articleId,getRepUID());
            com.alibaba.fastjson.JSONObject response = thirdJkEduArticleService.getArticalById(articleId,getUID());
            
            if(2 == userType){
            if("2".equals(userType)){
                jmJkEduArticleService.readPatientArticle(getRepUID(),articleId);
            }
            
@ -249,6 +249,10 @@ public class ThirdJkEduArticleController extends BaseController {
    ){
        try {
            boolean flag = thirdJkEduArticleService.checkCategory(categoryName,categoryLevel);
            if(flag){
                return error(-2,"文章分类名称重复!");
            }
            thirdJkEduArticleService.addCategory(categoryName,categoryLevel,firstlevelId,secondLevelId,getUID(),getCurrentRoleCode());
            return success("添加成功!");
        }catch (Exception e){