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
3d97869b
Commit
3d97869b
authored
May 09, 2025
by
梅存智
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的信箱和我的诉求优化
parent
0073cb7c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
20 deletions
+35
-20
cloud-site-api/src/main/java/com/yizhi/site/application/feign/api/SystemMailboxClients.java
+1
-1
cloud-site-service/src/main/java/com/yizhi/site/application/controller/api/SystemMailboxController.java
+2
-2
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/SystemMailboxMapper.java
+2
-2
cloud-site-service/src/main/java/com/yizhi/site/application/service/SystemMailboxService.java
+1
-1
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/SystemMailboxServiceImpl.java
+6
-6
cloud-site-service/src/main/resources/mapper/SystemMailboxMapper.xml
+23
-8
No files found.
cloud-site-api/src/main/java/com/yizhi/site/application/feign/api/SystemMailboxClients.java
View file @
3d97869b
...
@@ -32,5 +32,5 @@ public interface SystemMailboxClients {
...
@@ -32,5 +32,5 @@ public interface SystemMailboxClients {
Boolean
removeById
(
@RequestParam
(
"id"
)
Long
id
);
Boolean
removeById
(
@RequestParam
(
"id"
)
Long
id
);
@GetMapping
(
"/systemMailbox/selectMyPage"
)
@GetMapping
(
"/systemMailbox/selectMyPage"
)
Page
<
SystemMailboxParamVo
>
selectMyPage
(
@RequestParam
(
"pageNo"
)
Integer
pageNo
,
@RequestParam
(
"pageSize"
)
Integer
pageSize
);
Page
<
SystemMailboxParamVo
>
selectMyPage
(
@RequestParam
(
"pageNo"
)
Integer
pageNo
,
@RequestParam
(
"pageSize"
)
Integer
pageSize
,
@RequestParam
(
"type"
)
Integer
type
);
}
}
cloud-site-service/src/main/java/com/yizhi/site/application/controller/api/SystemMailboxController.java
View file @
3d97869b
...
@@ -43,7 +43,7 @@ public class SystemMailboxController {
...
@@ -43,7 +43,7 @@ public class SystemMailboxController {
}
}
@GetMapping
(
"selectMyPage"
)
@GetMapping
(
"selectMyPage"
)
public
Page
<
SystemMailboxParamVo
>
selectMyPage
(
@RequestParam
(
"pageNo"
)
Integer
pageNo
,
@RequestParam
(
"pageSize"
)
Integer
pageSize
){
public
Page
<
SystemMailboxParamVo
>
selectMyPage
(
@RequestParam
(
"pageNo"
)
Integer
pageNo
,
@RequestParam
(
"pageSize"
)
Integer
pageSize
,
@RequestParam
(
"type"
)
Integer
type
){
return
systemMailboxService
.
selectMyPage
(
pageNo
,
pageSize
);
return
systemMailboxService
.
selectMyPage
(
pageNo
,
pageSize
,
type
);
}
}
}
}
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/SystemMailboxMapper.java
View file @
3d97869b
...
@@ -15,8 +15,8 @@ import java.util.List;
...
@@ -15,8 +15,8 @@ import java.util.List;
*/
*/
public
interface
SystemMailboxMapper
extends
BaseMapper
<
SystemMailbox
>
{
public
interface
SystemMailboxMapper
extends
BaseMapper
<
SystemMailbox
>
{
List
<
SystemMailboxParamVo
>
selectMyPage
(
@Param
(
"accountId"
)
Long
accountId
,
@Param
(
"type"
)
Integer
type
,
@Param
(
"pageNo"
)
Integer
pageNo
,
@Param
(
"pageSize"
)
Integer
pageSize
);
List
<
SystemMailboxParamVo
>
selectMyPage
(
@Param
(
"accountId"
)
Long
accountId
,
@Param
(
"
roleType"
)
Integer
roleType
,
@Param
(
"
type"
)
Integer
type
,
@Param
(
"pageNo"
)
Integer
pageNo
,
@Param
(
"pageSize"
)
Integer
pageSize
);
int
selectMyCount
(
@Param
(
"accountId"
)
Long
accountId
,
@Param
(
"type"
)
Integer
type
);
int
selectMyCount
(
@Param
(
"accountId"
)
Long
accountId
,
@Param
(
"
roleType"
)
Integer
roleType
,
@Param
(
"
type"
)
Integer
type
);
}
}
cloud-site-service/src/main/java/com/yizhi/site/application/service/SystemMailboxService.java
View file @
3d97869b
...
@@ -23,6 +23,6 @@ public interface SystemMailboxService extends IService<SystemMailbox> {
...
@@ -23,6 +23,6 @@ public interface SystemMailboxService extends IService<SystemMailbox> {
Boolean
removeById
(
Long
id
);
Boolean
removeById
(
Long
id
);
Page
<
SystemMailboxParamVo
>
selectMyPage
(
Integer
pageNo
,
Integer
pageSize
);
Page
<
SystemMailboxParamVo
>
selectMyPage
(
Integer
pageNo
,
Integer
pageSize
,
Integer
type
);
}
}
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/SystemMailboxServiceImpl.java
View file @
3d97869b
...
@@ -147,23 +147,23 @@ public class SystemMailboxServiceImpl extends ServiceImpl<SystemMailboxMapper,Sy
...
@@ -147,23 +147,23 @@ public class SystemMailboxServiceImpl extends ServiceImpl<SystemMailboxMapper,Sy
}
}
@Override
@Override
public
Page
<
SystemMailboxParamVo
>
selectMyPage
(
Integer
pageNo
,
Integer
pageSize
){
public
Page
<
SystemMailboxParamVo
>
selectMyPage
(
Integer
pageNo
,
Integer
pageSize
,
Integer
type
){
pageNo
=
pageSize
*
(
pageNo
-
1
);
pageNo
=
pageSize
*
(
pageNo
-
1
);
Long
accountId
=
ContextHolder
.
get
().
getAccountId
();
Long
accountId
=
ContextHolder
.
get
().
getAccountId
();
List
<
Long
>
roleIds
=
myItemConfigmapper
.
getJjXxRoleCount
(
accountId
);
List
<
Long
>
roleIds
=
myItemConfigmapper
.
getJjXxRoleCount
(
accountId
);
Integer
t
ype
=
null
;
//信箱类型 1: 纪检 2: 书记,null没权限看 纪检和书记,只能看自己的
Integer
roleT
ype
=
null
;
//信箱类型 1: 纪检 2: 书记,null没权限看 纪检和书记,只能看自己的
if
(
CollectionUtil
.
isNotEmpty
(
roleIds
)){
if
(
CollectionUtil
.
isNotEmpty
(
roleIds
)){
if
(
roleIds
.
contains
(
1877604582759526400L
)&&!
roleIds
.
contains
(
1877605828904022016L
)){
if
(
roleIds
.
contains
(
1877604582759526400L
)&&!
roleIds
.
contains
(
1877605828904022016L
)){
t
ype
=
2
;
roleT
ype
=
2
;
}
}
if
(!
roleIds
.
contains
(
1877604582759526400L
)&&
roleIds
.
contains
(
1877605828904022016L
)){
if
(!
roleIds
.
contains
(
1877604582759526400L
)&&
roleIds
.
contains
(
1877605828904022016L
)){
t
ype
=
1
;
roleT
ype
=
1
;
}
}
}
}
Page
<
SystemMailboxParamVo
>
page
=
new
Page
<>(
pageNo
,
pageSize
);
Page
<
SystemMailboxParamVo
>
page
=
new
Page
<>(
pageNo
,
pageSize
);
page
.
setTotal
(
this
.
baseMapper
.
selectMyCount
(
accountId
,
type
));
page
.
setTotal
(
this
.
baseMapper
.
selectMyCount
(
accountId
,
roleType
,
type
));
page
.
setRecords
(
this
.
baseMapper
.
selectMyPage
(
accountId
,
type
,
pageNo
,
pageSize
));
page
.
setRecords
(
this
.
baseMapper
.
selectMyPage
(
accountId
,
roleType
,
type
,
pageNo
,
pageSize
));
return
page
;
return
page
;
}
}
}
}
cloud-site-service/src/main/resources/mapper/SystemMailboxMapper.xml
View file @
3d97869b
...
@@ -18,12 +18,18 @@
...
@@ -18,12 +18,18 @@
system_mailbox
system_mailbox
where
where
deleted = 0
deleted = 0
<if
test=
"type != null"
>
<if
test=
"type == 2"
>
and type=#{type}
<if
test=
"roleType != null"
>
</if>
and type=#{roleType} and create_by_id != #{accountId}
<if
test=
"type == null"
>
</if>
<if
test=
"roleType == null"
>
and create_by_id = #{accountId}
</if>
</if>
<if
test=
"type == 1"
>
and create_by_id = #{accountId}
and create_by_id = #{accountId}
</if>
</if>
<if
test=
"type == 1"
>
union all
union all
select
select
id,
id,
...
@@ -35,6 +41,7 @@
...
@@ -35,6 +41,7 @@
where
where
deleted = 0
deleted = 0
and create_by_id = #{accountId}
and create_by_id = #{accountId}
</if>
) a
) a
order by a.submit_time desc
order by a.submit_time desc
LIMIT #{pageNo}, #{pageSize}
LIMIT #{pageNo}, #{pageSize}
...
@@ -52,12 +59,18 @@
...
@@ -52,12 +59,18 @@
system_mailbox
system_mailbox
where
where
deleted = 0
deleted = 0
<if
test=
"type != null"
>
<if
test=
"type == 2"
>
and type=#{type}
<if
test=
"roleType != null"
>
</if>
and type=#{roleType} and create_by_id != #{accountId}
<if
test=
"type == null"
>
</if>
<if
test=
"roleType == null"
>
and create_by_id = #{accountId}
</if>
</if>
<if
test=
"type == 1"
>
and create_by_id = #{accountId}
and create_by_id = #{accountId}
</if>
</if>
<if
test=
"type == 1"
>
union all
union all
select
select
id,
id,
...
@@ -69,6 +82,7 @@
...
@@ -69,6 +82,7 @@
where
where
deleted = 0
deleted = 0
and create_by_id = #{accountId}
and create_by_id = #{accountId}
</if>
) a
) a
</select>
</select>
</mapper>
</mapper>
\ 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