|
@ -3,6 +3,7 @@ package com.yihu.wlyy.web.patient.jimeiJkEdu;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.yihu.wlyy.service.jimeiJkEdu.JMJkEduArticleService;
|
|
import com.yihu.wlyy.service.jimeiJkEdu.JMJkEduArticleService;
|
|
|
|
import com.yihu.wlyy.service.third.jkEduArticle.ThirdJkEduArticleService;
|
|
import com.yihu.wlyy.web.BaseController;
|
|
import com.yihu.wlyy.web.BaseController;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
@ -28,6 +29,8 @@ public class PatientJMJkEduArticleController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private JMJkEduArticleService jmJkEduArticleService;
|
|
private JMJkEduArticleService jmJkEduArticleService;
|
|
|
|
@Autowired
|
|
|
|
private ThirdJkEduArticleService thirdJkEduArticleService;
|
|
|
|
|
|
@RequestMapping(value = "fetchArticlePushedList", method = RequestMethod.GET)
|
|
@RequestMapping(value = "fetchArticlePushedList", method = RequestMethod.GET)
|
|
@ApiOperation("居民获取被推送文章列表 ")
|
|
@ApiOperation("居民获取被推送文章列表 ")
|
|
@ -183,4 +186,20 @@ public class PatientJMJkEduArticleController extends BaseController {
|
|
return error(-1,"查询失败!");
|
|
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,"保存失败!");
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|