From 0522c48affa213cd0e3b96e6ee4a0666690ea3a8 Mon Sep 17 00:00:00 2001 From: x_z Date: Sat, 25 Jun 2022 11:30:15 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=A2=9E=E5=8A=A0=E6=B7=BB=E5=8A=A0=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E9=80=BB=E8=BE=91=E6=A0=A1=E9=AA=8C=EF=BC=8C=E5=88=86?= =?UTF-8?q?=E4=BB=93=E6=9F=A5=E8=AF=A2=E7=94=A8=E6=88=B7=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=EF=BC=8C=E6=9F=A5=E8=AF=A2=E9=9D=9E=E7=A6=81?= =?UTF-8?q?=E7=94=A8=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controller/inout/WareHouseController.java | 11 +++++++---- .../admin/service/auth/impl/AuthAdminServiceImpl.java | 1 + .../resources/mybatis/mapper/auth/AuthAdminDao.xml | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/inout/WareHouseController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/inout/WareHouseController.java index bf2ad941..2a54a7f6 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/inout/WareHouseController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/inout/WareHouseController.java @@ -51,8 +51,6 @@ import com.glxp.api.common.enums.ResultEnum; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.*; @@ -1177,9 +1175,14 @@ public class WareHouseController { public BaseResponse saveWarehouseUser(@RequestBody Map params) { String code = String.valueOf(params.get("code")); String userListJson = String.valueOf(params.get("userList")); - if (StrUtil.isBlank(code) || StrUtil.isBlank(userListJson)) + if (StrUtil.isBlank(code) || StrUtil.isBlank(userListJson)) { return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); - warehouseUserService.saveWarehouseUser(code, JSONUtil.toList(userListJson, AuthAdmin.class)); + } + List userList = JSONUtil.toList(userListJson, AuthAdmin.class); + if (CollUtil.isEmpty(userList)) { + return ResultVOUtils.error(500, "用户列表不能为空"); + } + warehouseUserService.saveWarehouseUser(code, userList); invWarehouseService.updateTime(code, new Date()); return ResultVOUtils.success(); } diff --git a/api-admin/src/main/java/com/glxp/api/admin/service/auth/impl/AuthAdminServiceImpl.java b/api-admin/src/main/java/com/glxp/api/admin/service/auth/impl/AuthAdminServiceImpl.java index 594e7a34..977e59c8 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/service/auth/impl/AuthAdminServiceImpl.java +++ b/api-admin/src/main/java/com/glxp/api/admin/service/auth/impl/AuthAdminServiceImpl.java @@ -117,6 +117,7 @@ public class AuthAdminServiceImpl implements AuthAdminService { @Override public List getHospitalUserList() { + //查询未被禁用的医院用户 List userList = authAdminDao.selectHospitalUser(); if (CollUtil.isEmpty(userList)) { return Collections.emptyList(); diff --git a/api-admin/src/main/resources/mybatis/mapper/auth/AuthAdminDao.xml b/api-admin/src/main/resources/mybatis/mapper/auth/AuthAdminDao.xml index af703fb6..34018f01 100644 --- a/api-admin/src/main/resources/mybatis/mapper/auth/AuthAdminDao.xml +++ b/api-admin/src/main/resources/mybatis/mapper/auth/AuthAdminDao.xml @@ -137,5 +137,6 @@ \ No newline at end of file