|
@ -3,6 +3,7 @@ package com.yihu.wlyy.web.doctor.jimeiJkEduPC;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.yihu.es.entity.HealthEduArticleES;
|
|
import com.yihu.es.entity.HealthEduArticleES;
|
|
|
|
import com.yihu.wlyy.service.app.health.HealthEduArticleLabelService;
|
|
import com.yihu.wlyy.service.jimeiJkEdu.JMJkEduArticleService;
|
|
import com.yihu.wlyy.service.jimeiJkEdu.JMJkEduArticleService;
|
|
import com.yihu.wlyy.util.ElasticsearchUtil;
|
|
import com.yihu.wlyy.util.ElasticsearchUtil;
|
|
import com.yihu.wlyy.web.BaseController;
|
|
import com.yihu.wlyy.web.BaseController;
|
|
@ -40,6 +41,9 @@ public class DoctorJMJkEduArticlePCController extends BaseController {
|
|
@Autowired
|
|
@Autowired
|
|
private ElasticsearchUtil elasticsearchUtil;
|
|
private ElasticsearchUtil elasticsearchUtil;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private HealthEduArticleLabelService healthEduArticleLabelService;
|
|
|
|
|
|
@RequestMapping(value = "saveArticle", method = RequestMethod.POST)
|
|
@RequestMapping(value = "saveArticle", method = RequestMethod.POST)
|
|
@ApiOperation("添加、编辑文章")
|
|
@ApiOperation("添加、编辑文章")
|
|
public String saveArticle(@ApiParam(name = "articleId", value = "文章Id")
|
|
public String saveArticle(@ApiParam(name = "articleId", value = "文章Id")
|
|
@ -138,6 +142,10 @@ public class DoctorJMJkEduArticlePCController extends BaseController {
|
|
JSONObject response = jmJkEduArticleService.queryArticlePcList(firstLevelCategoryId,secondLevelCategoryId,insertTimeStart,insertTimeEnd,articlelevel,articleTitle,
|
|
JSONObject response = jmJkEduArticleService.queryArticlePcList(firstLevelCategoryId,secondLevelCategoryId,insertTimeStart,insertTimeEnd,articlelevel,articleTitle,
|
|
getUID(),currentUserRole,currentUserRoleLevel,isAuthentication,isMyArticle,page,pageSize,sEcho,roleType);
|
|
getUID(),currentUserRole,currentUserRoleLevel,isAuthentication,isMyArticle,page,pageSize,sEcho,roleType);
|
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(articleTitle)){
|
|
|
|
//记录搜索记录
|
|
|
|
healthEduArticleLabelService.saveOrUpdateLabel(articleTitle,getUID());
|
|
|
|
}
|
|
|
|
|
|
//判断文章列表是否有推送过该居民
|
|
//判断文章列表是否有推送过该居民
|
|
if(StringUtils.isNotBlank(patient)){
|
|
if(StringUtils.isNotBlank(patient)){
|
|
@ -149,7 +157,7 @@ public class DoctorJMJkEduArticlePCController extends BaseController {
|
|
articleids.add(pushresponse.getJSONObject(i).getString("articleId"));
|
|
articleids.add(pushresponse.getJSONObject(i).getString("articleId"));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
StringBuffer sql3 = null;
|
|
|
|
|
|
|
|
JSONArray datas = response.getJSONArray("aaData");
|
|
JSONArray datas = response.getJSONArray("aaData");
|
|
if(datas.size() > 0 && !articleids.isEmpty()){
|
|
if(datas.size() > 0 && !articleids.isEmpty()){
|
|
for (int i = 0; i < datas.size(); i++) {
|
|
for (int i = 0; i < datas.size(); i++) {
|
|
@ -159,10 +167,6 @@ public class DoctorJMJkEduArticlePCController extends BaseController {
|
|
}else{
|
|
}else{
|
|
datas.getJSONObject(i).put("ispush","0");
|
|
datas.getJSONObject(i).put("ispush","0");
|
|
}
|
|
}
|
|
// sql3 = new StringBuffer();
|
|
|
|
// sql3.append("SELECT COUNT(*) as num FROM "+esType+" WHERE userType=2 AND articleId='"+dataarticleid+"'");
|
|
|
|
// Long num = elasticsearchUtil.excuteForLong(sql3.toString(), esType, esIndex);
|
|
|
|
// datas.getJSONObject(i).put("ispush","0");
|
|
|
|
}
|
|
}
|
|
response.put("aaData",datas);
|
|
response.put("aaData",datas);
|
|
}
|
|
}
|
|
@ -178,23 +182,23 @@ public class DoctorJMJkEduArticlePCController extends BaseController {
|
|
@RequestMapping(value = "authenArticlePCList", method = RequestMethod.GET)
|
|
@RequestMapping(value = "authenArticlePCList", method = RequestMethod.GET)
|
|
@ApiOperation("查询pc端文章认证列表")
|
|
@ApiOperation("查询pc端文章认证列表")
|
|
public String authenArticlePCList(@ApiParam(name = "firstLevelCategoryId", value = "文章一级分类")
|
|
public String authenArticlePCList(@ApiParam(name = "firstLevelCategoryId", value = "文章一级分类")
|
|
@RequestParam(value = "firstLevelCategoryId", required = false) String firstLevelCategoryId,
|
|
|
|
@ApiParam(name = "secondLevelCategoryId", value = "文章二级分类")
|
|
|
|
@RequestParam(value = "secondLevelCategoryId", required = false) String secondLevelCategoryId,
|
|
|
|
@ApiParam(name = "insertTimeStart", value = "新增文章开始时间")
|
|
|
|
@RequestParam(value = "insertTimeStart", required = false) String insertTimeStart,
|
|
|
|
@ApiParam(name = "insertTimeEnd", value = "新增文章结束时间")
|
|
|
|
@RequestParam(value = "insertTimeEnd", required = false) String insertTimeEnd,
|
|
|
|
@ApiParam(name = "articleTitle", value = "文章标题关键字")
|
|
|
|
@RequestParam(value = "articleTitle", required = false) String articleTitle,
|
|
|
|
@ApiParam(name = "isAuthentication", value = "是否认证")
|
|
|
|
@RequestParam(value = "isAuthentication", required = false) String isAuthentication,
|
|
|
|
@ApiParam(name = "iDisplayStart", value = "当前页")
|
|
|
|
@RequestParam(value = "iDisplayStart", required = true) Integer page,
|
|
|
|
@ApiParam(name = "iDisplayLength", value = "是否过滤我的文章")
|
|
|
|
@RequestParam(value = "iDisplayLength", required = true) Integer pageSize,
|
|
|
|
@ApiParam(name = "sEcho", value = "插件自带")
|
|
|
|
@RequestParam(value = "sEcho", required = false) Integer sEcho){
|
|
|
|
|
|
@RequestParam(value = "firstLevelCategoryId", required = false) String firstLevelCategoryId,
|
|
|
|
@ApiParam(name = "secondLevelCategoryId", value = "文章二级分类")
|
|
|
|
@RequestParam(value = "secondLevelCategoryId", required = false) String secondLevelCategoryId,
|
|
|
|
@ApiParam(name = "insertTimeStart", value = "新增文章开始时间")
|
|
|
|
@RequestParam(value = "insertTimeStart", required = false) String insertTimeStart,
|
|
|
|
@ApiParam(name = "insertTimeEnd", value = "新增文章结束时间")
|
|
|
|
@RequestParam(value = "insertTimeEnd", required = false) String insertTimeEnd,
|
|
|
|
@ApiParam(name = "articleTitle", value = "文章标题关键字")
|
|
|
|
@RequestParam(value = "articleTitle", required = false) String articleTitle,
|
|
|
|
@ApiParam(name = "isAuthentication", value = "是否认证")
|
|
|
|
@RequestParam(value = "isAuthentication", required = false) String isAuthentication,
|
|
|
|
@ApiParam(name = "iDisplayStart", value = "当前页")
|
|
|
|
@RequestParam(value = "iDisplayStart", required = true) Integer page,
|
|
|
|
@ApiParam(name = "iDisplayLength", value = "是否过滤我的文章")
|
|
|
|
@RequestParam(value = "iDisplayLength", required = true) Integer pageSize,
|
|
|
|
@ApiParam(name = "sEcho", value = "插件自带")
|
|
|
|
@RequestParam(value = "sEcho", required = false) Integer sEcho){
|
|
try {
|
|
try {
|
|
|
|
|
|
|
|
|
|
@ -213,14 +217,14 @@ public class DoctorJMJkEduArticlePCController extends BaseController {
|
|
public String saveOrUpdateArticleQR(
|
|
public String saveOrUpdateArticleQR(
|
|
// @ApiParam(name = "currentRoleLevel", value = "当前登录角色的级别")
|
|
// @ApiParam(name = "currentRoleLevel", value = "当前登录角色的级别")
|
|
// @RequestParam(value = "currentRoleLevel", required = true) String currentRoleLevel,
|
|
// @RequestParam(value = "currentRoleLevel", required = true) String currentRoleLevel,
|
|
@ApiParam(name = "identification", value = "认证标识文字")
|
|
|
|
@RequestParam(value = "identification", required = false) String identification,
|
|
|
|
@ApiParam(name = "position", value = "位置")
|
|
|
|
@RequestParam(value = "position", required = false) Integer position,
|
|
|
|
@ApiParam(name = "imgUrl", value = "二维码图片地址")
|
|
|
|
@RequestParam(value = "imgUrl", required = false) String imgUrl,
|
|
|
|
@ApiParam(name = "id", value = "认证标识id")
|
|
|
|
@RequestParam(value = "id", required = false) Integer id){
|
|
|
|
|
|
@ApiParam(name = "identification", value = "认证标识文字")
|
|
|
|
@RequestParam(value = "identification", required = false) String identification,
|
|
|
|
@ApiParam(name = "position", value = "位置")
|
|
|
|
@RequestParam(value = "position", required = false) Integer position,
|
|
|
|
@ApiParam(name = "imgUrl", value = "二维码图片地址")
|
|
|
|
@RequestParam(value = "imgUrl", required = false) String imgUrl,
|
|
|
|
@ApiParam(name = "id", value = "认证标识id")
|
|
|
|
@RequestParam(value = "id", required = false) Integer id){
|
|
|
|
|
|
try{
|
|
try{
|
|
jmJkEduArticleService.saveOrUpdateArticleQR(getCurrentRoleLevel(),getCurrentRoleCode(),position,imgUrl,getUID(),id,identification);
|
|
jmJkEduArticleService.saveOrUpdateArticleQR(getCurrentRoleLevel(),getCurrentRoleCode(),position,imgUrl,getUID(),id,identification);
|
|
@ -234,17 +238,17 @@ public class DoctorJMJkEduArticlePCController extends BaseController {
|
|
@RequestMapping(value = "authenticationArticle", method = RequestMethod.POST)
|
|
@RequestMapping(value = "authenticationArticle", method = RequestMethod.POST)
|
|
@ApiOperation("文章认证")
|
|
@ApiOperation("文章认证")
|
|
public String authenticationArticle(@ApiParam(name = "articleId", value = "文章id,多个文章‘,’隔开")
|
|
public String authenticationArticle(@ApiParam(name = "articleId", value = "文章id,多个文章‘,’隔开")
|
|
@RequestParam(value = "articleId", required = true) String articleId,
|
|
|
|
@ApiParam(name = "isAuthentication", value = "认证,0取消认证,1认证")
|
|
|
|
@RequestParam(value = "isAuthentication", required = true) String isAuthentication,
|
|
|
|
@ApiParam(name = "firstLevelCategoryId", value = "文章一级分类")
|
|
|
|
@RequestParam(value = "firstLevelCategoryId", required = false) String firstLevelCategoryId,
|
|
|
|
@ApiParam(name = "firstLevelCategoryName", value = "文章一级分类名称")
|
|
|
|
@RequestParam(value = "firstLevelCategoryName", required = false) String firstLevelCategoryName,
|
|
|
|
@ApiParam(name = "secondLevelCategoryId", value = "文章二级分类")
|
|
|
|
@RequestParam(value = "secondLevelCategoryId", required = false) String secondLevelCategoryId,
|
|
|
|
@ApiParam(name = "secondLevelCategoryName", value = "文章二级分类名称")
|
|
|
|
@RequestParam(value = "secondLevelCategoryName", required = false) String secondLevelCategoryName){
|
|
|
|
|
|
@RequestParam(value = "articleId", required = true) String articleId,
|
|
|
|
@ApiParam(name = "isAuthentication", value = "认证,0取消认证,1认证")
|
|
|
|
@RequestParam(value = "isAuthentication", required = true) String isAuthentication,
|
|
|
|
@ApiParam(name = "firstLevelCategoryId", value = "文章一级分类")
|
|
|
|
@RequestParam(value = "firstLevelCategoryId", required = false) String firstLevelCategoryId,
|
|
|
|
@ApiParam(name = "firstLevelCategoryName", value = "文章一级分类名称")
|
|
|
|
@RequestParam(value = "firstLevelCategoryName", required = false) String firstLevelCategoryName,
|
|
|
|
@ApiParam(name = "secondLevelCategoryId", value = "文章二级分类")
|
|
|
|
@RequestParam(value = "secondLevelCategoryId", required = false) String secondLevelCategoryId,
|
|
|
|
@ApiParam(name = "secondLevelCategoryName", value = "文章二级分类名称")
|
|
|
|
@RequestParam(value = "secondLevelCategoryName", required = false) String secondLevelCategoryName){
|
|
try{
|
|
try{
|
|
jmJkEduArticleService.authenticationArticle(articleId,isAuthentication,firstLevelCategoryId,firstLevelCategoryName,secondLevelCategoryId,secondLevelCategoryName);
|
|
jmJkEduArticleService.authenticationArticle(articleId,isAuthentication,firstLevelCategoryId,firstLevelCategoryName,secondLevelCategoryId,secondLevelCategoryName);
|
|
return success("认证成功!");
|
|
return success("认证成功!");
|