mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-10-19 20:57:21 +08:00
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:
Binary file not shown.
@@ -24,8 +24,6 @@ import cn.hutool.core.io.resource.ResourceUtil;
|
||||
import cn.hutool.core.lang.UUID;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
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.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -790,10 +788,10 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, UserDO, UserRes
|
||||
* <p>
|
||||
* 支持两种格式:
|
||||
* <ul>
|
||||
* <li>多级部门:公司A:研发部:前端组</li>
|
||||
* <li>多级部门:公司A/研发部/前端组</li>
|
||||
* <li>单级部门:研发部</li>
|
||||
* </ul>
|
||||
* 使用冒号(:)作为层级分隔符,会逐级查找对应的部门
|
||||
* 使用左斜杠/作为层级分隔符,会逐级查找对应的部门
|
||||
* </p>
|
||||
*
|
||||
* @param deptPath 部门路径
|
||||
@@ -801,9 +799,9 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, UserDO, UserRes
|
||||
*/
|
||||
private DeptDO findDeptByHierarchicalPath(String deptPath) {
|
||||
CheckUtils.throwIfBlank(deptPath, "部门路径不能为空");
|
||||
|
||||
// 根据是否包含冒号选择处理方式
|
||||
return deptPath.contains(":") ? findMultiLevelDept(deptPath) : findSingleLevelDept(deptPath.trim());
|
||||
return deptPath.contains(StringConstants.SLASH)
|
||||
? findMultiLevelDept(deptPath)
|
||||
: findSingleLevelDept(deptPath.trim());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -816,7 +814,7 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, UserDO, UserRes
|
||||
* @return 部门信息,未找到时返回null
|
||||
*/
|
||||
private DeptDO findMultiLevelDept(String deptPath) {
|
||||
String[] pathParts = deptPath.split(":");
|
||||
String[] pathParts = deptPath.split(StringConstants.SLASH);
|
||||
CheckUtils.throwIf(pathParts.length == 0, "部门路径格式错误:{}", deptPath);
|
||||
|
||||
// 从根部门开始逐级查找
|
||||
|
6
pom.xml
6
pom.xml
@@ -114,12 +114,6 @@
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
<compilerArgument>-parameters</compilerArgument>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
Reference in New Issue
Block a user