Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bi-report
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data
bi-report
Commits
ef4ea8de
Commit
ef4ea8de
authored
Jul 11, 2020
by
赵建伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update codes
parent
70e2e2bc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
BiReportServiceImpl.java
...data/gateway/server/service/impl/BiReportServiceImpl.java
+1
-1
EmailServiceImpl.java
...ei/data/gateway/server/service/impl/EmailServiceImpl.java
+3
-2
No files found.
lib/java/bi-report-service/service-server/src/main/java/com/gmei/data/gateway/server/service/impl/BiReportServiceImpl.java
View file @
ef4ea8de
...
...
@@ -44,7 +44,7 @@ public class BiReportServiceImpl implements BiReportService {
if
(
Constants
.
SUCCESS
==
genExcelRs
){
int
rs
=
emailService
.
sendAttachmentsMail
(
to
,
cc
,
name
);
if
(
rs
==
Constants
.
FAIL
){
throw
new
Exception
(
"
邮件发送失败
,请核实!"
);
throw
new
Exception
(
"
收件人或抄送人邮件地址有误,未完全发送成功
,请核实!"
);
}
}
}
...
...
lib/java/bi-report-service/service-server/src/main/java/com/gmei/data/gateway/server/service/impl/EmailServiceImpl.java
View file @
ef4ea8de
...
...
@@ -107,7 +107,7 @@ public class EmailServiceImpl implements EmailService {
List
<
String
>
invalid
=
getInvalidAddresses
(
e
);
for
(
String
toUser
:
toUsers
){
if
(
invalid
.
contains
(
toUser
)){
logger
.
warn
(
"剔除无效接收人邮箱地址:{}"
,
toUser
);
logger
.
error
(
"剔除无效接收人邮箱地址:{}"
,
toUser
);
continue
;
}
validToUsers
=
validToUsers
+
toUser
+
","
;
...
...
@@ -115,7 +115,7 @@ public class EmailServiceImpl implements EmailService {
String
validCcUsers
=
""
;
for
(
String
ccUser
:
ccUsers
){
if
(
invalid
.
contains
(
ccUser
)){
logger
.
warn
(
"剔除无效抄送人邮箱地址:{}"
,
ccUser
);
logger
.
error
(
"剔除无效抄送人邮箱地址:{}"
,
ccUser
);
continue
;
}
validCcUsers
=
validCcUsers
+
ccUser
+
","
;
...
...
@@ -124,6 +124,7 @@ public class EmailServiceImpl implements EmailService {
validToUsers
=
validToUsers
.
substring
(
0
,
validToUsers
.
length
()
-
1
);
validCcUsers
=
validCcUsers
.
substring
(
0
,
validCcUsers
.
length
()
-
1
);
sendAttachmentsMail
(
validToUsers
,
validCcUsers
,
name
);
return
Constants
.
FAIL
;
}
}
return
Constants
.
SUCCESS
;
...
...
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