|
@ -342,69 +342,69 @@ public class DoctorJMJkEduArticleController extends BaseController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "getArticalById",method = RequestMethod.GET)
|
|
|
|
@ApiOperation("获取文章详情")
|
|
|
|
public String getArticalById(@ApiParam(name = "articleId", value = "文章id",defaultValue = "1")
|
|
|
|
@RequestParam(value = "articleId", required = true) String articleId){
|
|
|
|
try {
|
|
|
|
com.alibaba.fastjson.JSONObject response = thirdJkEduArticleService.getArticalById(articleId,getUID());
|
|
|
|
return write(200,"查询成功!","data",response);
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return error(-1,"查询失败!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 医生端端文章列表
|
|
|
|
* @param firstLevelCategoryId
|
|
|
|
* @param secondLevelCategoryId
|
|
|
|
* @param insertTimeStart
|
|
|
|
* @param articlelevel
|
|
|
|
* @param articleTitle
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping(value = "queryArticlePcList", method = RequestMethod.GET)
|
|
|
|
@ApiOperation("医生端文章列表")
|
|
|
|
public String queryArticlePcList(@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 = "articlelevel", value = "文章级别")
|
|
|
|
@RequestParam(value = "articlelevel", required = false) String articlelevel,
|
|
|
|
@ApiParam(name = "articleTitle", value = "文章标题关键字")
|
|
|
|
@RequestParam(value = "articleTitle", required = false) String articleTitle,
|
|
|
|
@ApiParam(name = "currentUserRole", value = "当前登录的角色")
|
|
|
|
@RequestParam(value = "currentUserRole", required = true) String currentUserRole,
|
|
|
|
@ApiParam(name = "currentUserRoleLevel", value = "当前登录的角色级别")
|
|
|
|
@RequestParam(value = "currentUserRoleLevel", required = false )String currentUserRoleLevel,
|
|
|
|
@ApiParam(name = "isAuthentication", value = "是否认证")
|
|
|
|
@RequestParam(value = "isAuthentication", required = false) String isAuthentication,
|
|
|
|
@ApiParam(name = "isMyArticle", value = "是否过滤我的文章")
|
|
|
|
@RequestParam(value = "isMyArticle", required = false) Boolean isMyArticle,
|
|
|
|
@ApiParam(name = "page", value = "当前页")
|
|
|
|
@RequestParam(value = "page", required = true) Integer page,
|
|
|
|
@ApiParam(name = "pageSize", value = "分页数")
|
|
|
|
@RequestParam(value = "pageSize", required = true) Integer pageSize,
|
|
|
|
@ApiParam(name = "roleType", value = "1、普通医生,2、管理员")
|
|
|
|
@RequestParam(value = "roleType", required = false) Integer roleType){
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
com.alibaba.fastjson.JSONObject response = jmJkEduArticleService.queryArticlePcList(firstLevelCategoryId, secondLevelCategoryId, insertTimeStart, insertTimeEnd, articlelevel, articleTitle,
|
|
|
|
getUID(), currentUserRole, currentUserRoleLevel, isAuthentication, isMyArticle, page, pageSize,null,roleType);
|
|
|
|
|
|
// @RequestMapping(value = "getArticalById",method = RequestMethod.GET)
|
|
|
|
// @ApiOperation("获取文章详情")
|
|
|
|
// public String getArticalById(@ApiParam(name = "articleId", value = "文章id",defaultValue = "1")
|
|
|
|
// @RequestParam(value = "articleId", required = true) String articleId){
|
|
|
|
// try {
|
|
|
|
// com.alibaba.fastjson.JSONObject response = thirdJkEduArticleService.getArticalById(articleId,getUID());
|
|
|
|
// return write(200,"查询成功!","data",response);
|
|
|
|
// }catch (Exception e){
|
|
|
|
// e.printStackTrace();
|
|
|
|
// return error(-1,"查询失败!");
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
return write(200,"查询成功!","data",response);
|
|
|
|
} catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return error(-1,"查询失败!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
// /**
|
|
|
|
// * 医生端端文章列表
|
|
|
|
// * @param firstLevelCategoryId
|
|
|
|
// * @param secondLevelCategoryId
|
|
|
|
// * @param insertTimeStart
|
|
|
|
// * @param articlelevel
|
|
|
|
// * @param articleTitle
|
|
|
|
// * @return
|
|
|
|
// */
|
|
|
|
// @RequestMapping(value = "queryArticlePcList", method = RequestMethod.GET)
|
|
|
|
// @ApiOperation("医生端文章列表")
|
|
|
|
// public String queryArticlePcList(@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 = "articlelevel", value = "文章级别")
|
|
|
|
// @RequestParam(value = "articlelevel", required = false) String articlelevel,
|
|
|
|
// @ApiParam(name = "articleTitle", value = "文章标题关键字")
|
|
|
|
// @RequestParam(value = "articleTitle", required = false) String articleTitle,
|
|
|
|
// @ApiParam(name = "currentUserRole", value = "当前登录的角色")
|
|
|
|
// @RequestParam(value = "currentUserRole", required = true) String currentUserRole,
|
|
|
|
// @ApiParam(name = "currentUserRoleLevel", value = "当前登录的角色级别")
|
|
|
|
// @RequestParam(value = "currentUserRoleLevel", required = false )String currentUserRoleLevel,
|
|
|
|
// @ApiParam(name = "isAuthentication", value = "是否认证")
|
|
|
|
// @RequestParam(value = "isAuthentication", required = false) String isAuthentication,
|
|
|
|
// @ApiParam(name = "isMyArticle", value = "是否过滤我的文章")
|
|
|
|
// @RequestParam(value = "isMyArticle", required = false) Boolean isMyArticle,
|
|
|
|
// @ApiParam(name = "page", value = "当前页")
|
|
|
|
// @RequestParam(value = "page", required = true) Integer page,
|
|
|
|
// @ApiParam(name = "pageSize", value = "分页数")
|
|
|
|
// @RequestParam(value = "pageSize", required = true) Integer pageSize,
|
|
|
|
// @ApiParam(name = "roleType", value = "1、普通医生,2、管理员")
|
|
|
|
// @RequestParam(value = "roleType", required = false) Integer roleType){
|
|
|
|
// try {
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// com.alibaba.fastjson.JSONObject response = jmJkEduArticleService.queryArticlePcList(firstLevelCategoryId, secondLevelCategoryId, insertTimeStart, insertTimeEnd, articlelevel, articleTitle,
|
|
|
|
// getUID(), currentUserRole, currentUserRoleLevel, isAuthentication, isMyArticle, page, pageSize,null,roleType);
|
|
|
|
//
|
|
|
|
// return write(200,"查询成功!","data",response);
|
|
|
|
// } catch (Exception e){
|
|
|
|
// e.printStackTrace();
|
|
|
|
// return error(-1,"查询失败!");
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
// @RequestMapping(value = "saveArticle", method = RequestMethod.POST)
|
|
// @RequestMapping(value = "saveArticle", method = RequestMethod.POST)
|
|
// @ApiOperation("添加文章")
|
|
// @ApiOperation("添加文章")
|
|
@ -445,40 +445,40 @@ public class DoctorJMJkEduArticleController extends BaseController {
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
|
|
|
|
@RequestMapping(value = "saveArticleCollection",method = RequestMethod.POST)
|
|
|
|
@ApiOperation("收藏文章")
|
|
|
|
@ObserverRequired
|
|
|
|
public String saveArticleCollection(@ApiParam(name = "articleId", value = "文章id")
|
|
|
|
@RequestParam(value = "articleId", required = true) String articleId,
|
|
|
|
@ApiParam(name = "articleCategoryId", value = "文章类别ID")
|
|
|
|
@RequestParam(value = "articleCategoryId", required = false,defaultValue = "1") String articleCategoryId,
|
|
|
|
@ApiParam(name = "articleCategoryName", value = "文章类别名称")
|
|
|
|
@RequestParam(value = "articleCategoryName", required = false) String articleCategoryName){
|
|
|
|
try {
|
|
|
|
thirdJkEduArticleService.saveArticleCollection(articleId,articleCategoryId,articleCategoryName,getUID(),1);
|
|
|
|
// thirdJkEduArticleService.saveArticleCollection(articleId,articleCategoryId,articleCategoryName,"0de7295862dd11e69faffa163e8aee56",1);
|
|
|
|
|
|
|
|
return success("收藏成功!");
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return error(-1,"收藏失败!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@RequestMapping(value = "cancelArticleCollection",method = RequestMethod.POST)
|
|
|
|
@ApiOperation("取消收藏文章")
|
|
|
|
@ObserverRequired
|
|
|
|
public String cancelArticleCollection(@ApiParam(name = "articleId", value = "文章id",defaultValue = "1")
|
|
|
|
@RequestParam(value = "articleId", required = true) String articleId){
|
|
|
|
try {
|
|
|
|
thirdJkEduArticleService.cancelArticleCollection(articleId,getUID(),1);
|
|
|
|
// thirdJkEduArticleService.cancelArticleCollection(articleId,"0de7295862dd11e69faffa163e8aee56",1);
|
|
|
|
return success("取消成功!");
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return error(-1,"取消失败!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
// @RequestMapping(value = "saveArticleCollection",method = RequestMethod.POST)
|
|
|
|
// @ApiOperation("收藏文章")
|
|
|
|
// @ObserverRequired
|
|
|
|
// public String saveArticleCollection(@ApiParam(name = "articleId", value = "文章id")
|
|
|
|
// @RequestParam(value = "articleId", required = true) String articleId,
|
|
|
|
// @ApiParam(name = "articleCategoryId", value = "文章类别ID")
|
|
|
|
// @RequestParam(value = "articleCategoryId", required = false,defaultValue = "1") String articleCategoryId,
|
|
|
|
// @ApiParam(name = "articleCategoryName", value = "文章类别名称")
|
|
|
|
// @RequestParam(value = "articleCategoryName", required = false) String articleCategoryName){
|
|
|
|
// try {
|
|
|
|
// thirdJkEduArticleService.saveArticleCollection(articleId,articleCategoryId,articleCategoryName,getUID(),1);
|
|
|
|
//// thirdJkEduArticleService.saveArticleCollection(articleId,articleCategoryId,articleCategoryName,"0de7295862dd11e69faffa163e8aee56",1);
|
|
|
|
//
|
|
|
|
// return success("收藏成功!");
|
|
|
|
// }catch (Exception e){
|
|
|
|
// e.printStackTrace();
|
|
|
|
// return error(-1,"收藏失败!");
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// @RequestMapping(value = "cancelArticleCollection",method = RequestMethod.POST)
|
|
|
|
// @ApiOperation("取消收藏文章")
|
|
|
|
// @ObserverRequired
|
|
|
|
// public String cancelArticleCollection(@ApiParam(name = "articleId", value = "文章id",defaultValue = "1")
|
|
|
|
// @RequestParam(value = "articleId", required = true) String articleId){
|
|
|
|
// try {
|
|
|
|
// thirdJkEduArticleService.cancelArticleCollection(articleId,getUID(),1);
|
|
|
|
//// thirdJkEduArticleService.cancelArticleCollection(articleId,"0de7295862dd11e69faffa163e8aee56",1);
|
|
|
|
// return success("取消成功!");
|
|
|
|
// }catch (Exception e){
|
|
|
|
// e.printStackTrace();
|
|
|
|
// return error(-1,"取消失败!");
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
/*************************************************************************医生角色end***************************************************************************************************/
|
|
/*************************************************************************医生角色end***************************************************************************************************/
|