From 64eb0ae501fda5eb6a6d459cced07f626d3a1a6f Mon Sep 17 00:00:00 2001 From: wayn <1669738430@qq.com> Date: Wed, 24 Jun 2020 23:48:18 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=90=8E=E5=8F=B0=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/wayn/admin/api/controller/shop/BannerController.java | 4 +++- .../com/wayn/admin/api/controller/shop/ChannelController.java | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/waynboot-admin-api/src/main/java/com/wayn/admin/api/controller/shop/BannerController.java b/waynboot-admin-api/src/main/java/com/wayn/admin/api/controller/shop/BannerController.java index 67ca97e..703c38f 100644 --- a/waynboot-admin-api/src/main/java/com/wayn/admin/api/controller/shop/BannerController.java +++ b/waynboot-admin-api/src/main/java/com/wayn/admin/api/controller/shop/BannerController.java @@ -35,6 +35,8 @@ public class BannerController extends BaseController { @PutMapping public R updateChannel(@Validated @RequestBody ShopBanner banner) { + banner.setUpdateBy(SecurityUtils.getUsername()); + banner.setUpdateTime(new Date()); return R.result(iBannerService.updateById(banner)); } @@ -45,6 +47,6 @@ public class BannerController extends BaseController { @DeleteMapping("{bannerId}") public R deleteChannel(@PathVariable Long bannerId) { - return R.success().add("data", iBannerService.removeById(bannerId)); + return R.result(iBannerService.removeById(bannerId)); } } diff --git a/waynboot-admin-api/src/main/java/com/wayn/admin/api/controller/shop/ChannelController.java b/waynboot-admin-api/src/main/java/com/wayn/admin/api/controller/shop/ChannelController.java index 9c0a613..eecb546 100644 --- a/waynboot-admin-api/src/main/java/com/wayn/admin/api/controller/shop/ChannelController.java +++ b/waynboot-admin-api/src/main/java/com/wayn/admin/api/controller/shop/ChannelController.java @@ -55,6 +55,6 @@ public class ChannelController extends BaseController { @DeleteMapping("{channelId}") public R deleteChannel(@PathVariable Long channelId) { - return R.success().add("data", iChannelService.removeById(channelId)); + return R.result(iChannelService.removeById(channelId)); } }