From 6ad662184c11bec06b910a938e0aa4a9912ca031 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 6 Jul 2020 13:03:11 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/CustomerServiceImpl.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java index 4331a01de9..dbd6c2a666 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java @@ -17,6 +17,7 @@ package com.epmet.service.impl; +import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; @@ -42,7 +43,6 @@ import com.epmet.feign.OperCustomizeFeignClient; import com.epmet.redis.CustomerRedis; import com.epmet.service.CustomerService; import com.github.pagehelper.PageHelper; -import com.github.pagehelper.PageInfo; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -257,20 +257,24 @@ public class CustomerServiceImpl extends BaseServiceImpl getRoleResult = epmetUserFeignClient.getRoleOfCustomer(customerRoleForm); if (!getRoleResult.success()) { + log.error("查询客户具有指定RoleKey的角色信息失败:".concat(getRoleResult.toString())); throw new RenException("查询客户具有指定RoleKey的角色信息失败:".concat(getRoleResult.toString())); } if (getRoleResult.getData() == null) { + log.error("未查询到客户具有指定RoleKey的角色信息:".concat(getRoleResult.toString())); throw new RenException("未查询到客户具有指定RoleKey的角色信息:".concat(getRoleResult.toString())); } // 查询客户根级组织 Result customerRootAgencyResult = govOrgFeignClient.getCustomerRootAgency(form.getCustomerId()); if (!customerRootAgencyResult.success()) { + log.error("查询客户根级组织失败:".concat(getRoleResult.toString())); throw new RenException("查询客户根级组织失败:".concat(getRoleResult.toString())); } if (customerRootAgencyResult.getData() == null) { + log.error("新增客户管理员失败,没有查询到客户根级组织,无法设置管理员:".concat(getRoleResult.toString())); throw new RenException("没有查询到客户根级组织,无法设置管理员:".concat(getRoleResult.toString())); } @@ -284,7 +288,8 @@ public class CustomerServiceImpl extends BaseServiceImpl Date: Mon, 6 Jul 2020 14:14:40 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=BB=84=E7=BB=87=E9=A6=96=E9=A1=B5-?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=BB=84=E7=BB=87=E6=9C=BA=E6=9E=84=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=8E=A5=E5=8F=A3=E5=8F=82=E6=95=B0=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/form/AgencydetailFormDTO.java | 7 ++++++- .../main/java/com/epmet/controller/AgencyController.java | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AgencydetailFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AgencydetailFormDTO.java index 0f3b999026..9383b68e93 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AgencydetailFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AgencydetailFormDTO.java @@ -33,10 +33,15 @@ public class AgencydetailFormDTO implements Serializable { private static final long serialVersionUID = 1L; + /** + * 内部错误分组 + * */ + public interface AddUserInternalGroup{} + /** * 机关组织Id */ - @NotBlank(message = "机关组织ID不能为空") + @NotBlank(message = "机关组织ID不能为空" , groups = {AgencydetailFormDTO.AddUserInternalGroup.class}) private String agencyId; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java index a72f359ee2..af64c49645 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java @@ -132,7 +132,7 @@ public class AgencyController { @PostMapping("agencydetail") @RequirePermission(requirePermission = RequirePermissionEnum.ORG_AGENCY_TRACE) public Result agencyDetail(@LoginUser TokenDto tokenDTO, @RequestBody AgencydetailFormDTO formDTO) { - ValidatorUtils.validateEntity(formDTO); + ValidatorUtils.validateEntity(formDTO, AgencydetailFormDTO.AddUserInternalGroup.class); return agencyService.agencyDetail(formDTO); }