|
@ -1,34 +1,20 @@
|
|
|
package com.yihu.wlyy.web.third.jkEduArticle;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.yihu.wlyy.aop.ObserverRequired;
|
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
|
import com.yihu.wlyy.service.third.jkEduArticle.ThirdJkEduArticleService;
|
|
|
import com.yihu.wlyy.task.PushMsgTask;
|
|
|
import com.yihu.wlyy.web.BaseController;
|
|
|
import com.yihu.wlyy.web.third.gateway.service.GcEduArticleService;
|
|
|
import com.yihu.wlyy.web.third.gateway.vo.HealthEduArticlePatientModel;
|
|
|
import com.yihu.wlyy.web.third.gateway.vo.base.BaseResultModel;
|
|
|
import com.yihu.wlyy.web.third.gateway.vo.base.ResultPageListModel;
|
|
|
import com.yihu.wlyy.wechat.util.WeiXinTempMsgSendUtils;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import org.elasticsearch.common.collect.HppcMaps;
|
|
|
import org.json.JSONObject;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.jms.core.JmsTemplate;
|
|
|
import org.springframework.jms.core.MessageCreator;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.jms.JMSException;
|
|
|
import javax.jms.Message;
|
|
|
import javax.jms.Session;
|
|
|
import javax.jms.TextMessage;
|
|
|
import java.util.HashSet;
|
|
|
import java.util.List;
|
|
|
import java.util.Set;
|
|
|
|
|
|
/**
|
|
|
* 调用福州健教接口
|
|
@ -46,10 +32,6 @@ public class ThirdJkEduArticleController extends BaseController {
|
|
|
private String articleBaseUrl;
|
|
|
@Autowired
|
|
|
private ThirdJkEduArticleService thirdJkEduArticleService;
|
|
|
@Autowired
|
|
|
private GcEduArticleService gcEduArticleService;
|
|
|
@Autowired
|
|
|
private JmsTemplate jmsTemplate;
|
|
|
|
|
|
|
|
|
/**********************************福州健康文章接口********************************************/
|
|
@ -252,6 +234,36 @@ public class ThirdJkEduArticleController extends BaseController {
|
|
|
return error(-1,"查询失败!");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "getCategoryByName",method = RequestMethod.GET)
|
|
|
@ApiOperation("根据一级类别名称获取二级分类下得所有分类")
|
|
|
public String getCategoryList(@ApiParam(name = "name", value = "类别名称")
|
|
|
@RequestParam(value = "name", required = true) String name){
|
|
|
try {
|
|
|
com.alibaba.fastjson.JSONArray response = thirdJkEduArticleService.getCategoryList(1,"","");
|
|
|
if(response.size() > 0){
|
|
|
String cid = "";
|
|
|
for (int i = 0; i < response.size(); i++) {
|
|
|
String cname = response.getJSONObject(i).getString("categoryname");
|
|
|
if(StringUtils.isNotBlank(cname) && name.equals(cname)){
|
|
|
cid = response.getJSONObject(i).getString("categoryid");
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(cid)){
|
|
|
response = thirdJkEduArticleService.getCategoryList(1,cid,"");
|
|
|
}else{
|
|
|
response = new JSONArray();
|
|
|
}
|
|
|
}else{
|
|
|
response = new JSONArray();
|
|
|
}
|
|
|
return write(200,"查询成功!","data",response);
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
return error(-1,"查询失败!");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/*************************************************** ConfigDicSho *************************************************/
|
|
|
|