Browse Source

Merge branch 'master-jdk21' of https://gitee.com/zhijiantianya/ruoyi-vue-pro

YunaiV 1 year ago
parent
commit
123a009394

+ 24 - 0
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");
+    }
+
+}

+ 4 - 0
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;

+ 2 - 2
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<AdminUserRespDTO> getUserListBySubordinate(Long userId);
+    List<AdminUserRespDTO> getUserListBySubordinate(Long id);
 
     /**
      * 通过用户 ID 查询用户们

+ 4 - 4
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<AdminUserRespDTO> getUserListBySubordinate(Long userId) {
+    public List<AdminUserRespDTO> 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<AdminUserDO> 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);
     }