From 169c1e4907904815101533e5be32f0189c0446d3 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 17 Feb 2024 21:40:50 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E2=9C=A8=202.0.1=20=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E5=87=86=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/config/ErpWebConfiguration.java | 2 +- .../ErpProductCategoryServiceImpl.java | 24 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/framework/web/config/ErpWebConfiguration.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/framework/web/config/ErpWebConfiguration.java index f87e04047..4a2bc7fa3 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/framework/web/config/ErpWebConfiguration.java +++ b/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 { * erp 模块的 API 分组 */ @Bean - public GroupedOpenApi tradeGroupedOpenApi() { + public GroupedOpenApi erpGroupedOpenApi() { return YudaoSwaggerAutoConfiguration.buildGroupedOpenApi("erp"); } diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/product/ErpProductCategoryServiceImpl.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/product/ErpProductCategoryServiceImpl.java index bad19a0ee..bd045aced 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/product/ErpProductCategoryServiceImpl.java +++ b/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.*; public class ErpProductCategoryServiceImpl implements ErpProductCategoryService { @Resource - private ErpProductCategoryMapper productCategoryMapper; + private ErpProductCategoryMapper erpProductCategoryMapper; @Resource @Lazy // 延迟加载,避免循环依赖 @@ -42,7 +42,7 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService // 插入 ErpProductCategoryDO category = BeanUtils.toBean(createReqVO, ErpProductCategoryDO.class); - productCategoryMapper.insert(category); + erpProductCategoryMapper.insert(category); // 返回 return category.getId(); } @@ -58,7 +58,7 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService // 更新 ErpProductCategoryDO updateObj = BeanUtils.toBean(updateReqVO, ErpProductCategoryDO.class); - productCategoryMapper.updateById(updateObj); + erpProductCategoryMapper.updateById(updateObj); } @Override @@ -66,7 +66,7 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService // 1.1 校验存在 validateProductCategoryExists(id); // 1.2 校验是否有子产品分类 - if (productCategoryMapper.selectCountByParentId(id) > 0) { + if (erpProductCategoryMapper.selectCountByParentId(id) > 0) { throw exception(PRODUCT_CATEGORY_EXITS_CHILDREN); } // 1.3 校验是否有产品 @@ -74,11 +74,11 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService throw exception(PRODUCT_CATEGORY_EXITS_PRODUCT); } // 2. 删除 - productCategoryMapper.deleteById(id); + erpProductCategoryMapper.deleteById(id); } private void validateProductCategoryExists(Long id) { - if (productCategoryMapper.selectById(id) == null) { + if (erpProductCategoryMapper.selectById(id) == null) { throw exception(PRODUCT_CATEGORY_NOT_EXISTS); } } @@ -92,7 +92,7 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService throw exception(PRODUCT_CATEGORY_PARENT_ERROR); } // 2. 父产品分类不存在 - ErpProductCategoryDO parentCategory = productCategoryMapper.selectById(parentId); + ErpProductCategoryDO parentCategory = erpProductCategoryMapper.selectById(parentId); if (parentCategory == null) { throw exception(PRODUCT_CATEGORY_PARENT_NOT_EXITS); } @@ -110,7 +110,7 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService if (parentId == null || ErpProductCategoryDO.PARENT_ID_ROOT.equals(parentId)) { break; } - parentCategory = productCategoryMapper.selectById(parentId); + parentCategory = erpProductCategoryMapper.selectById(parentId); if (parentCategory == null) { break; } @@ -118,7 +118,7 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService } private void validateProductCategoryNameUnique(Long id, Long parentId, String name) { - ErpProductCategoryDO productCategory = productCategoryMapper.selectByParentIdAndName(parentId, name); + ErpProductCategoryDO productCategory = erpProductCategoryMapper.selectByParentIdAndName(parentId, name); if (productCategory == null) { return; } @@ -133,17 +133,17 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService @Override public ErpProductCategoryDO getProductCategory(Long id) { - return productCategoryMapper.selectById(id); + return erpProductCategoryMapper.selectById(id); } @Override public List getProductCategoryList(ErpProductCategoryListReqVO listReqVO) { - return productCategoryMapper.selectList(listReqVO); + return erpProductCategoryMapper.selectList(listReqVO); } @Override public List getProductCategoryList(Collection ids) { - return productCategoryMapper.selectBatchIds(ids); + return erpProductCategoryMapper.selectBatchIds(ids); } } \ No newline at end of file From 3b2200ad8062d6563d25e85c83dc974438d62cb0 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 17 Feb 2024 23:26:50 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E2=9C=A8=202.0.1=20=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E5=87=86=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/system/api/user/AdminUserApi.java | 4 ++-- .../yudao/module/system/api/user/AdminUserApiImpl.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApi.java index cea3c3663..507fb4b3e 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApi.java @@ -26,10 +26,10 @@ public interface AdminUserApi { /** * 通过用户 ID 查询用户下属 * - * @param userId 用户编号 + * @param id 用户编号 * @return 用户下属用户列表 */ - List getUserListBySubordinate(Long userId); + List getUserListBySubordinate(Long id); /** * 通过用户 ID 查询用户们 diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApiImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApiImpl.java index 3fce326fe..ff4fd12cc 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApiImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApiImpl.java @@ -38,9 +38,9 @@ public class AdminUserApiImpl implements AdminUserApi { } @Override - public List getUserListBySubordinate(Long userId) { + public List getUserListBySubordinate(Long id) { // 1.1 获取用户负责的部门 - AdminUserDO user = userService.getUser(userId); + AdminUserDO user = userService.getUser(id); if (user == null) { return Collections.emptyList(); } @@ -49,7 +49,7 @@ public class AdminUserApiImpl implements AdminUserApi { if (dept == null) { return Collections.emptyList(); } - if (ObjUtil.notEqual(dept.getLeaderUserId(), userId)) { // 校验为负责人 + if (ObjUtil.notEqual(dept.getLeaderUserId(), id)) { // 校验为负责人 return Collections.emptyList(); } deptIds.add(dept.getId()); @@ -61,7 +61,7 @@ public class AdminUserApiImpl implements AdminUserApi { // 2. 获取部门对应的用户信息 List users = userService.getUserListByDeptIds(deptIds); - users.removeIf(item -> ObjUtil.equal(item.getId(), userId)); // 排除自己 + users.removeIf(item -> ObjUtil.equal(item.getId(), id)); // 排除自己 return BeanUtils.toBean(users, AdminUserRespDTO.class); } From 21452af780007b0d3982e09c304b7f88c3b39633 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 17 Feb 2024 23:44:23 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E2=9C=A8=202.0.1=20=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E5=87=86=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/config/CrmWebConfiguration.java | 24 +++++++++++++++++++ .../crm/framework/web/package-info.java | 4 ++++ 2 files changed, 28 insertions(+) create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/web/config/CrmWebConfiguration.java create mode 100644 yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/web/package-info.java diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/web/config/CrmWebConfiguration.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/web/config/CrmWebConfiguration.java new file mode 100644 index 000000000..5b68d8e2e --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/web/config/CrmWebConfiguration.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.module.crm.framework.web.config; + +import cn.iocoder.yudao.framework.swagger.config.YudaoSwaggerAutoConfiguration; +import org.springdoc.core.models.GroupedOpenApi; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * crm 模块的 web 组件的 Configuration + * + * @author 芋道源码 + */ +@Configuration(proxyBeanMethods = false) +public class CrmWebConfiguration { + + /** + * crm 模块的 API 分组 + */ + @Bean + public GroupedOpenApi crmGroupedOpenApi() { + return YudaoSwaggerAutoConfiguration.buildGroupedOpenApi("crm"); + } + +} diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/web/package-info.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/web/package-info.java new file mode 100644 index 000000000..e18c3cdb5 --- /dev/null +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/framework/web/package-info.java @@ -0,0 +1,4 @@ +/** + * trade 模块的 web 配置 + */ +package cn.iocoder.yudao.module.crm.framework.web;