Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
notes2.0
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zjm
notes2.0
Commits
6ffd9ce5
提交
6ffd9ce5
authored
3月 06, 2020
作者:
gongwenjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
代码修改
上级
67fbc28e
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
4 行增加
和
8 行删除
+4
-8
Department.java
...src/main/java/com/zjty/tynotes/pas/entity/Department.java
+0
-1
PageResponse.java
...ain/java/com/zjty/tynotes/pas/entity/vo/PageResponse.java
+0
-7
DepartmentServiceImpl.java
.../zjty/tynotes/pas/service/impl/DepartmentServiceImpl.java
+3
-0
RoleServiceImpl.java
...va/com/zjty/tynotes/pas/service/impl/RoleServiceImpl.java
+1
-0
没有找到文件。
notes-pas/src/main/java/com/zjty/tynotes/pas/entity/Department.java
浏览文件 @
6ffd9ce5
...
...
@@ -29,7 +29,6 @@ public class Department {
@NotNull
(
message
=
"部门名称不可为空"
)
String
name
;
@ApiModelProperty
(
value
=
"部门等级"
,
example
=
"1"
)
@NotNull
(
message
=
"部门等级不可为空"
)
String
level
;
@ApiModelProperty
(
value
=
"部门描述"
,
example
=
"1"
)
...
...
notes-pas/src/main/java/com/zjty/tynotes/pas/entity/vo/PageResponse.java
浏览文件 @
6ffd9ce5
...
...
@@ -38,13 +38,6 @@ public class PageResponse<T> implements Serializable {
*/
private
List
<
T
>
rows
;
public
void
setTotalCount
(
int
totalCount
)
{
//设置了totalCount就可以计算出总totalPage
this
.
totalCount
=
totalCount
;
int
countRecords
=
this
.
getTotalCount
();
int
totalPages
=
countRecords
%
pageSize
==
0
?
countRecords
/
pageSize
:
(
countRecords
/
pageSize
+
1
);
setTotalPage
(
totalPages
);
}
/**
* 设置结果 及总页数
...
...
notes-pas/src/main/java/com/zjty/tynotes/pas/service/impl/DepartmentServiceImpl.java
浏览文件 @
6ffd9ce5
...
...
@@ -38,6 +38,9 @@ public class DepartmentServiceImpl implements IDepartmentService {
@Override
public
Department
addDepartments
(
Department
department
)
{
if
(
department
.
getLevel
()!=
null
&&
department
.
getLevel
().
equals
(
"1"
)){
return
departmentDao
.
save
(
department
);
}
Optional
<
Department
>
optional
=
departmentDao
.
findById
(
department
.
getParentId
());
if
(
optional
.
isPresent
()){
Department
department1
=
optional
.
get
();
...
...
notes-pas/src/main/java/com/zjty/tynotes/pas/service/impl/RoleServiceImpl.java
浏览文件 @
6ffd9ce5
...
...
@@ -98,6 +98,7 @@ public class RoleServiceImpl implements IRoleService {
try
{
userRoleDao
.
deleteAllByRoleId
(
id
);
roleAuthorityDao
.
deleteAllByRoleId
(
id
);
roleDao
.
deleteById
(
id
);
return
true
;
}
catch
(
Exception
e
)
{
logger
.
error
(
"mongodb删除角色时出错"
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论