| | |
| | | @PostMapping("/updateKeyword") |
| | | @ApiOperation(value = "修改关键词") |
| | | public ResponseResult<String> updateKeyword(@RequestBody Keyword keyword) { |
| | | if(!"notSubmitted".equals(keyword.getStatus())){ |
| | | return ResponseResult.error("关键词已开始采集或采集完成不允许修改!"); |
| | | } |
| | | keywordService.updateById(keyword); |
| | | return ResponseResult.success("修改成功"); |
| | | } |
| | |
| | | @DeleteMapping("/deleteKeyword") |
| | | @ApiOperation(value = "删除关键词") |
| | | public ResponseResult<String> deleteKeyword(@RequestParam("keywordId") Integer keywordId) { |
| | | Keyword keyword = keywordService.getById(keywordId); |
| | | if(!"notSubmitted".equals(keyword.getStatus())){ |
| | | return ResponseResult.error("关键词已开始采集或采集完成不允许删除!"); |
| | | } |
| | | keywordService.removeById(keywordId); |
| | | return ResponseResult.success("删除成功"); |
| | | } |
| | |
| | | return ResponseResult.error("导入失败:" + e.getMessage()); |
| | | } |
| | | } |
| | | //根据关键词id查询任务id |
| | | |
| | | |
| | | } |