Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
email
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
陈天仲
email
Commits
aeb05cca
Commit
aeb05cca
authored
Sep 11, 2023
by
chentianzhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索邮件
parent
4ced4205
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
101 additions
and
94 deletions
+101
-94
src/main/java/com/zq/email/enums/EmailFolderEnum.java
+1
-1
src/main/java/com/zq/email/service/impl/EmailPersonServiceImpl.java
+0
-0
src/main/java/com/zq/email/vo/EmailSearchReqVo.java
+0
-2
src/main/resources/mapper/EmailFolderMapper.xml
+1
-0
src/main/resources/mapper/EmailPersonMapper.xml
+99
-91
No files found.
src/main/java/com/zq/email/enums/EmailFolderEnum.java
View file @
aeb05cca
...
...
@@ -16,7 +16,7 @@ public enum EmailFolderEnum {
FOLDER_OUTBOX
(
3
,
"草稿箱"
),
FOLDER_ALREADY_SEND
(
4
,
"已发送"
),
FOLDER_ALREADY_DELETE
(
5
,
"回收站"
),
FOLDER_OTHER
(
6
,
"
邮箱(文件夹)
"
),
FOLDER_OTHER
(
6
,
"
我的文件夹
"
),
FOLDER_MANAGE
(
7
,
"邮件管理"
),
;
...
...
src/main/java/com/zq/email/service/impl/EmailPersonServiceImpl.java
View file @
aeb05cca
This diff is collapsed.
Click to expand it.
src/main/java/com/zq/email/vo/EmailSearchReqVo.java
View file @
aeb05cca
...
...
@@ -50,8 +50,6 @@ public class EmailSearchReqVo extends PageReqVo {
private
Integer
isPerson
;
@ApiModelProperty
(
"当前人员id :前端不用传"
)
private
Long
userId
;
@ApiModelProperty
(
"是否获取人员头像"
)
private
Boolean
isSenderPhoto
=
false
;
...
...
src/main/resources/mapper/EmailFolderMapper.xml
View file @
aeb05cca
...
...
@@ -2,4 +2,5 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zq.email.mapper.EmailFolderMapper"
>
</mapper>
src/main/resources/mapper/EmailPersonMapper.xml
View file @
aeb05cca
...
...
@@ -4,7 +4,7 @@
<select
id=
"selectSearchTotal"
resultType=
"integer"
parameterType=
"com.zq.email.vo.EmailSearchReqVo"
>
SELECT
COUNT(
1
)
COUNT(
EP."ID"
)
FROM
"EMAIL_PERSON" EP
<where>
...
...
@@ -36,19 +36,18 @@
AND EP."SEND_TIME"
<
= #{s.endTime}
</if>
<!-- 已发送,收件人 -->
<!-- <if test="s.receiveUserId != null">-->
<!-- AND EP."ID" IN(-->
<!-- SELECT-->
<!-- EP2."ID"-->
<!-- FROM-->
<!-- "EMAIL_PERSON" EP2-->
<!-- WHERE-->
<!-- EP2."PERSON_TYPE" = 2-->
<!-- AND EP2."IS_SEND" = 1-->
<!-- AND EP2."USER_ID" = #{s.receiveUserId}-->
<!-- )-->
<!-- </if>-->
<if
test=
"s.receiveUserId != null"
>
AND EP."EMAIL_CONTENT_ID" IN(
SELECT
EP2."EMAIL_CONTENT_ID"
FROM
"EMAIL_PERSON" EP2
WHERE
EP2."PERSON_TYPE" = 2
AND EP2."IS_SEND" = 1
AND EP2."USER_ID" = #{s.receiveUserId}
)
</if>
<!-- 其他文件夹,发件人、标题、内容 -->
<if
test=
"s.sendUserId != null or (s.title!=null and s.title!='') or (s.content!=null and s.content!='')"
>
...
...
@@ -84,92 +83,101 @@
)
</if>
</where>
GROUP BY EP.id
</select>
<select
id=
"selectSearchPage"
resultType=
"com.zq.email.entity.EmailPerson"
parameterType=
"com.zq.email.vo.EmailSearchReqVo"
>
SELECT
EP
.*
EP1
.*
FROM
"EMAIL_PERSON" EP
<where>
<if
test=
"s.folderId != null"
>
AND EP."FOLDER_ID" = #{s.folderId}
</if>
<if
test=
"s.isPerson != null"
>
AND EP."IS_PERSON" = #{s.isPerson}
</if>
<if
test=
"s.isSend != null"
>
AND EP."IS_SEND" = #{s.isSend}
</if>
<if
test=
"s.personType != null"
>
AND EP."PERSON_TYPE" = #{s.personType}
</if>
<if
test=
"s.userId != null"
>
AND EP."USER_ID" = #{s.userId}
</if>
<if
test=
"s.isRead != null"
>
AND EP."IS_READ" = #{s.isRead}
</if>
<if
test=
"s.startTime != null and s.endTime!=null "
>
AND EP."SEND_TIME"
>
= #{s.startTime}
AND EP."SEND_TIME"
<
= #{s.endTime}
</if>
<!-- 已发送,收件人 -->
<!-- <if test="s.receiveUserId != null">-->
<!-- AND EP."ID" IN(-->
<!-- SELECT-->
<!-- EP2."ID"-->
<!-- FROM-->
<!-- "EMAIL_PERSON" EP2-->
<!-- WHERE-->
<!-- EP2."PERSON_TYPE" = 2-->
<!-- AND EP2."IS_SEND" = 1-->
<!-- AND EP2."USER_ID" = #{s.receiveUserId}-->
<!-- )-->
<!-- </if>-->
<if
test=
"s.sendUserId != null or (s.title!=null and s.title!='') or (s.content!=null and s.content!='')"
>
AND EP."EMAIL_CONTENT_ID" IN(
SELECT
EC."ID"
FROM
"EMAIL_CONTENT" EC
<where>
<if
test=
"s.sendUserId != null"
>
AND EC."SEND_USER_ID" = #{s.sendUserId}
</if>
<if
test=
"s.title != null and s.title !='' "
>
AND EC."TITLE" LIKE concat('%', #{s.title}, '%')
</if>
<if
test=
"s.content != null and s.content !='' "
>
AND EC."CONTENT" LIKE concat('%', #{s.content}, '%')
</if>
</where>
)
</if>
<if
test=
"s.attachName!=null and s.attachName!=''"
>
AND EP."EMAIL_CONTENT_ID" IN(
"EMAIL_PERSON" EP1
WHERE
EP1."ID" IN
(
SELECT
EP."ID"
FROM
"EMAIL_PERSON" EP
<where>
<if
test=
"s.folderId != null"
>
AND EP."FOLDER_ID" = #{s.folderId}
</if>
<if
test=
"s.isPerson != null"
>
AND EP."IS_PERSON" = #{s.isPerson}
</if>
<if
test=
"s.isSend != null"
>
AND EP."IS_SEND" = #{s.isSend}
</if>
<if
test=
"s.personType != null"
>
AND EP."PERSON_TYPE" = #{s.personType}
</if>
<if
test=
"s.userId != null"
>
AND EP."USER_ID" = #{s.userId}
</if>
<if
test=
"s.isRead != null"
>
AND EP."IS_READ" = #{s.isRead}
</if>
<if
test=
"s.startTime != null and s.endTime!=null "
>
AND EP."SEND_TIME"
>
= #{s.startTime}
AND EP."SEND_TIME"
<
= #{s.endTime}
</if>
<if
test=
"s.receiveUserId != null"
>
AND EP."EMAIL_CONTENT_ID" IN(
SELECT
E
A
."EMAIL_CONTENT_ID"
E
P2
."EMAIL_CONTENT_ID"
FROM
"EMAIL_ATTACH" EA
"EMAIL_PERSON" EP2
WHERE
EA."ATTACH_NAME" LIKE concat('%', #{s.attachName}, '%')
)
</if>
</where>
ORDER BY EP."SEND_TIME" DESC
EP2."PERSON_TYPE" = 2
AND EP2."IS_SEND" = 1
AND EP2."USER_ID" = #{s.receiveUserId}
)
</if>
<if
test=
"s.sendUserId != null or (s.title!=null and s.title!='') or (s.content!=null and s.content!='')"
>
AND EP."EMAIL_CONTENT_ID" IN(
SELECT
EC."ID"
FROM
"EMAIL_CONTENT" EC
<where>
<if
test=
"s.sendUserId != null"
>
AND EC."SEND_USER_ID" = #{s.sendUserId}
</if>
<if
test=
"s.title != null and s.title !='' "
>
AND EC."TITLE" LIKE concat('%', #{s.title}, '%')
</if>
<if
test=
"s.content != null and s.content !='' "
>
AND EC."CONTENT" LIKE concat('%', #{s.content}, '%')
</if>
</where>
)
</if>
<if
test=
"s.attachName!=null and s.attachName!=''"
>
AND EP."EMAIL_CONTENT_ID" IN(
SELECT
EA."EMAIL_CONTENT_ID"
FROM
"EMAIL_ATTACH" EA
WHERE
EA."ATTACH_NAME" LIKE concat('%', #{s.attachName}, '%')
)
</if>
</where>
GROUP BY EP."ID"
)
ORDER BY EP1."SEND_TIME" DESC
</select>
...
...
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