|
@@ -28,6 +28,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -134,7 +135,9 @@ public class ArticleController extends JeecgController<Article, IArticleService>
|
|
|
@RequiresPermissions("kms:kms_knowledge_article:delete")
|
|
|
@DeleteMapping(value = "/delete")
|
|
|
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
|
|
|
- articleService.removeById(id);
|
|
|
+ List<String> ids = new ArrayList<>();
|
|
|
+ ids.add(id);
|
|
|
+ articleService.deleteBatchByIds(ids);
|
|
|
return Result.OK("删除成功!");
|
|
|
}
|
|
|
|
|
@@ -149,7 +152,7 @@ public class ArticleController extends JeecgController<Article, IArticleService>
|
|
|
@RequiresPermissions("kms:kms_knowledge_article:deleteBatch")
|
|
|
@DeleteMapping(value = "/deleteBatch")
|
|
|
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
|
|
- this.articleService.removeByIds(Arrays.asList(ids.split(",")));
|
|
|
+ this.articleService.deleteBatchByIds(Arrays.asList(ids.split(",")));
|
|
|
return Result.OK("批量删除成功!");
|
|
|
}
|
|
|
|