| | |
| | | @Qualifier("videoEsServiceImpl") |
| | | private final EsService esService; |
| | | |
| | | @PostMapping |
| | | @ApiOperation(value = "添加", notes = "添加") |
| | | public Result add(@RequestBody @Validated(Add.class) WxVideoForm form) { |
| | | return videoService.add(form); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation(value = "修改", notes = "修改") |
| | | public Result update(@RequestBody @Validated(Update.class) WxVideoForm form) { |
| | | return videoService.update(form); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation(value = "ID删除", notes = "ID删除") |
| | | public Result removeById(@PathVariable("id") String id) { |
| | |
| | | @PostMapping("/recreate/es/index") |
| | | @ApiOperation(value = "重建es索引", notes = "重建es索引") |
| | | public Result recreateEsIndex() { |
| | | esService.recreateIndex(EsSuffix.VIDEO_INDEX_NAME, "/es/video.json"); |
| | | return Result.ok(); |
| | | return videoService.recreateEsIndex(); |
| | | } |
| | | } |