Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-module-system
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-module-system
Commits
09c94290
提交
09c94290
authored
8月 07, 2025
作者:
000516
浏览文件
操作
浏览文件
下载
差异文件
添加获取系统人员nick_name方法
上级
1c14cfa5
b27b4a41
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
17 行增加
和
24 行删除
+17
-24
pom.xml
pom.xml
+4
-4
SysDeptController.java
...va/com/sfa/system/controller/query/SysDeptController.java
+3
-1
SysDeptDaoImpl.java
...n/java/com/sfa/system/domain/dao/impl/SysDeptDaoImpl.java
+3
-1
bootstrap-dev.yml
src/main/resources/bootstrap-dev.yml
+2
-2
bootstrap-live.yml
src/main/resources/bootstrap-live.yml
+0
-15
SysDeptMapper.xml
src/main/resources/mapper/system/SysDeptMapper.xml
+5
-1
没有找到文件。
pom.xml
浏览文件 @
09c94290
...
...
@@ -43,11 +43,11 @@
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
</dependency>
<!-- Mysql Connector -->
<dependency>
<groupId>
com.mysql
</groupId>
<artifactId>
mysql-connector-j
</artifactId>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<scope>
runtime
</scope>
<!-- 确保运行时可用 -->
</dependency>
<!-- RuoYi Common DataSource -->
...
...
src/main/java/com/sfa/system/controller/query/SysDeptController.java
浏览文件 @
09c94290
...
...
@@ -81,7 +81,9 @@ public class SysDeptController extends BaseController
{
return
error
(
"新增部门'"
+
dept
.
getDeptName
()
+
"'失败,部门名称已存在"
);
}
dept
.
setCreateBy
(
SecurityUtils
.
getUsername
());
dept
.
setCreateUserId
(
SecurityUtils
.
getUserId
());
dept
.
setCreateBy
(
SecurityUtils
.
getNickName
());
return
toAjax
(
deptDao
.
insertDept
(
dept
));
}
...
...
src/main/java/com/sfa/system/domain/dao/impl/SysDeptDaoImpl.java
浏览文件 @
09c94290
...
...
@@ -4,6 +4,8 @@ import java.util.ArrayList;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
com.sfa.common.core.enums.ECode
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.sfa.common.core.constant.UserConstants
;
...
...
@@ -215,7 +217,7 @@ public class SysDeptDaoImpl implements ISysDeptDao
// 如果父节点不为正常状态,则不允许新增子节点
if
(!
UserConstants
.
DEPT_NORMAL
.
equals
(
info
.
getStatus
()))
{
throw
new
ServiceException
(
"部门停用,不允许新增"
);
throw
new
ServiceException
(
ECode
.
DEPT_STOP_ERROR
);
}
dept
.
setAncestors
(
info
.
getAncestors
()
+
","
+
dept
.
getParentId
());
return
deptMapper
.
insertDept
(
dept
);
...
...
src/main/resources/bootstrap-dev.yml
浏览文件 @
09c94290
...
...
@@ -5,11 +5,11 @@ spring:
cloud
:
nacos
:
discovery
:
server-addr
:
1
27.0.0.1
:8848
server-addr
:
1
92.168.100.38
:8848
group
:
sfa
namespace
:
9fb64726-e415-43e4-9e79-9be8d2666671
config
:
server-addr
:
1
27.0.0.1
:8848
server-addr
:
1
92.168.100.38
:8848
file-extension
:
yaml
group
:
sfa
namespace
:
9fb64726-e415-43e4-9e79-9be8d2666671
src/main/resources/bootstrap-live.yml
deleted
100644 → 0
浏览文件 @
1c14cfa5
spring
:
application
:
name
:
wangxiaolu-sfa-system
cloud
:
nacos
:
discovery
:
server-addr
:
192.168.100.38:8848
group
:
sfa
namespace
:
5ae12140-31d8-490a-9798-f923cb0e30d4
config
:
server-addr
:
192.168.100.38:8848
file-extension
:
yaml
group
:
sfa
namespace
:
5ae12140-31d8-490a-9798-f923cb0e30d4
src/main/resources/mapper/system/SysDeptMapper.xml
浏览文件 @
09c94290
...
...
@@ -114,7 +114,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert
id=
"insertDept"
parameterType=
"com.sfa.system.api.domain.SysDept"
>
insert into sys_dept(
<if
test=
"deptId != null and deptId != 0"
>
dept_id,
</if>
<if
test=
"parentId != null and parentId != 0"
>
parent_id,
</if>
<if
test=
"deptCode != null"
>
dept_code,
</if>
<if
test=
"parentId != null and parentId != 0"
>
parent_id,
</if>
<if
test=
"deptName != null and deptName != ''"
>
dept_name,
</if>
<if
test=
"ancestors != null and ancestors != ''"
>
ancestors,
</if>
<if
test=
"orderNum != null"
>
order_num,
</if>
...
...
@@ -123,9 +124,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"email != null and email != ''"
>
email,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"createBy != null and createBy != ''"
>
create_by,
</if>
<if
test=
"createUserId != null and createUserId != ''"
>
create_user_id,
</if>
create_time
)values(
<if
test=
"deptId != null and deptId != 0"
>
#{deptId},
</if>
<if
test=
"deptCode != null"
>
#{deptCode},
</if>
<if
test=
"parentId != null and parentId != 0"
>
#{parentId},
</if>
<if
test=
"deptName != null and deptName != ''"
>
#{deptName},
</if>
<if
test=
"ancestors != null and ancestors != ''"
>
#{ancestors},
</if>
...
...
@@ -135,6 +138,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"email != null and email != ''"
>
#{email},
</if>
<if
test=
"status != null"
>
#{status},
</if>
<if
test=
"createBy != null and createBy != ''"
>
#{createBy},
</if>
<if
test=
"createUserId != null and createUserId != ''"
>
#{createUserId},
</if>
sysdate()
)
</insert>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论