|
@ -1,5 +1,6 @@
|
|
package com.yihu.jw.hospital.endpoint.article;
|
|
package com.yihu.jw.hospital.endpoint.article;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.yihu.jw.entity.hospital.article.KnowledgeArticleDO;
|
|
import com.yihu.jw.entity.hospital.article.KnowledgeArticleDO;
|
|
import com.yihu.jw.entity.hospital.article.KnowledgeCategoryDO;
|
|
import com.yihu.jw.entity.hospital.article.KnowledgeCategoryDO;
|
|
import com.yihu.jw.hospital.service.consult.KnowledgeArticleService;
|
|
import com.yihu.jw.hospital.service.consult.KnowledgeArticleService;
|
|
@ -34,7 +35,7 @@ public class ArticleEndpoint extends EnvelopRestEndpoint {
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.KnowledgeArticle.searchKnowledgePageList)
|
|
@GetMapping(value = BaseHospitalRequestMapping.KnowledgeArticle.searchKnowledgePageList)
|
|
@ApiOperation(value = "获取文章列表")
|
|
@ApiOperation(value = "获取文章列表")
|
|
public ListEnvelop searchKnowledgePageList(
|
|
|
|
|
|
public Envelop searchKnowledgePageList(
|
|
// @ApiParam(name = "category_first", value = "1级分类编码")
|
|
// @ApiParam(name = "category_first", value = "1级分类编码")
|
|
// @RequestParam(value = "category_first", required = false) String category_first,
|
|
// @RequestParam(value = "category_first", required = false) String category_first,
|
|
// @ApiParam(name = "category_secend", value = "2级分类编码")
|
|
// @ApiParam(name = "category_secend", value = "2级分类编码")
|
|
@ -57,7 +58,13 @@ public class ArticleEndpoint extends EnvelopRestEndpoint {
|
|
@RequestParam(value = "page", required = true,defaultValue = "1")Integer page,
|
|
@RequestParam(value = "page", required = true,defaultValue = "1")Integer page,
|
|
@ApiParam(name = "pageSize", value = "每页分页大小", required = true, defaultValue = "10")
|
|
@ApiParam(name = "pageSize", value = "每页分页大小", required = true, defaultValue = "10")
|
|
@RequestParam(value = "pageSize", required = true,defaultValue = "10")Integer pageSize)throws Exception{
|
|
@RequestParam(value = "pageSize", required = true,defaultValue = "10")Integer pageSize)throws Exception{
|
|
List<KnowledgeArticleDO> result = knowledgeArticleService.search(fields,filters,sorts,page,pageSize);
|
|
|
|
|
|
List<KnowledgeArticleDO> list = knowledgeArticleService.search(fields,filters,sorts,page,pageSize);
|
|
|
|
List<KnowledgeArticleDO> totals = knowledgeArticleService.search(fields,filters,sorts);
|
|
|
|
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
result.put("total",totals.size());
|
|
|
|
result.put("detailModelList",list);
|
|
|
|
|
|
return success(result);
|
|
return success(result);
|
|
}
|
|
}
|
|
|
|
|
|
@ -94,9 +101,11 @@ public class ArticleEndpoint extends EnvelopRestEndpoint {
|
|
@ApiParam(name = "articleId", value = "文章ID")
|
|
@ApiParam(name = "articleId", value = "文章ID")
|
|
@RequestParam(value = "articleId", required = true) String articleId,
|
|
@RequestParam(value = "articleId", required = true) String articleId,
|
|
@ApiParam(name = "status", value = "0未审核,1已审核,2退回")
|
|
@ApiParam(name = "status", value = "0未审核,1已审核,2退回")
|
|
@RequestParam(value = "status", required = true) Integer status
|
|
|
|
|
|
@RequestParam(value = "status", required = true) Integer status,
|
|
|
|
@ApiParam(name = "reason", value = "退回理由")
|
|
|
|
@RequestParam(value = "reason", required = false) String reason
|
|
)throws Exception {
|
|
)throws Exception {
|
|
knowledgeArticleService.reviewArticle(articleId,status);
|
|
|
|
|
|
knowledgeArticleService.reviewArticle(articleId,status,reason);
|
|
return success("操作成功");
|
|
return success("操作成功");
|
|
}
|
|
}
|
|
|
|
|