Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yanxuan-qc-change-system
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
胡园园
yanxuan-qc-change-system
Commits
a3e43bb7
Commit
a3e43bb7
authored
Dec 15, 2022
by
“zcwang”
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/feature-changeFlow-221110' into feature-changeFlow-221110
parents
d35574da
1c11b477
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
25 deletions
+3
-25
pom.xml
pom.xml
+0
-11
UasClientServiceImpl.java
.../integration/email/service/impl/UasClientServiceImpl.java
+3
-14
No files found.
pom.xml
View file @
a3e43bb7
...
@@ -100,12 +100,6 @@
...
@@ -100,12 +100,6 @@
<version>
${project.version}
</version>
<version>
${project.version}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
com.netease.yanxuan
</groupId>
<artifactId>
yanxuan-qc-service-client
</artifactId>
<version>
2.0.0-SNAPSHOT
</version>
</dependency>
<!-- spring -->
<!-- spring -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
...
@@ -235,11 +229,6 @@
...
@@ -235,11 +229,6 @@
<version>
${org.aspectj.version}
</version>
<version>
${org.aspectj.version}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
com.netease.yanxuan
</groupId>
<artifactId>
yanxuan-qc-service-client
</artifactId>
</dependency>
<!-- yanxuan -->
<!-- yanxuan -->
<!--默认引入apollo配置-->
<!--默认引入apollo配置-->
<dependency>
<dependency>
...
...
yanxuan-qc-change-system-integration/src/main/java/com/netease/mail/yanxuan/change/integration/email/service/impl/UasClientServiceImpl.java
View file @
a3e43bb7
...
@@ -4,8 +4,6 @@ import com.alibaba.fastjson.JSON;
...
@@ -4,8 +4,6 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.netease.mail.yanxuan.change.integration.email.service.UasClientService
;
import
com.netease.mail.yanxuan.change.integration.email.service.UasClientService
;
import
com.netease.mail.yanxuan.change.integration.flow.email.EmailRpcService
;
import
com.netease.mail.yanxuan.change.integration.flow.email.EmailRpcService
;
import
com.netease.mail.yanxuan.qc.service.client.remote.UasClient
;
import
com.netease.mail.yanxuan.qc.service.client.utils.http.HttpClientExecutor
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -31,28 +29,19 @@ public class UasClientServiceImpl implements UasClientService {
...
@@ -31,28 +29,19 @@ public class UasClientServiceImpl implements UasClientService {
@Autowired
@Autowired
private
EmailRpcService
service
;
private
EmailRpcService
service
;
@Autowired
private
HttpClientExecutor
httpClientExecutor
;
@Override
@Override
public
void
sendEmail
(
String
subject
,
String
content
,
Collection
<
String
>
toList
,
Collection
<
String
>
ccList
,
List
<
File
>
fileList
)
{
public
void
sendEmail
(
String
subject
,
String
content
,
Collection
<
String
>
toList
,
Collection
<
String
>
ccList
,
List
<
File
>
fileList
)
{
if
(!
CollectionUtils
.
isEmpty
(
toList
))
{
if
(!
CollectionUtils
.
isEmpty
(
toList
))
{
Map
<
String
,
String
>
params
=
new
HashMap
();
Map
<
String
,
String
>
params
=
new
HashMap
();
params
.
put
(
"subject"
,
subject
);
params
.
put
(
"content"
,
content
);
params
.
put
(
"to"
,
StringUtils
.
join
(
toList
,
","
));
params
.
put
(
"topic"
,
"qc"
);
if
(!
CollectionUtils
.
isEmpty
(
ccList
))
{
if
(!
CollectionUtils
.
isEmpty
(
ccList
))
{
params
.
put
(
"cc"
,
StringUtils
.
join
(
ccList
,
","
));
params
.
put
(
"cc"
,
StringUtils
.
join
(
ccList
,
","
));
}
}
logger
.
info
(
JSONObject
.
toJSONString
(
"邮箱接口入参 subject={},content={},toList={},ccList={}"
),
subject
,
content
,
StringUtils
.
join
(
toList
,
","
),
params
.
get
(
"cc"
));
logger
.
info
(
JSONObject
.
toJSONString
(
"邮箱接口入参 subject={},content={},toList={},ccList={}"
),
subject
,
content
,
StringUtils
.
join
(
toList
,
","
),
params
.
get
(
"cc"
));
//String res = service.sendEmail(subject,content,StringUtils.join(toList, ","),params.get("cc"));
String
res
=
service
.
sendEmail
(
subject
,
content
,
StringUtils
.
join
(
toList
,
","
),
params
.
get
(
"cc"
));
String
url
=
"http://127.0.0.1:8550/proxy/test.logistics-uas.service.mailsaas/push/email/qc"
;
this
.
logger
.
info
(
"[op:sendEmail] res={} "
,
res
);
String
res
=
this
.
httpClientExecutor
.
doPost
(
url
,
params
);
this
.
logger
.
info
(
"[op:sendEmail] res={} "
,
new
Object
[]{
res
});
JSONObject
jsonObject
=
JSON
.
parseObject
(
res
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
res
);
if
(
jsonObject
.
getInteger
(
"code"
)
!=
200
)
{
if
(
jsonObject
.
getInteger
(
"code"
)
!=
200
)
{
logger
.
error
(
"send email has ex: {}"
,
res
);
this
.
logger
.
error
(
"SendEmail"
,
null
,
"send email failed, subject={},toList={},ccList={}"
,
new
Object
[]{
subject
,
JSON
.
toJSONString
(
toList
),
JSON
.
toJSONString
(
ccList
)}
);
}
}
}
}
}
}
...
...
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