From 1e4ef483a797081cc67e47ab08e7b6427e38b99b Mon Sep 17 00:00:00 2001 From: YunaiV <> Date: Wed, 1 Jul 2020 19:23:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E6=96=B0=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=EF=BC=8C=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../biz/config/ServiceExceptionConfiguration.java | 15 +++++++-------- .../service/errorcode/ErrorCodeServiceImpl.java | 2 -- system/system-biz/src/main/resources/biz.yaml | 2 +- .../system-rpc/src/main/resources/rpc-local.yaml | 4 ++-- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/config/ServiceExceptionConfiguration.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/config/ServiceExceptionConfiguration.java index 56d69ca98..7f57927ec 100644 --- a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/config/ServiceExceptionConfiguration.java +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/config/ServiceExceptionConfiguration.java @@ -1,7 +1,6 @@ package cn.iocoder.mall.system.biz.config; import cn.iocoder.common.framework.util.ServiceExceptionUtil; -import cn.iocoder.mall.system.biz.bo.errorcode.ErrorCodeBO; import cn.iocoder.mall.system.biz.enums.SystemErrorCodeEnum; import cn.iocoder.mall.system.biz.service.errorcode.ErrorCodeService; import org.springframework.beans.factory.annotation.Autowired; @@ -9,8 +8,6 @@ import org.springframework.boot.context.event.ApplicationReadyEvent; import org.springframework.context.annotation.Configuration; import org.springframework.context.event.EventListener; -import java.util.List; - @Configuration public class ServiceExceptionConfiguration { @@ -20,14 +17,16 @@ public class ServiceExceptionConfiguration { @EventListener(ApplicationReadyEvent.class) // 可参考 https://www.cnblogs.com/ssslinppp/p/7607509.html public void initMessages() { - errorCodeService.deleteSyStemErrorCode(SystemErrorCodeEnum.ADMIN_NOT_FOUND.getGroup()); - errorCodeService.addSystemErrorCodeList(SystemErrorCodeEnum.values()); + // TODO FROM 芋艿 to 芋艿:暂时注释掉,有问题的。 +// errorCodeService.deleteSyStemErrorCode(SystemErrorCodeEnum.ADMIN_NOT_FOUND.getGroup()); +// errorCodeService.addSystemErrorCodeList(SystemErrorCodeEnum.values()); for (SystemErrorCodeEnum item : SystemErrorCodeEnum.values()) { ServiceExceptionUtil.put(item.getCode(), item.getMessage()); } - for (ErrorCodeBO bo : errorCodeService.getErrorCodeByGroup(SystemErrorCodeEnum.ADMIN_NOT_FOUND.getGroup())) { - ServiceExceptionUtil.put(bo.getCode(),bo.getMessage()); - } + // TODO FROM 芋艿 to 芋艿:暂时注释掉,有问题的。 +// for (ErrorCodeBO bo : errorCodeService.getErrorCodeByGroup(SystemErrorCodeEnum.ADMIN_NOT_FOUND.getGroup())) { +// ServiceExceptionUtil.put(bo.getCode(),bo.getMessage()); +// } } } diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/errorcode/ErrorCodeServiceImpl.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/errorcode/ErrorCodeServiceImpl.java index ad1dffaa9..18d9ba624 100644 --- a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/errorcode/ErrorCodeServiceImpl.java +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/errorcode/ErrorCodeServiceImpl.java @@ -3,7 +3,6 @@ package cn.iocoder.mall.system.biz.service.errorcode; import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.vo.PageResult; import cn.iocoder.mall.mybatis.enums.DeletedStatusEnum; -import cn.iocoder.mall.mybatis.query.QueryWrapperX; import cn.iocoder.mall.system.biz.bo.errorcode.ErrorCodeBO; import cn.iocoder.mall.system.biz.convert.errorcode.ErrorCodeConvert; import cn.iocoder.mall.system.biz.dao.errorcode.ErrorCodeMapper; @@ -37,7 +36,6 @@ public class ErrorCodeServiceImpl extends ServiceImpl getErrorCodeList(ErrorCodeGetListDTO errorCodeGetListDTO) { - // TODO FROM 芋艿 to 鱿鱼丝:QueryWrapperX 只存在 mapper 里,不直接体现在 Service return ErrorCodeConvert.INSTANCE.convertList(errorCodeMapper.selectListByIds(errorCodeGetListDTO.getIds())); } diff --git a/system/system-biz/src/main/resources/biz.yaml b/system/system-biz/src/main/resources/biz.yaml index ba156c62e..f8f5764e6 100644 --- a/system/system-biz/src/main/resources/biz.yaml +++ b/system/system-biz/src/main/resources/biz.yaml @@ -1,7 +1,7 @@ spring: # 数据源配置项 datasource: - url: jdbc:mysql://s1.iocoder.cn:3306/mall_system?useSSL=false&useUnicode=true&characterEncoding=UTF-8 + url: jdbc:mysql://400-infra.server.iocoder.cn:3306/mall_system?useSSL=false&useUnicode=true&characterEncoding=UTF-8 driver-class-name: com.mysql.jdbc.Driver username: root password: 3WLiVUBEwTbvAfsh diff --git a/system/system-rpc/src/main/resources/rpc-local.yaml b/system/system-rpc/src/main/resources/rpc-local.yaml index e056170af..2e9e99973 100644 --- a/system/system-rpc/src/main/resources/rpc-local.yaml +++ b/system/system-rpc/src/main/resources/rpc-local.yaml @@ -4,11 +4,11 @@ spring: nacos: # Spring Cloud Nacos Discovery 配置项 discovery: - server-addr: s1.iocoder.cn:8848 # Nacos 服务器地址 + server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址 namespace: local # Nacos 命名空间 # Dubbo 配置项 dubbo: # Dubbo 注册中心 registry: - address: spring-cloud://s1.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址 + address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址