| | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @RestController |
| | |
| | | @ApiOperation(value = "修改提问词") |
| | | @Transactional |
| | | public ResponseResult<List<Question>> update(@RequestBody KeywordDto keywordDto) { |
| | | if (keywordDto.getStatus() != "customPage"){ |
| | | if (!"notSubmitted".equals(keywordDto.getStatus() )){ |
| | | return ResponseResult.error("该关键词已提交或者已采集完成不允许修改提问词!"); |
| | | } |
| | | LambdaQueryWrapper<Question> queryWrapper = new LambdaQueryWrapper<>(); |
| | |
| | | return question; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | boolean success = questionService.saveBatch(questionList); |
| | | questionService.saveBatch(questionList); |
| | | |
| | | return ResponseResult.success(); |
| | | |
| | | |
| | | if(success) { |
| | | return ResponseResult.success(questionList); |
| | | } |
| | | return ResponseResult.error("更新提问词失败"); |
| | | } |
| | | |
| | | // @PutMapping |