Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
site-project
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hqzhdj
site-project
Commits
3579affe
Commit
3579affe
authored
Nov 12, 2025
by
wangxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息数量接口
parent
e0229eb9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
5 deletions
+35
-5
cloud-site-api/src/main/java/com/yizhi/site/application/feign/api/SystemMailboxClients.java
+5
-1
cloud-site-service/src/main/java/com/yizhi/site/application/controller/api/SystemMailboxController.java
+13
-1
cloud-site-service/src/main/java/com/yizhi/site/application/service/SystemMailboxService.java
+4
-2
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/SystemMailboxServiceImpl.java
+13
-1
No files found.
cloud-site-api/src/main/java/com/yizhi/site/application/feign/api/SystemMailboxClients.java
View file @
3579affe
...
...
@@ -33,4 +33,7 @@ public interface SystemMailboxClients {
@GetMapping
(
"/systemMailbox/selectMyPage"
)
Page
<
SystemMailboxParamVo
>
selectMyPage
(
@RequestParam
(
"pageNo"
)
Integer
pageNo
,
@RequestParam
(
"pageSize"
)
Integer
pageSize
,
@RequestParam
(
"type"
)
Integer
type
);
}
@GetMapping
(
"/systemMailbox/hasPermission"
)
Boolean
hasPermission
();
}
\ No newline at end of file
cloud-site-service/src/main/java/com/yizhi/site/application/controller/api/SystemMailboxController.java
View file @
3579affe
...
...
@@ -46,4 +46,15 @@ public class SystemMailboxController {
public
Page
<
SystemMailboxParamVo
>
selectMyPage
(
@RequestParam
(
"pageNo"
)
Integer
pageNo
,
@RequestParam
(
"pageSize"
)
Integer
pageSize
,
@RequestParam
(
"type"
)
Integer
type
){
return
systemMailboxService
.
selectMyPage
(
pageNo
,
pageSize
,
type
);
}
}
@GetMapping
(
"hasPermission"
)
public
Boolean
hasPermission
(){
Page
<
SystemMailboxParamVo
>
page
=
systemMailboxService
.
selectMyPage
(
1
,
1
,
2
);
// 如果能正常获取到数据且total大于0,说明用户有权限
if
(
page
!=
null
&&
page
.
getTotal
()
>
0
)
{
return
true
;
}
// 如果total为0,说明用户没有权限查看信箱
return
false
;
}
}
\ No newline at end of file
cloud-site-service/src/main/java/com/yizhi/site/application/service/SystemMailboxService.java
View file @
3579affe
...
...
@@ -24,5 +24,6 @@ public interface SystemMailboxService extends IService<SystemMailbox> {
Boolean
removeById
(
Long
id
);
Page
<
SystemMailboxParamVo
>
selectMyPage
(
Integer
pageNo
,
Integer
pageSize
,
Integer
type
);
}
Boolean
hasPermission
();
}
\ No newline at end of file
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/SystemMailboxServiceImpl.java
View file @
3579affe
...
...
@@ -166,4 +166,15 @@ public class SystemMailboxServiceImpl extends ServiceImpl<SystemMailboxMapper,Sy
page
.
setRecords
(
this
.
baseMapper
.
selectMyPage
(
accountId
,
roleType
,
type
,
pageNo
,
pageSize
));
return
page
;
}
}
@Override
public
Boolean
hasPermission
()
{
Page
<
SystemMailboxParamVo
>
page
=
selectMyPage
(
1
,
1
,
2
);
// 如果能正常获取到数据且total大于0,说明用户有权限
if
(
page
!=
null
&&
page
.
getTotal
()
>
0
)
{
return
true
;
}
// 如果total为0,说明用户没有权限查看信箱
return
false
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment