提交 9df02cf7 作者: obcy

【修改】

上级 1e3fc4f5
......@@ -109,7 +109,9 @@ public class ClbSubjectHitwordsMapController {
@ApiOperation(value="专题命中词-编辑", notes="专题命中词-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ClbSubjectHitwordsMap clbSubjectHitwordsMap) {
clbSubjectHitwordsMapService.updateById(clbSubjectHitwordsMap);
this.delete(clbSubjectHitwordsMap.getId());
clbSubjectHitwordsMap.setId(null);
this.add(clbSubjectHitwordsMap);
return Result.OK(clbSubjectHitwordsMap);
}
......@@ -122,8 +124,12 @@ public class ClbSubjectHitwordsMapController {
@ApiOperation(value="专题命中词-通过id删除", notes="专题命中词-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
return Result.OK(clbSubjectHitwordsMapService.removeById(id));
if (StrUtil.isBlank(id)){
return Result.FAIL("请选择要删除的对象");
}
clbSubjectHitwordsMapService.removeById(id);
//调用删除es数据接口 //TODO
return Result.OK();
}
/**
......@@ -135,7 +141,13 @@ public class ClbSubjectHitwordsMapController {
@ApiOperation(value="专题命中词-批量删除", notes="专题命中词-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
return Result.OK(this.clbSubjectHitwordsMapService.removeByIds(Arrays.asList(ids.split(","))));
if (StrUtil.isBlank(ids)){
return Result.FAIL("请选择要删除的对象");
}
List<String> list = Arrays.asList(ids.split(","));
this.clbSubjectHitwordsMapService.removeByIds(list);
//调用删除es数据接口 //TODO
return Result.OK();
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论