merge build-error into dev

回退pom.xml 且 用户导入多部门分隔符变更 : -> /

Created-by: kiki1373639299
Commit-by: kiki1373639299
Merged-by: Charles_7c
Description: <!--
  非常感谢您的 PR!在提交之前,请务必确保您 PR 的代码经过了完整测试,并且通过了代码规范检查。
-->

<!-- 在 [] 中输入 x 来勾选) -->

## PR 类型

<!-- 您的 PR 引入了哪种类型的变更? -->
<!-- 只支持选择一种类型,如果有多种类型,可以在更新日志中增加 “类型” 列。 -->

- [ ] 新 feature
- [ ] Bug 修复
- [ ] 功能增强
- [ ] 文档变更
- [ ] 代码样式变更
- [ ] 重构
- [ ] 性能改进
- [ ] 单元测试
- [ ] CI/CD
- [ ] 其他

## PR 目的

<!-- 描述一下您的 PR 解决了什么问题。如果可以,请链接到相关 issues。 -->

## 解决方案

<!-- 详细描述您是如何解决的问题 -->

## PR 测试

<!-- 如果可以,请为您的 PR 添加或更新单元测试。 -->
<!-- 请描述一下您是如何测试 PR 的。例如:创建/更新单元测试或添加相关的截图。 -->

## Changelog

| 模块  | Changelog | Related issues |
|-----|-----------| -------------- |
|     |           |                |

<!-- 如果有多种类型的变更,可以在变更日志表中增加 “类型” 列,该列的值与上方 “PR 类型” 相同。 -->
<!-- Related issues 格式为 Closes #<issue号>,或者 Fixes #<issue号>,或者 Resolves #<issue号>。 -->

## 其他信息

<!-- 请描述一下还有哪些注意事项。例如:如果引入了一个不向下兼容的变更,请描述其影响。 -->

## 提交前确认

- [X] PR 代码经过了完整测试,并且通过了代码规范检查
- [ ] 已经完整填写 Changelog,并链接到了相关 issues
- [X] PR 代码将要提交到 dev 分支

See merge request: continew/continew-admin!14
This commit is contained in:
2025-09-23 15:49:11 +08:00
3 changed files with 6 additions and 14 deletions

View File

@@ -24,8 +24,6 @@ import cn.hutool.core.io.resource.ResourceUtil;
import cn.hutool.core.lang.UUID; import cn.hutool.core.lang.UUID;
import cn.hutool.core.map.MapUtil; import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.CharsetUtil; import cn.hutool.core.util.CharsetUtil;
import java.util.HashMap;
import java.util.Map;
import cn.hutool.core.util.EnumUtil; import cn.hutool.core.util.EnumUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
@@ -790,10 +788,10 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, UserDO, UserRes
* <p> * <p>
* 支持两种格式: * 支持两种格式:
* <ul> * <ul>
* <li>多级部门公司A:研发部:前端组</li> * <li>多级部门公司A/研发部/前端组</li>
* <li>单级部门:研发部</li> * <li>单级部门:研发部</li>
* </ul> * </ul>
* 使用冒号(:)作为层级分隔符,会逐级查找对应的部门 * 使用左斜杠/作为层级分隔符,会逐级查找对应的部门
* </p> * </p>
* *
* @param deptPath 部门路径 * @param deptPath 部门路径
@@ -801,9 +799,9 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, UserDO, UserRes
*/ */
private DeptDO findDeptByHierarchicalPath(String deptPath) { private DeptDO findDeptByHierarchicalPath(String deptPath) {
CheckUtils.throwIfBlank(deptPath, "部门路径不能为空"); CheckUtils.throwIfBlank(deptPath, "部门路径不能为空");
return deptPath.contains(StringConstants.SLASH)
// 根据是否包含冒号选择处理方式 ? findMultiLevelDept(deptPath)
return deptPath.contains(":") ? findMultiLevelDept(deptPath) : findSingleLevelDept(deptPath.trim()); : findSingleLevelDept(deptPath.trim());
} }
/** /**
@@ -816,7 +814,7 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, UserDO, UserRes
* @return 部门信息未找到时返回null * @return 部门信息未找到时返回null
*/ */
private DeptDO findMultiLevelDept(String deptPath) { private DeptDO findMultiLevelDept(String deptPath) {
String[] pathParts = deptPath.split(":"); String[] pathParts = deptPath.split(StringConstants.SLASH);
CheckUtils.throwIf(pathParts.length == 0, "部门路径格式错误:{}", deptPath); CheckUtils.throwIf(pathParts.length == 0, "部门路径格式错误:{}", deptPath);
// 从根部门开始逐级查找 // 从根部门开始逐级查找

View File

@@ -114,12 +114,6 @@
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<configuration> <configuration>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</path>
</annotationProcessorPaths>
<compilerArgument>-parameters</compilerArgument> <compilerArgument>-parameters</compilerArgument>
</configuration> </configuration>
</plugin> </plugin>