进一步完善 Dubbo 路由封装

This commit is contained in:
YunaiV 2020-07-22 07:26:09 +08:00
parent 92c2d79dc1
commit 8edc49f4e7
29 changed files with 122 additions and 36 deletions

View File

@ -1,4 +1,4 @@
package cn.iocoder.common.framework.util; package cn.iocoder.common.framework.exception.util;
import cn.iocoder.common.framework.exception.ErrorCode; import cn.iocoder.common.framework.exception.ErrorCode;
import cn.iocoder.common.framework.exception.ServiceException; import cn.iocoder.common.framework.exception.ServiceException;

View File

@ -0,0 +1,14 @@
package cn.iocoder.common.framework.util;
import cn.hutool.system.SystemUtil;
/**
* 操作系统工具类
*/
public class OSUtils {
public static String getHostName() {
return SystemUtil.getHostInfo().getName();
}
}

View File

@ -0,0 +1,66 @@
package cn.iocoder.mall.dubbo.config;
import cn.iocoder.common.framework.util.OSUtils;
import cn.iocoder.common.framework.util.StringUtils;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.env.EnvironmentPostProcessor;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.MapPropertySource;
import org.springframework.core.env.MutablePropertySources;
import org.springframework.core.env.PropertySource;
import org.springframework.util.CollectionUtils;
import java.util.HashMap;
import java.util.Map;
/**
* Dubbo 配置项的后置处理器主要目的如下
*
* 1. 生成 {@link #DUBBO_TAG_PROPERTIES_KEY} 配置项可用于本地开发环境下的 dubbo.provider.tag 配置项
*/
public class DubboEnvironmentPostProcessor implements EnvironmentPostProcessor {
/**
* 默认配置项的 PropertySource 名字
*/
private static final String PROPERTY_SOURCE_NAME = "mallDubboProperties";
/**
* Dubbo 路由标签属性 KEY
*/
private static final String DUBBO_TAG_PROPERTIES_KEY = "DUBBO_TAG";
@Override
public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) {
// 需要修改的配置项
Map<String, Object> modifyProperties = new HashMap<>();
// 生成 DUBBO_TAG_PROPERTIES_KEY使用 hostname
String dubboTag = OSUtils.getHostName();
if (!StringUtils.hasText(dubboTag)) {
dubboTag = StringUtils.uuid(true); // 兜底强行生成一个
}
modifyProperties.put(DUBBO_TAG_PROPERTIES_KEY, dubboTag);
// 添加到 environment 排在最优最低优先级
addOrReplace(environment.getPropertySources(), modifyProperties);
}
private void addOrReplace(MutablePropertySources propertySources, Map<String, Object> map) {
if (CollectionUtils.isEmpty(map)) {
return;
}
// 情况一如果存在 defaultProperties PropertySource则进行 key 的修改
if (propertySources.contains(PROPERTY_SOURCE_NAME)) {
PropertySource<?> source = propertySources.get(PROPERTY_SOURCE_NAME);
if (source instanceof MapPropertySource) {
MapPropertySource target = (MapPropertySource) source;
for (String key : map.keySet()) {
target.getSource().put(key, map.get(key));
}
}
return;
}
// 情况二不存在 defaultProperties PropertySource则直接添加到其中
propertySources.addLast(new MapPropertySource(PROPERTY_SOURCE_NAME, map));
}
}

View File

@ -51,6 +51,7 @@ public class DubboProviderExceptionFilter implements Filter, Filter.Listener {
appResponse.setValue(CommonResult.error((ServiceException) exception)); appResponse.setValue(CommonResult.error((ServiceException) exception));
// 2.2 如果是 GlobalException 全局异常则直接抛出 // 2.2 如果是 GlobalException 全局异常则直接抛出
} else { } else {
// TODO 优化点尝试修改成 RpcException
appResponse.setException(exception); appResponse.setException(exception);
} }
} catch (Throwable e) { } catch (Throwable e) {

View File

@ -1,11 +1,10 @@
package cn.iocoder.mall.dubbo.core.web; package cn.iocoder.mall.dubbo.core.web;
import cn.iocoder.common.framework.util.OSUtils;
import cn.iocoder.common.framework.util.StringUtils; import cn.iocoder.common.framework.util.StringUtils;
import cn.iocoder.mall.dubbo.core.cluster.interceptor.DubboConsumerRouterTagClusterInterceptor; import cn.iocoder.mall.dubbo.core.cluster.interceptor.DubboConsumerRouterTagClusterInterceptor;
import cn.iocoder.mall.dubbo.core.filter.DubboProviderRouterTagFilter; import cn.iocoder.mall.dubbo.core.filter.DubboProviderRouterTagFilter;
import cn.iocoder.mall.dubbo.core.router.DubboRouterTagContextHolder; import cn.iocoder.mall.dubbo.core.router.DubboRouterTagContextHolder;
import org.apache.dubbo.common.constants.CommonConstants;
import org.apache.dubbo.rpc.RpcContext;
import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
@ -22,12 +21,18 @@ public class DubboRouterTagWebInterceptor implements HandlerInterceptor {
private static final String HEADER_DUBBO_TAG = "dubbo-tag"; private static final String HEADER_DUBBO_TAG = "dubbo-tag";
private static final String HOST_NAME_VALUE = "${HOSTNAME}";
@Override @Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) { public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
String tag = request.getHeader(HEADER_DUBBO_TAG); String tag = request.getHeader(HEADER_DUBBO_TAG);
if (StringUtils.hasText(tag)) { if (StringUtils.hasText(tag)) {
// 特殊逻辑解决 IDEA Rest Client 不支持环境变量的读取所以就服务器来做
if (HOST_NAME_VALUE.equals(tag)) {
tag = OSUtils.getHostName();
}
// 设置到 DubboRouterTagContextHolder 上下文
DubboRouterTagContextHolder.setTag(tag); DubboRouterTagContextHolder.setTag(tag);
RpcContext.getContext().setAttachment(CommonConstants.TAG_KEY, tag);
} }
return true; return true;
} }

View File

@ -1,2 +1,5 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
cn.iocoder.mall.dubbo.config.DubboWebAutoConfiguration cn.iocoder.mall.dubbo.config.DubboWebAutoConfiguration
org.springframework.boot.env.EnvironmentPostProcessor=\
cn.iocoder.mall.dubbo.config.DubboEnvironmentPostProcessor

View File

@ -1,6 +1,6 @@
package cn.iocoder.mall.security.admin.core.interceptor; package cn.iocoder.mall.security.admin.core.interceptor;
import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.exception.util.ServiceExceptionUtil;
import cn.iocoder.mall.security.admin.core.context.AdminSecurityContextHolder; import cn.iocoder.mall.security.admin.core.context.AdminSecurityContextHolder;
import cn.iocoder.mall.systemservice.enums.SystemErrorCodeConstants; import cn.iocoder.mall.systemservice.enums.SystemErrorCodeConstants;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;

View File

@ -4,7 +4,7 @@ import cn.iocoder.common.framework.enums.UserTypeEnum;
import cn.iocoder.common.framework.exception.GlobalException; import cn.iocoder.common.framework.exception.GlobalException;
import cn.iocoder.common.framework.util.CollectionUtils; import cn.iocoder.common.framework.util.CollectionUtils;
import cn.iocoder.common.framework.util.HttpUtil; import cn.iocoder.common.framework.util.HttpUtil;
import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.exception.util.ServiceExceptionUtil;
import cn.iocoder.common.framework.vo.CommonResult; import cn.iocoder.common.framework.vo.CommonResult;
import cn.iocoder.mall.security.admin.core.context.AdminSecurityContext; import cn.iocoder.mall.security.admin.core.context.AdminSecurityContext;
import cn.iocoder.mall.security.admin.core.context.AdminSecurityContextHolder; import cn.iocoder.mall.security.admin.core.context.AdminSecurityContextHolder;

View File

@ -3,7 +3,7 @@ package cn.iocoder.mall.security.user.core.interceptor;
import cn.iocoder.common.framework.exception.enums.GlobalErrorCodeEnum; import cn.iocoder.common.framework.exception.enums.GlobalErrorCodeEnum;
import cn.iocoder.common.framework.enums.UserTypeEnum; import cn.iocoder.common.framework.enums.UserTypeEnum;
import cn.iocoder.common.framework.util.HttpUtil; import cn.iocoder.common.framework.util.HttpUtil;
import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.exception.util.ServiceExceptionUtil;
import cn.iocoder.common.framework.vo.CommonResult; import cn.iocoder.common.framework.vo.CommonResult;
import cn.iocoder.mall.security.user.core.context.UserSecurityContext; import cn.iocoder.mall.security.user.core.context.UserSecurityContext;
import cn.iocoder.mall.security.user.core.context.UserSecurityContextHolder; import cn.iocoder.mall.security.user.core.context.UserSecurityContextHolder;

View File

@ -2,7 +2,7 @@ package cn.iocoder.mall.system.errorcode.core;
import cn.iocoder.common.framework.util.CollectionUtils; import cn.iocoder.common.framework.util.CollectionUtils;
import cn.iocoder.common.framework.util.DateUtil; import cn.iocoder.common.framework.util.DateUtil;
import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.exception.util.ServiceExceptionUtil;
import cn.iocoder.common.framework.vo.CommonResult; import cn.iocoder.common.framework.vo.CommonResult;
import cn.iocoder.mall.systemservice.rpc.errorcode.ErrorCodeRpc; import cn.iocoder.mall.systemservice.rpc.errorcode.ErrorCodeRpc;
import cn.iocoder.mall.systemservice.rpc.errorcode.vo.ErrorCodeVO; import cn.iocoder.mall.systemservice.rpc.errorcode.vo.ErrorCodeVO;

View File

@ -2,7 +2,7 @@
POST {{baseUrl}}/department/create POST {{baseUrl}}/department/create
Content-Type: application/x-www-form-urlencoded Content-Type: application/x-www-form-urlencoded
Authorization: Bearer {{accessToken}} Authorization: Bearer {{accessToken}}
dubbo-tag: yunai dubbo-tag: {{dubboTag}}
name=测试部门&pid=0&sort=0 name=测试部门&pid=0&sort=0

View File

@ -5,16 +5,12 @@ spring:
# Spring Cloud Nacos Discovery 配置项 # Spring Cloud Nacos Discovery 配置项
discovery: discovery:
server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址 server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址
namespace: local # Nacos 命名空间 namespace: dev # Nacos 命名空间
# Dubbo 配置项 # Dubbo 配置项
dubbo: dubbo:
# Dubbo 注册中心 # Dubbo 注册中心
registry: registry:
# address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址 # address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
# address: nacos://400-infra.server.iocoder.cn:8848?namespace=local # 指定 Dubbo 服务注册中心的地址 address: nacos://400-infra.server.iocoder.cn:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
protocol: nacos
address: 400-infra.server.iocoder.cn:8848?namespace=local
timeout: 20000
register: true
subscribe: true

View File

@ -1,6 +1,7 @@
{ {
"local": { "local": {
"baseUrl": "http://127.0.0.1:18083/management-api/", "baseUrl": "http://127.0.0.1:18083/management-api/",
"accessToken": "yudaoyuanma" "accessToken": "yudaoyuanma",
"dubboTag": "${HOSTNAME}"
} }
} }

View File

@ -2,14 +2,12 @@ package cn.iocoder.mall.systemservice;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
@SpringBootApplication @SpringBootApplication
public class SystemServiceApplication { public class SystemServiceApplication {
public static void main(String[] args) { public static void main(String[] args) {
ConfigurableApplicationContext context = SpringApplication.run(SystemServiceApplication.class, args); SpringApplication.run(SystemServiceApplication.class, args);
System.out.println(context);
} }
} }

View File

@ -2,7 +2,7 @@ package cn.iocoder.mall.systemservice.service.admin;
import cn.iocoder.common.framework.enums.CommonStatusEnum; import cn.iocoder.common.framework.enums.CommonStatusEnum;
import cn.iocoder.common.framework.util.DigestUtils; import cn.iocoder.common.framework.util.DigestUtils;
import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.exception.util.ServiceExceptionUtil;
import cn.iocoder.common.framework.util.StringUtils; import cn.iocoder.common.framework.util.StringUtils;
import cn.iocoder.common.framework.vo.PageResult; import cn.iocoder.common.framework.vo.PageResult;
import cn.iocoder.mall.systemservice.convert.admin.AdminConvert; import cn.iocoder.mall.systemservice.convert.admin.AdminConvert;

View File

@ -1,6 +1,6 @@
package cn.iocoder.mall.systemservice.service.admin; package cn.iocoder.mall.systemservice.service.admin;
import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.exception.util.ServiceExceptionUtil;
import cn.iocoder.mall.systemservice.convert.admin.DepartmentConvert; import cn.iocoder.mall.systemservice.convert.admin.DepartmentConvert;
import cn.iocoder.mall.systemservice.dal.mysql.dataobject.admin.DepartmentDO; import cn.iocoder.mall.systemservice.dal.mysql.dataobject.admin.DepartmentDO;
import cn.iocoder.mall.systemservice.dal.mysql.mapper.admin.AdminMapper; import cn.iocoder.mall.systemservice.dal.mysql.mapper.admin.AdminMapper;

View File

@ -1,6 +1,6 @@
package cn.iocoder.mall.systemservice.service.datadict; package cn.iocoder.mall.systemservice.service.datadict;
import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.exception.util.ServiceExceptionUtil;
import cn.iocoder.mall.systemservice.convert.datadict.DataDictConvert; import cn.iocoder.mall.systemservice.convert.datadict.DataDictConvert;
import cn.iocoder.mall.systemservice.dal.mysql.dataobject.datadict.DataDictDO; import cn.iocoder.mall.systemservice.dal.mysql.dataobject.datadict.DataDictDO;
import cn.iocoder.mall.systemservice.dal.mysql.mapper.datadict.DataDictMapper; import cn.iocoder.mall.systemservice.dal.mysql.mapper.datadict.DataDictMapper;

View File

@ -1,7 +1,7 @@
package cn.iocoder.mall.systemservice.service.errorcode; package cn.iocoder.mall.systemservice.service.errorcode;
import cn.iocoder.common.framework.util.CollectionUtils; import cn.iocoder.common.framework.util.CollectionUtils;
import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.exception.util.ServiceExceptionUtil;
import cn.iocoder.common.framework.vo.PageResult; import cn.iocoder.common.framework.vo.PageResult;
import cn.iocoder.mall.systemservice.convert.errorcode.ErrorCodeConvert; import cn.iocoder.mall.systemservice.convert.errorcode.ErrorCodeConvert;
import cn.iocoder.mall.systemservice.dal.mysql.dataobject.errorcode.ErrorCodeDO; import cn.iocoder.mall.systemservice.dal.mysql.dataobject.errorcode.ErrorCodeDO;

View File

@ -1,6 +1,6 @@
package cn.iocoder.mall.systemservice.service.oauth; package cn.iocoder.mall.systemservice.service.oauth;
import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.exception.util.ServiceExceptionUtil;
import cn.iocoder.common.framework.util.StringUtils; import cn.iocoder.common.framework.util.StringUtils;
import cn.iocoder.mall.systemservice.convert.oauth.OAuth2Convert; import cn.iocoder.mall.systemservice.convert.oauth.OAuth2Convert;
import cn.iocoder.mall.systemservice.dal.mysql.dataobject.oauth.OAuth2AccessTokenDO; import cn.iocoder.mall.systemservice.dal.mysql.dataobject.oauth.OAuth2AccessTokenDO;

View File

@ -3,7 +3,7 @@ package cn.iocoder.mall.systemservice.service.permission;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.iocoder.common.framework.exception.GlobalException; import cn.iocoder.common.framework.exception.GlobalException;
import cn.iocoder.common.framework.util.CollectionUtils; import cn.iocoder.common.framework.util.CollectionUtils;
import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.exception.util.ServiceExceptionUtil;
import cn.iocoder.mall.systemservice.dal.mysql.dataobject.admin.AdminDO; import cn.iocoder.mall.systemservice.dal.mysql.dataobject.admin.AdminDO;
import cn.iocoder.mall.systemservice.dal.mysql.dataobject.permission.AdminRoleDO; import cn.iocoder.mall.systemservice.dal.mysql.dataobject.permission.AdminRoleDO;
import cn.iocoder.mall.systemservice.dal.mysql.dataobject.permission.ResourceDO; import cn.iocoder.mall.systemservice.dal.mysql.dataobject.permission.ResourceDO;

View File

@ -1,7 +1,7 @@
package cn.iocoder.mall.systemservice.service.permission; package cn.iocoder.mall.systemservice.service.permission;
import cn.iocoder.common.framework.util.CollectionUtils; import cn.iocoder.common.framework.util.CollectionUtils;
import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.exception.util.ServiceExceptionUtil;
import cn.iocoder.mall.systemservice.convert.permission.ResourceConvert; import cn.iocoder.mall.systemservice.convert.permission.ResourceConvert;
import cn.iocoder.mall.systemservice.dal.mysql.dataobject.permission.ResourceDO; import cn.iocoder.mall.systemservice.dal.mysql.dataobject.permission.ResourceDO;
import cn.iocoder.mall.systemservice.dal.mysql.dataobject.permission.RoleResourceDO; import cn.iocoder.mall.systemservice.dal.mysql.dataobject.permission.RoleResourceDO;

View File

@ -1,7 +1,7 @@
package cn.iocoder.mall.systemservice.service.permission; package cn.iocoder.mall.systemservice.service.permission;
import cn.iocoder.common.framework.util.CollectionUtils; import cn.iocoder.common.framework.util.CollectionUtils;
import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.exception.util.ServiceExceptionUtil;
import cn.iocoder.common.framework.vo.PageResult; import cn.iocoder.common.framework.vo.PageResult;
import cn.iocoder.mall.systemservice.convert.permission.RoleConvert; import cn.iocoder.mall.systemservice.convert.permission.RoleConvert;
import cn.iocoder.mall.systemservice.dal.mysql.dataobject.permission.AdminRoleDO; import cn.iocoder.mall.systemservice.dal.mysql.dataobject.permission.AdminRoleDO;

View File

@ -1,6 +1,6 @@
package cn.iocoder.mall.systemservice.service.systemlog; package cn.iocoder.mall.systemservice.service.systemlog;
import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.exception.util.ServiceExceptionUtil;
import cn.iocoder.common.framework.vo.PageResult; import cn.iocoder.common.framework.vo.PageResult;
import cn.iocoder.mall.systemservice.convert.systemlog.SystemExceptionLogConvert; import cn.iocoder.mall.systemservice.convert.systemlog.SystemExceptionLogConvert;
import cn.iocoder.mall.systemservice.dal.mysql.dataobject.systemlog.SystemExceptionLogDO; import cn.iocoder.mall.systemservice.dal.mysql.dataobject.systemlog.SystemExceptionLogDO;

View File

@ -11,11 +11,14 @@ spring:
# Spring Cloud Nacos Discovery 配置项 # Spring Cloud Nacos Discovery 配置项
discovery: discovery:
server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址 server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址
namespace: local # Nacos 命名空间 namespace: dev # Nacos 命名空间
# Dubbo 配置项 # Dubbo 配置项
dubbo: dubbo:
# Dubbo 注册中心 # Dubbo 注册中心
registry: registry:
# address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址 # address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
address: nacos://400-infra.server.iocoder.cn:8848?namespace=local # 指定 Dubbo 服务注册中心的地址 address: nacos://400-infra.server.iocoder.cn:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
# Dubbo 服务提供者的配置
provider:
tag: ${DUBBO_TAG} # Dubbo 路由分组

View File

@ -34,7 +34,6 @@ dubbo:
provider: provider:
filter: -exception filter: -exception
validation: true # 开启 Provider 参数校验 validation: true # 开启 Provider 参数校验
tag:
OAuth2Rpc: OAuth2Rpc:
version: 1.0.0 version: 1.0.0
AdminRpc: AdminRpc:

View File

@ -1,6 +1,6 @@
package cn.iocoder.mall.userservice.config; package cn.iocoder.mall.userservice.config;
import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.exception.util.ServiceExceptionUtil;
import cn.iocoder.mall.userservice.enums.UserErrorCodeConstants; import cn.iocoder.mall.userservice.enums.UserErrorCodeConstants;
import org.springframework.boot.context.event.ApplicationReadyEvent; import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;

View File

@ -1,7 +1,7 @@
package cn.iocoder.mall.userservice.service.sms; package cn.iocoder.mall.userservice.service.sms;
import cn.iocoder.common.framework.exception.ServiceException; import cn.iocoder.common.framework.exception.ServiceException;
import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.exception.util.ServiceExceptionUtil;
import cn.iocoder.common.framework.validator.Mobile; import cn.iocoder.common.framework.validator.Mobile;
import cn.iocoder.mall.userservice.dal.mysql.dataobject.sms.UserSmsCodeDO; import cn.iocoder.mall.userservice.dal.mysql.dataobject.sms.UserSmsCodeDO;
import cn.iocoder.mall.userservice.dal.mysql.mapper.sms.UserSmsCodeMapper; import cn.iocoder.mall.userservice.dal.mysql.mapper.sms.UserSmsCodeMapper;

View File

@ -1,6 +1,6 @@
package cn.iocoder.mall.user.biz.enums; package cn.iocoder.mall.user.biz.enums;
import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.exception.util.ServiceExceptionUtil;
/** /**
* 错误码枚举类 * 错误码枚举类

View File

@ -1,6 +1,6 @@
package cn.iocoder.mall.user.biz.service.user; package cn.iocoder.mall.user.biz.service.user;
import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.exception.util.ServiceExceptionUtil;
import cn.iocoder.mall.mybatis.core.enums.DeletedStatusEnum; import cn.iocoder.mall.mybatis.core.enums.DeletedStatusEnum;
import cn.iocoder.mall.user.biz.bo.user.UserAddressBO; import cn.iocoder.mall.user.biz.bo.user.UserAddressBO;
import cn.iocoder.mall.user.biz.convert.user.UserAddressConvert; import cn.iocoder.mall.user.biz.convert.user.UserAddressConvert;