diff --git a/admin/admin-service-impl/src/main/java/cn/iocoder/mall/admin/service/AdminServiceImpl.java b/admin/admin-service-impl/src/main/java/cn/iocoder/mall/admin/service/AdminServiceImpl.java index 55eef871..7dca1ef2 100644 --- a/admin/admin-service-impl/src/main/java/cn/iocoder/mall/admin/service/AdminServiceImpl.java +++ b/admin/admin-service-impl/src/main/java/cn/iocoder/mall/admin/service/AdminServiceImpl.java @@ -1,6 +1,6 @@ package cn.iocoder.mall.admin.service; -import cn.iocoder.common.framework.constant.DeleteStatusEnum; +import cn.iocoder.common.framework.constant.DeletedStatusEnum; import cn.iocoder.common.framework.constant.SysErrorCodeEnum; import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.vo.CommonResult; @@ -89,7 +89,7 @@ public class AdminServiceImpl implements AdminService { .setPassword(encodePassword(adminAddDTO.getPassword())) // 加密密码 .setStatus(AdminDO.STATUS_ENABLE); admin.setCreateTime(new Date()); - admin.setDeleted(DeleteStatusEnum.DELETE_NO.getValue()); + admin.setDeleted(DeletedStatusEnum.DELETED_NO.getValue()); adminMapper.insert(admin); // TODO 插入操作日志 // 返回成功 @@ -160,7 +160,7 @@ public class AdminServiceImpl implements AdminService { } // 标记删除 AdminDO AdminDO updateAdmin = new AdminDO().setId(updateAdminId); - updateAdmin.setDeleted(DeleteStatusEnum.DELETE_YES.getValue()); + updateAdmin.setDeleted(DeletedStatusEnum.DELETED_YES.getValue()); adminMapper.update(updateAdmin); // 标记删除 AdminRole adminRoleMapper.updateToDeletedByAdminId(updateAdminId); @@ -190,7 +190,7 @@ public class AdminServiceImpl implements AdminService { List adminRoleDOs = roleIds.stream().map(roleId -> { AdminRoleDO roleResource = new AdminRoleDO().setAdminId(updateAdminId).setRoleId(roleId); roleResource.setCreateTime(new Date()); - roleResource.setDeleted(DeleteStatusEnum.DELETE_NO.getValue()); + roleResource.setDeleted(DeletedStatusEnum.DELETED_NO.getValue()); return roleResource; }).collect(Collectors.toList()); adminRoleMapper.insertList(adminRoleDOs); diff --git a/admin/admin-service-impl/src/main/java/cn/iocoder/mall/admin/service/DataDictServiceImpl.java b/admin/admin-service-impl/src/main/java/cn/iocoder/mall/admin/service/DataDictServiceImpl.java index 0b809cf3..3ba01abc 100644 --- a/admin/admin-service-impl/src/main/java/cn/iocoder/mall/admin/service/DataDictServiceImpl.java +++ b/admin/admin-service-impl/src/main/java/cn/iocoder/mall/admin/service/DataDictServiceImpl.java @@ -1,6 +1,6 @@ package cn.iocoder.mall.admin.service; -import cn.iocoder.common.framework.constant.DeleteStatusEnum; +import cn.iocoder.common.framework.constant.DeletedStatusEnum; import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.vo.CommonResult; import cn.iocoder.mall.admin.api.DataDictService; @@ -42,7 +42,7 @@ public class DataDictServiceImpl implements DataDictService { // 保存到数据库 DataDictDO dataDict = DataDictConvert.INSTANCE.convert(dataDictAddDTO); dataDict.setCreateTime(new Date()); - dataDict.setDeleted(DeleteStatusEnum.DELETE_NO.getValue()); + dataDict.setDeleted(DeletedStatusEnum.DELETED_NO.getValue()); dataDictMapper.insert(dataDict); // TODO 插入操作日志 // 返回成功 @@ -80,7 +80,7 @@ public class DataDictServiceImpl implements DataDictService { } // 更新到数据库 DataDictDO updateDataDict = new DataDictDO().setId(dataDictId); - updateDataDict.setDeleted(DeleteStatusEnum.DELETE_YES.getValue()); + updateDataDict.setDeleted(DeletedStatusEnum.DELETED_YES.getValue()); dataDictMapper.update(updateDataDict); // TODO 插入操作日志 // 返回成功 diff --git a/admin/admin-service-impl/src/main/java/cn/iocoder/mall/admin/service/ResourceServiceImpl.java b/admin/admin-service-impl/src/main/java/cn/iocoder/mall/admin/service/ResourceServiceImpl.java index b01edbc7..d0b83b8a 100644 --- a/admin/admin-service-impl/src/main/java/cn/iocoder/mall/admin/service/ResourceServiceImpl.java +++ b/admin/admin-service-impl/src/main/java/cn/iocoder/mall/admin/service/ResourceServiceImpl.java @@ -1,8 +1,7 @@ package cn.iocoder.mall.admin.service; -import cn.iocoder.common.framework.constant.DeleteStatusEnum; +import cn.iocoder.common.framework.constant.DeletedStatusEnum; import cn.iocoder.common.framework.constant.SysErrorCodeEnum; -import cn.iocoder.common.framework.dataobject.DeletableDO; import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.vo.CommonResult; import cn.iocoder.mall.admin.api.ResourceService; @@ -76,7 +75,7 @@ public class ResourceServiceImpl implements ResourceService { resource.setHandler("/" + resource.getHandler()); } resource.setCreateTime(new Date()); - resource.setDeleted(DeleteStatusEnum.DELETE_NO.getValue()); + resource.setDeleted(DeletedStatusEnum.DELETED_NO.getValue()); resourceMapper.insert(resource); // TODO 操作日志 // 返回成功 @@ -130,7 +129,7 @@ public class ResourceServiceImpl implements ResourceService { } // 更新到数据库 ResourceDO resource = new ResourceDO().setId(resourceId); - resource.setDeleted(DeleteStatusEnum.DELETE_YES.getValue()); + resource.setDeleted(DeletedStatusEnum.DELETED_YES.getValue()); resourceMapper.update(resource); // 删除资源关联表 roleResourceMapper.updateToDeletedByResourceId(resourceId); diff --git a/admin/admin-service-impl/src/main/java/cn/iocoder/mall/admin/service/RoleServiceImpl.java b/admin/admin-service-impl/src/main/java/cn/iocoder/mall/admin/service/RoleServiceImpl.java index 237e2ad9..32948452 100644 --- a/admin/admin-service-impl/src/main/java/cn/iocoder/mall/admin/service/RoleServiceImpl.java +++ b/admin/admin-service-impl/src/main/java/cn/iocoder/mall/admin/service/RoleServiceImpl.java @@ -1,7 +1,6 @@ package cn.iocoder.mall.admin.service; -import cn.iocoder.common.framework.constant.DeleteStatusEnum; -import cn.iocoder.common.framework.dataobject.DeletableDO; +import cn.iocoder.common.framework.constant.DeletedStatusEnum; import cn.iocoder.common.framework.util.CollectionUtil; import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.vo.CommonResult; @@ -82,7 +81,7 @@ public class RoleServiceImpl implements RoleService { // 保存到数据库 RoleDO role = RoleConvert.INSTANCE.convert(roleAddDTO); role.setCreateTime(new Date()); - role.setDeleted(DeleteStatusEnum.DELETE_NO.getValue()); + role.setDeleted(DeletedStatusEnum.DELETED_NO.getValue()); roleMapper.insert(role); // TODO 插入操作日志 // 返回成功 @@ -113,7 +112,7 @@ public class RoleServiceImpl implements RoleService { } // 更新到数据库,标记删除 RoleDO roleDO = new RoleDO().setId(roleId); - roleDO.setDeleted(DeleteStatusEnum.DELETE_YES.getValue()); + roleDO.setDeleted(DeletedStatusEnum.DELETED_YES.getValue()); roleMapper.update(roleDO); // 标记删除 RoleResource roleResourceMapper.updateToDeletedByRoleId(roleId); @@ -144,7 +143,7 @@ public class RoleServiceImpl implements RoleService { List roleResources = resourceIds.stream().map(resourceId -> { RoleResourceDO roleResource = new RoleResourceDO().setRoleId(roleId).setResourceId(resourceId); roleResource.setCreateTime(new Date()); - roleResource.setDeleted(DeleteStatusEnum.DELETE_NO.getValue()); + roleResource.setDeleted(DeletedStatusEnum.DELETED_NO.getValue()); return roleResource; }).collect(Collectors.toList()); roleResourceMapper.insertList(roleResources); diff --git a/common/common-framework/src/main/java/cn/iocoder/common/framework/constant/ModuleErrorCodeInterval.java b/common/common-framework/src/main/java/cn/iocoder/common/framework/constant/ModuleErrorCodeInterval.java index b926ca80..3f8c3f1b 100644 --- a/common/common-framework/src/main/java/cn/iocoder/common/framework/constant/ModuleErrorCodeInterval.java +++ b/common/common-framework/src/main/java/cn/iocoder/common/framework/constant/ModuleErrorCodeInterval.java @@ -15,7 +15,7 @@ package cn.iocoder.common.framework.constant; * @author Sin * @time 2019-03-23 11:28 */ -public final class ModuleErrorCodeInterval { +public class ModuleErrorCodeInterval { // order 错误码区间 [1-000-001-000 ~ 1-000-002-000] diff --git a/product/product-service-impl/src/main/java/cn/iocoder/mall/product/service/ProductAttrServiceImpl.java b/product/product-service-impl/src/main/java/cn/iocoder/mall/product/service/ProductAttrServiceImpl.java index 7b3fb17a..b4c17695 100644 --- a/product/product-service-impl/src/main/java/cn/iocoder/mall/product/service/ProductAttrServiceImpl.java +++ b/product/product-service-impl/src/main/java/cn/iocoder/mall/product/service/ProductAttrServiceImpl.java @@ -1,8 +1,7 @@ package cn.iocoder.mall.product.service; -import cn.iocoder.common.framework.constant.DeleteStatusEnum; +import cn.iocoder.common.framework.constant.DeletedStatusEnum; import cn.iocoder.common.framework.constant.SysErrorCodeEnum; -import cn.iocoder.common.framework.dataobject.DeletableDO; import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.vo.CommonResult; import cn.iocoder.mall.product.api.ProductAttrService; @@ -121,7 +120,7 @@ public class ProductAttrServiceImpl implements ProductAttrService { ProductAttrDO productAttrDO = ProductAttrConvert.INSTANCE.convert(productAttrAddDTO) .setStatus(ProductAttrConstants.ATTR_STATUS_ENABLE); productAttrDO.setCreateTime(new Date()); - productAttrDO.setDeleted(DeleteStatusEnum.DELETE_NO.getValue()); + productAttrDO.setDeleted(DeletedStatusEnum.DELETED_NO.getValue()); productAttrMapper.insert(productAttrDO); // 返回成功 return CommonResult.success(ProductAttrConvert.INSTANCE.convert(productAttrDO)); @@ -177,7 +176,7 @@ public class ProductAttrServiceImpl implements ProductAttrService { ProductAttrValueDO productAttrValueDO = ProductAttrConvert.INSTANCE.convert(productAttrValueAddDTO) .setStatus(ProductAttrConstants.ATTR_VALUE_STATUS_ENABLE); productAttrValueDO.setCreateTime(new Date()); - productAttrValueDO.setDeleted(DeleteStatusEnum.DELETE_NO.getValue()); + productAttrValueDO.setDeleted(DeletedStatusEnum.DELETED_NO.getValue()); productAttrValueMapper.insert(productAttrValueDO); // 返回成功 return CommonResult.success(ProductAttrConvert.INSTANCE.convert2(productAttrValueDO)); diff --git a/product/product-service-impl/src/main/java/cn/iocoder/mall/product/service/ProductCategoryServiceImpl.java b/product/product-service-impl/src/main/java/cn/iocoder/mall/product/service/ProductCategoryServiceImpl.java index ccbb7d9a..d18dfa9a 100644 --- a/product/product-service-impl/src/main/java/cn/iocoder/mall/product/service/ProductCategoryServiceImpl.java +++ b/product/product-service-impl/src/main/java/cn/iocoder/mall/product/service/ProductCategoryServiceImpl.java @@ -1,8 +1,7 @@ package cn.iocoder.mall.product.service; -import cn.iocoder.common.framework.constant.DeleteStatusEnum; +import cn.iocoder.common.framework.constant.DeletedStatusEnum; import cn.iocoder.common.framework.constant.SysErrorCodeEnum; -import cn.iocoder.common.framework.dataobject.DeletableDO; import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.vo.CommonResult; import cn.iocoder.mall.product.api.ProductCategoryService; @@ -50,7 +49,7 @@ public class ProductCategoryServiceImpl implements ProductCategoryService { ProductCategoryDO productCategory = ProductCategoryConvert.INSTANCE.convert(productCategoryAddDTO) .setStatus(ProductCategoryConstants.STATUS_ENABLE); productCategory.setCreateTime(new Date()); - productCategory.setDeleted(DeleteStatusEnum.DELETE_NO.getValue()); + productCategory.setDeleted(DeletedStatusEnum.DELETED_NO.getValue()); productCategoryMapper.insert(productCategory); // TODO 操作日志 // 返回成功 @@ -118,7 +117,7 @@ public class ProductCategoryServiceImpl implements ProductCategoryService { // 标记删除商品分类 ProductCategoryDO updateProductCategory = new ProductCategoryDO() .setId(productCategoryId); - updateProductCategory.setDeleted(DeleteStatusEnum.DELETE_YES.getValue()); + updateProductCategory.setDeleted(DeletedStatusEnum.DELETED_YES.getValue()); productCategoryMapper.update(updateProductCategory); // TODO 操作日志 return CommonResult.success(true); diff --git a/product/product-service-impl/src/main/java/cn/iocoder/mall/product/service/ProductSpuServiceImpl.java b/product/product-service-impl/src/main/java/cn/iocoder/mall/product/service/ProductSpuServiceImpl.java index 0e9ae58c..d9bf5d85 100644 --- a/product/product-service-impl/src/main/java/cn/iocoder/mall/product/service/ProductSpuServiceImpl.java +++ b/product/product-service-impl/src/main/java/cn/iocoder/mall/product/service/ProductSpuServiceImpl.java @@ -1,6 +1,6 @@ package cn.iocoder.mall.product.service; -import cn.iocoder.common.framework.constant.DeleteStatusEnum; +import cn.iocoder.common.framework.constant.DeletedStatusEnum; import cn.iocoder.common.framework.util.CollectionUtil; import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.util.StringUtil; @@ -92,7 +92,7 @@ public class ProductSpuServiceImpl implements ProductSpuService { .setPicUrls(StringUtil.join(productSpuAddDTO.getPicUrls(), ",")) .setSort(0); // 排序为 0 spu.setCreateTime(new Date()); - spu.setDeleted(DeleteStatusEnum.DELETE_NO.getValue()); + spu.setDeleted(DeletedStatusEnum.DELETED_NO.getValue()); initSpuFromSkus(spu, productSpuAddDTO.getSkus()); // 初始化 sku 相关信息到 spu 中 productSpuMapper.insert(spu); // 保存 Sku @@ -102,7 +102,7 @@ public class ProductSpuServiceImpl implements ProductSpuService { .setStatus(ProductSpuConstants.SKU_STATUS_ENABLE) .setAttrs(StringUtil.join(productSkuAddDTO.getAttrs(), ",")); sku.setCreateTime(new Date()); - sku.setDeleted(DeleteStatusEnum.DELETE_NO.getValue()); + sku.setDeleted(DeletedStatusEnum.DELETED_NO.getValue()); return sku; }).collect(Collectors.toList()); // 校验 Sku 规格 @@ -165,7 +165,7 @@ public class ProductSpuServiceImpl implements ProductSpuService { ProductSkuDO insertSku = ProductSpuConvert.INSTANCE.convert(skuUpdateDTO) .setSpuId(productSpuUpdateDTO.getId()).setStatus(ProductSpuConstants.SKU_STATUS_ENABLE).setAttrs(StringUtil.join(skuUpdateDTO.getAttrs(), ",")); insertSku.setCreateTime(new Date()); - insertSku.setDeleted(DeleteStatusEnum.DELETE_NO.getValue()); + insertSku.setDeleted(DeletedStatusEnum.DELETED_NO.getValue()); insertSkus.add(insertSku); } // 2、多余的,删除 diff --git a/user/user-service-impl/src/main/java/cn/iocoder/mall/user/service/UserServiceImpl.java b/user/user-service-impl/src/main/java/cn/iocoder/mall/user/service/UserServiceImpl.java index 9f46fbcd..c43ef3fb 100644 --- a/user/user-service-impl/src/main/java/cn/iocoder/mall/user/service/UserServiceImpl.java +++ b/user/user-service-impl/src/main/java/cn/iocoder/mall/user/service/UserServiceImpl.java @@ -1,6 +1,6 @@ package cn.iocoder.mall.user.service; -import cn.iocoder.common.framework.constant.DeleteStatusEnum; +import cn.iocoder.common.framework.constant.DeletedStatusEnum; import cn.iocoder.common.framework.constant.SysErrorCodeEnum; import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.util.ValidationUtil; @@ -52,7 +52,7 @@ public class UserServiceImpl implements UserService { // 创建用户 UserDO userDO = new UserDO().setMobile(mobile).setStatus(UserConstants.STATUS_ENABLE); userDO.setCreateTime(new Date()); - userDO.setDeleted(DeleteStatusEnum.DELETE_NO.getValue()); + userDO.setDeleted(DeletedStatusEnum.DELETED_NO.getValue()); userMapper.insert(userDO); // 插入注册信息 createUserRegister(userDO);