From ac9d5f32f74ec99fe119001e38d731789350ad60 Mon Sep 17 00:00:00 2001 From: YunaiV <> Date: Tue, 14 Jul 2020 21:03:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E7=A6=81=E7=94=A8=E7=9A=84=20BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mall/managementweb/controller/admin/AdminController.java | 2 +- .../controller/admin/dto/AdminUpdateStatusDTO.java | 2 +- .../iocoder/mall/managementweb/convert/admin/AdminConvert.java | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/management-web-app/src/main/java/cn/iocoder/mall/managementweb/controller/admin/AdminController.java b/management-web-app/src/main/java/cn/iocoder/mall/managementweb/controller/admin/AdminController.java index 2766aca76..da2fa7ab8 100644 --- a/management-web-app/src/main/java/cn/iocoder/mall/managementweb/controller/admin/AdminController.java +++ b/management-web-app/src/main/java/cn/iocoder/mall/managementweb/controller/admin/AdminController.java @@ -56,7 +56,7 @@ public class AdminController { @PostMapping("/update-status") @ApiOperation(value = "更新管理员状态") @RequiresPermissions("system:admin:update-status") - public CommonResult updateUserStatus(AdminUpdateStatusDTO updateStatusDTO) { + public CommonResult updateAdminStatus(AdminUpdateStatusDTO updateStatusDTO) { adminManager.updateAdminStatus(updateStatusDTO); return success(true); } diff --git a/management-web-app/src/main/java/cn/iocoder/mall/managementweb/controller/admin/dto/AdminUpdateStatusDTO.java b/management-web-app/src/main/java/cn/iocoder/mall/managementweb/controller/admin/dto/AdminUpdateStatusDTO.java index a447d0492..8a19ad31d 100644 --- a/management-web-app/src/main/java/cn/iocoder/mall/managementweb/controller/admin/dto/AdminUpdateStatusDTO.java +++ b/management-web-app/src/main/java/cn/iocoder/mall/managementweb/controller/admin/dto/AdminUpdateStatusDTO.java @@ -16,7 +16,7 @@ public class AdminUpdateStatusDTO { @ApiModelProperty(value = "管理员编号", required = true, example = "1") @NotNull(message = "管理员编号不能为空") - private Integer id; + private Integer adminId; @ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 CommonStatusEnum 枚举") @NotNull(message = "状态不能为空") diff --git a/management-web-app/src/main/java/cn/iocoder/mall/managementweb/convert/admin/AdminConvert.java b/management-web-app/src/main/java/cn/iocoder/mall/managementweb/convert/admin/AdminConvert.java index bc54ff338..a79613147 100644 --- a/management-web-app/src/main/java/cn/iocoder/mall/managementweb/convert/admin/AdminConvert.java +++ b/management-web-app/src/main/java/cn/iocoder/mall/managementweb/convert/admin/AdminConvert.java @@ -11,6 +11,7 @@ import cn.iocoder.mall.systemservice.rpc.admin.vo.AdminVO; import cn.iocoder.mall.systemservice.rpc.admin.vo.DepartmentVO; import cn.iocoder.mall.systemservice.rpc.permission.vo.RoleVO; import org.mapstruct.Mapper; +import org.mapstruct.Mapping; import org.mapstruct.factory.Mappers; import java.util.List; @@ -24,6 +25,7 @@ public interface AdminConvert { AdminUpdateDTO convert(AdminUpdateInfoDTO bean); + @Mapping(source = "adminId", target = "id") AdminUpdateDTO convert(AdminUpdateStatusDTO bean); AdminPageDTO convert(cn.iocoder.mall.managementweb.controller.admin.dto.AdminPageDTO bean);