|
@@ -60,6 +60,31 @@ public class KnowledgeLabelController extends BaseController<KnowledgeLabel> {
|
|
|
return jsonResult;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 知识仓库首页-快捷标签列表
|
|
|
+ *
|
|
|
+ * @param tops 返回条数
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ApiOperation(value = "知识仓库首页-快捷标签列表", httpMethod = "GET")
|
|
|
+ @GetMapping("labels")
|
|
|
+ public JsonResult labels(@RequestParam(value = "tops", required = false) Integer tops) {
|
|
|
+ JsonResult jsonResult = JsonResult.getSuccessResult("返回数据成功!");
|
|
|
+
|
|
|
+ if (tops == null) {
|
|
|
+ tops = 24;
|
|
|
+ }
|
|
|
+
|
|
|
+ try {
|
|
|
+ jsonResult.setData(knowledgeLabelService.labels(tops));
|
|
|
+ } catch (Exception e) {
|
|
|
+ jsonResult.setSuccess(false);
|
|
|
+ this.logger.error(ExceptionUtil.getExceptionMessage(e));
|
|
|
+ jsonResult.setMessage(ExceptionUtil.getExceptionMessage(e));
|
|
|
+ }
|
|
|
+ return jsonResult;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 分页条件搜索标签管理列表
|
|
|
*
|
|
@@ -92,7 +117,7 @@ public class KnowledgeLabelController extends BaseController<KnowledgeLabel> {
|
|
|
* @param status true 上升 false 下降
|
|
|
* @return
|
|
|
*/
|
|
|
- @ApiOperation(value = "调整知识标签排序位置")
|
|
|
+ @ApiOperation(value = "调整知识标签排序位置", httpMethod = "GET")
|
|
|
@GetMapping("/exchangePosition/{labelId}/{status}")
|
|
|
public JsonResult exchangePosition(@PathVariable("labelId") String labelId,
|
|
|
@PathVariable("status") Boolean status) {
|
|
@@ -106,7 +131,7 @@ public class KnowledgeLabelController extends BaseController<KnowledgeLabel> {
|
|
|
* @param labelId 标签ID
|
|
|
* @return
|
|
|
*/
|
|
|
- @ApiOperation(value = "删除知识标签")
|
|
|
+ @ApiOperation(value = "删除知识标签", httpMethod = "GET")
|
|
|
@PostMapping("delLabel")
|
|
|
public JsonResult delLabel(@RequestParam("labelId") String labelId) {
|
|
|
JsonResult jsonResult = JsonResult.getSuccessResult("删除知识标签成功!");
|