From 3f50e9e810b478dbbd3225d9e5cedf47f586b69b Mon Sep 17 00:00:00 2001 From: whywhyo <1511349576@qq.com> Date: 星期二, 05 九月 2023 11:25:43 +0800 Subject: [PATCH] 45386 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCollectionController.java | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCollectionController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCollectionController.java index f938ef0..aaea9bd 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCollectionController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCollectionController.java @@ -49,6 +49,19 @@ return zfCollectionService.selectDataList(zfCollection, pageNum, pageSize); } + @GetMapping("/type") + public AjaxResult listType(){ + return zfCollectionService.listType(); + } + + /** + * 鏍规嵁id鏌ヨ + */ + @GetMapping() + public AjaxResult listById(Long id){ + return AjaxResult.success(zfCollectionService.getById(id)); + } + /** * 鑾峰彇瀵煎叆妯℃澘 */ @@ -115,7 +128,7 @@ @PostMapping public AjaxResult add(@RequestBody ZfCollection zfCollection) { - return zfCollectionService.addData2(zfCollection); + return zfCollectionService.addData(zfCollection); } /** @@ -126,7 +139,7 @@ @PutMapping public AjaxResult edit(@RequestBody ZfCollection zfCollection) { - return toAjax(zfCollectionService.updateById(zfCollection)); + return zfCollectionService.updateData(zfCollection); } // /** @@ -137,7 +150,7 @@ @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { - return toAjax(zfCollectionService.removeByIds(Arrays.asList(ids))); + return zfCollectionService.deleteData(ids); } -- Gitblit v1.9.1