Commit 169c1e4907904815101533e5be32f0189c0446d3
1 parent
20f8cb16
✨ 2.0.1 版本发布准备
Showing
2 changed files
with
13 additions
and
13 deletions
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/framework/web/config/ErpWebConfiguration.java
| @@ -17,7 +17,7 @@ public class ErpWebConfiguration { | @@ -17,7 +17,7 @@ public class ErpWebConfiguration { | ||
| 17 | * erp 模块的 API 分组 | 17 | * erp 模块的 API 分组 |
| 18 | */ | 18 | */ |
| 19 | @Bean | 19 | @Bean |
| 20 | - public GroupedOpenApi tradeGroupedOpenApi() { | 20 | + public GroupedOpenApi erpGroupedOpenApi() { |
| 21 | return YudaoSwaggerAutoConfiguration.buildGroupedOpenApi("erp"); | 21 | return YudaoSwaggerAutoConfiguration.buildGroupedOpenApi("erp"); |
| 22 | } | 22 | } |
| 23 | 23 |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/product/ErpProductCategoryServiceImpl.java
| @@ -27,7 +27,7 @@ import static cn.iocoder.yudao.module.erp.enums.ErrorCodeConstants.*; | @@ -27,7 +27,7 @@ import static cn.iocoder.yudao.module.erp.enums.ErrorCodeConstants.*; | ||
| 27 | public class ErpProductCategoryServiceImpl implements ErpProductCategoryService { | 27 | public class ErpProductCategoryServiceImpl implements ErpProductCategoryService { |
| 28 | 28 | ||
| 29 | @Resource | 29 | @Resource |
| 30 | - private ErpProductCategoryMapper productCategoryMapper; | 30 | + private ErpProductCategoryMapper erpProductCategoryMapper; |
| 31 | 31 | ||
| 32 | @Resource | 32 | @Resource |
| 33 | @Lazy // 延迟加载,避免循环依赖 | 33 | @Lazy // 延迟加载,避免循环依赖 |
| @@ -42,7 +42,7 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService | @@ -42,7 +42,7 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService | ||
| 42 | 42 | ||
| 43 | // 插入 | 43 | // 插入 |
| 44 | ErpProductCategoryDO category = BeanUtils.toBean(createReqVO, ErpProductCategoryDO.class); | 44 | ErpProductCategoryDO category = BeanUtils.toBean(createReqVO, ErpProductCategoryDO.class); |
| 45 | - productCategoryMapper.insert(category); | 45 | + erpProductCategoryMapper.insert(category); |
| 46 | // 返回 | 46 | // 返回 |
| 47 | return category.getId(); | 47 | return category.getId(); |
| 48 | } | 48 | } |
| @@ -58,7 +58,7 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService | @@ -58,7 +58,7 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService | ||
| 58 | 58 | ||
| 59 | // 更新 | 59 | // 更新 |
| 60 | ErpProductCategoryDO updateObj = BeanUtils.toBean(updateReqVO, ErpProductCategoryDO.class); | 60 | ErpProductCategoryDO updateObj = BeanUtils.toBean(updateReqVO, ErpProductCategoryDO.class); |
| 61 | - productCategoryMapper.updateById(updateObj); | 61 | + erpProductCategoryMapper.updateById(updateObj); |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | @Override | 64 | @Override |
| @@ -66,7 +66,7 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService | @@ -66,7 +66,7 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService | ||
| 66 | // 1.1 校验存在 | 66 | // 1.1 校验存在 |
| 67 | validateProductCategoryExists(id); | 67 | validateProductCategoryExists(id); |
| 68 | // 1.2 校验是否有子产品分类 | 68 | // 1.2 校验是否有子产品分类 |
| 69 | - if (productCategoryMapper.selectCountByParentId(id) > 0) { | 69 | + if (erpProductCategoryMapper.selectCountByParentId(id) > 0) { |
| 70 | throw exception(PRODUCT_CATEGORY_EXITS_CHILDREN); | 70 | throw exception(PRODUCT_CATEGORY_EXITS_CHILDREN); |
| 71 | } | 71 | } |
| 72 | // 1.3 校验是否有产品 | 72 | // 1.3 校验是否有产品 |
| @@ -74,11 +74,11 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService | @@ -74,11 +74,11 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService | ||
| 74 | throw exception(PRODUCT_CATEGORY_EXITS_PRODUCT); | 74 | throw exception(PRODUCT_CATEGORY_EXITS_PRODUCT); |
| 75 | } | 75 | } |
| 76 | // 2. 删除 | 76 | // 2. 删除 |
| 77 | - productCategoryMapper.deleteById(id); | 77 | + erpProductCategoryMapper.deleteById(id); |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | private void validateProductCategoryExists(Long id) { | 80 | private void validateProductCategoryExists(Long id) { |
| 81 | - if (productCategoryMapper.selectById(id) == null) { | 81 | + if (erpProductCategoryMapper.selectById(id) == null) { |
| 82 | throw exception(PRODUCT_CATEGORY_NOT_EXISTS); | 82 | throw exception(PRODUCT_CATEGORY_NOT_EXISTS); |
| 83 | } | 83 | } |
| 84 | } | 84 | } |
| @@ -92,7 +92,7 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService | @@ -92,7 +92,7 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService | ||
| 92 | throw exception(PRODUCT_CATEGORY_PARENT_ERROR); | 92 | throw exception(PRODUCT_CATEGORY_PARENT_ERROR); |
| 93 | } | 93 | } |
| 94 | // 2. 父产品分类不存在 | 94 | // 2. 父产品分类不存在 |
| 95 | - ErpProductCategoryDO parentCategory = productCategoryMapper.selectById(parentId); | 95 | + ErpProductCategoryDO parentCategory = erpProductCategoryMapper.selectById(parentId); |
| 96 | if (parentCategory == null) { | 96 | if (parentCategory == null) { |
| 97 | throw exception(PRODUCT_CATEGORY_PARENT_NOT_EXITS); | 97 | throw exception(PRODUCT_CATEGORY_PARENT_NOT_EXITS); |
| 98 | } | 98 | } |
| @@ -110,7 +110,7 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService | @@ -110,7 +110,7 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService | ||
| 110 | if (parentId == null || ErpProductCategoryDO.PARENT_ID_ROOT.equals(parentId)) { | 110 | if (parentId == null || ErpProductCategoryDO.PARENT_ID_ROOT.equals(parentId)) { |
| 111 | break; | 111 | break; |
| 112 | } | 112 | } |
| 113 | - parentCategory = productCategoryMapper.selectById(parentId); | 113 | + parentCategory = erpProductCategoryMapper.selectById(parentId); |
| 114 | if (parentCategory == null) { | 114 | if (parentCategory == null) { |
| 115 | break; | 115 | break; |
| 116 | } | 116 | } |
| @@ -118,7 +118,7 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService | @@ -118,7 +118,7 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService | ||
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | private void validateProductCategoryNameUnique(Long id, Long parentId, String name) { | 120 | private void validateProductCategoryNameUnique(Long id, Long parentId, String name) { |
| 121 | - ErpProductCategoryDO productCategory = productCategoryMapper.selectByParentIdAndName(parentId, name); | 121 | + ErpProductCategoryDO productCategory = erpProductCategoryMapper.selectByParentIdAndName(parentId, name); |
| 122 | if (productCategory == null) { | 122 | if (productCategory == null) { |
| 123 | return; | 123 | return; |
| 124 | } | 124 | } |
| @@ -133,17 +133,17 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService | @@ -133,17 +133,17 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService | ||
| 133 | 133 | ||
| 134 | @Override | 134 | @Override |
| 135 | public ErpProductCategoryDO getProductCategory(Long id) { | 135 | public ErpProductCategoryDO getProductCategory(Long id) { |
| 136 | - return productCategoryMapper.selectById(id); | 136 | + return erpProductCategoryMapper.selectById(id); |
| 137 | } | 137 | } |
| 138 | 138 | ||
| 139 | @Override | 139 | @Override |
| 140 | public List<ErpProductCategoryDO> getProductCategoryList(ErpProductCategoryListReqVO listReqVO) { | 140 | public List<ErpProductCategoryDO> getProductCategoryList(ErpProductCategoryListReqVO listReqVO) { |
| 141 | - return productCategoryMapper.selectList(listReqVO); | 141 | + return erpProductCategoryMapper.selectList(listReqVO); |
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | @Override | 144 | @Override |
| 145 | public List<ErpProductCategoryDO> getProductCategoryList(Collection<Long> ids) { | 145 | public List<ErpProductCategoryDO> getProductCategoryList(Collection<Long> ids) { |
| 146 | - return productCategoryMapper.selectBatchIds(ids); | 146 | + return erpProductCategoryMapper.selectBatchIds(ids); |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | } | 149 | } |
| 150 | \ No newline at end of file | 150 | \ No newline at end of file |