- 优化:修改 pom以来

- 删除:systemError 改为 useError
This commit is contained in:
fansili 2020-05-08 10:43:54 +08:00
parent 739afb86e3
commit 748fe31cfe
3 changed files with 13 additions and 6 deletions

View File

@ -11,5 +11,12 @@
<artifactId>user-biz-api</artifactId>
<dependencies>
<!-- Mall 相关 -->
<dependency>
<groupId>cn.iocoder.mall</groupId>
<artifactId>common-framework</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>

View File

@ -16,7 +16,7 @@
<!-- Mall 相关 -->
<dependency>
<groupId>cn.iocoder.mall</groupId>
<artifactId>system-biz-api</artifactId>
<artifactId>user-biz-api</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>

View File

@ -2,13 +2,13 @@ package cn.iocoder.mall.user.biz.service.user;
import cn.iocoder.common.framework.util.ServiceExceptionUtil;
import cn.iocoder.mall.mybatis.enums.DeletedStatusEnum;
import cn.iocoder.mall.system.biz.enums.SystemErrorCodeEnum;
import cn.iocoder.mall.user.biz.bo.user.UserAddressBO;
import cn.iocoder.mall.user.biz.convert.user.UserAddressConvert;
import cn.iocoder.mall.user.biz.dao.user.UserAddressMapper;
import cn.iocoder.mall.user.biz.dataobject.user.UsersUserAddressDO;
import cn.iocoder.mall.user.biz.dto.user.UserAddressAddDTO;
import cn.iocoder.mall.user.biz.dto.user.UserAddressUpdateDTO;
import cn.iocoder.mall.user.biz.enums.UserErrorCodeEnum;
import cn.iocoder.mall.user.biz.enums.user.UserAddressHasDefaultEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -62,12 +62,12 @@ public class UserAddressServiceImpl implements UserAddressService {
UsersUserAddressDO userAddress = userAddressMapper.selectById(userAddressAddDTO.getId());
if (userAddress == null) {
throw ServiceExceptionUtil.exception(SystemErrorCodeEnum.USER_ADDRESS_NOT_EXISTENT.getCode());
throw ServiceExceptionUtil.exception(UserErrorCodeEnum.USER_ADDRESS_NOT_EXISTENT.getCode());
}
// 删除的地址不能更新
if (DeletedStatusEnum.DELETED_YES.getValue().equals(userAddress.getDeleted())) {
throw ServiceExceptionUtil.exception(SystemErrorCodeEnum.USER_ADDRESS_IS_DELETED.getCode());
throw ServiceExceptionUtil.exception(UserErrorCodeEnum.USER_ADDRESS_IS_DELETED.getCode());
}
// 检查是否设置为默认地址
@ -95,7 +95,7 @@ public class UserAddressServiceImpl implements UserAddressService {
UsersUserAddressDO userAddress = userAddressMapper.selectById(addressId);
if (userAddress == null) {
throw ServiceExceptionUtil.exception(SystemErrorCodeEnum.USER_ADDRESS_NOT_EXISTENT.getCode());
throw ServiceExceptionUtil.exception(UserErrorCodeEnum.USER_ADDRESS_NOT_EXISTENT.getCode());
}
if (DeletedStatusEnum.DELETED_YES.getValue().equals(userAddress.getDeleted())) {