From f7a395bee85b734af4b71ed39f6fe1de280a9f7c Mon Sep 17 00:00:00 2001 From: wangpengfei <1928057482@qq.com> Date: Fri, 3 Nov 2023 15:53:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=96=9C=E7=9B=B8=E9=9A=8F=E5=95=86=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../restrictedbrand/RestrictedBrandRest.java | 8 +++++--- .../restrictedbrand/RestrictedBrandService.java | 15 ++++++++------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/controller/restrictedbrand/RestrictedBrandRest.java b/warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/controller/restrictedbrand/RestrictedBrandRest.java index b8b779c3..15e21408 100644 --- a/warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/controller/restrictedbrand/RestrictedBrandRest.java +++ b/warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/controller/restrictedbrand/RestrictedBrandRest.java @@ -87,13 +87,15 @@ public class RestrictedBrandRest{ } - public ResultBean delBySid(String id) { + @ApiOperation("删除") + @GetMapping("/delBySid/{sid}") + public ResultBean delBySid(@PathVariable("sid") String sid) { ResultBean rb = ResultBean.fireFail(); - RestrictedBrand restrictedBrand = restrictedBrandService.getRestById(id); + RestrictedBrand restrictedBrand = restrictedBrandService.getRestById(sid); if(restrictedBrand == null){ return rb.setMsg("该监管品牌不存在"); } - restrictedBrandService.deleteById(id); + restrictedBrandService.deleteById(sid); return rb.success(); } diff --git a/warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/restrictedbrand/RestrictedBrandService.java b/warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/restrictedbrand/RestrictedBrandService.java index b7c806b5..e05c871d 100644 --- a/warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/restrictedbrand/RestrictedBrandService.java +++ b/warehousing-system/project/wh-manage-xxs/src/main/java/com/wh/service/restrictedbrand/RestrictedBrandService.java @@ -105,17 +105,18 @@ public class RestrictedBrandService extends MybatisBaseService().eq("sid",sid)); } return rb.success(); @@ -199,9 +200,9 @@ public class RestrictedBrandService extends MybatisBaseService qw = new QueryWrapper<>(); - qw.eq("code", code); + qw.eq("sid", sid); List list = baseMapper.selectList(qw); if (list == null || list.isEmpty()) return null;