Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
member-api
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
曲欣亮
member-api
Commits
3e342232
Commit
3e342232
authored
Nov 28, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xx
parent
88e5bfe2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
AdminFirstController.java
...va/com/egolm/film/api/web/admin/AdminFirstController.java
+18
-0
No files found.
src/main/java/com/egolm/film/api/web/admin/AdminFirstController.java
View file @
3e342232
...
@@ -5,6 +5,8 @@ import java.util.List;
...
@@ -5,6 +5,8 @@ import java.util.List;
import
java.util.Locale
;
import
java.util.Locale
;
import
java.util.Map
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -149,4 +151,20 @@ public class AdminFirstController {
...
@@ -149,4 +151,20 @@ public class AdminFirstController {
return
Rjx
.
jsonOk
();
return
Rjx
.
jsonOk
();
}
}
@ResponseBody
@PostMapping
(
"testMail"
)
@ApiOperation
(
"初审通过邮件通知测试"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
dataType
=
"string"
,
required
=
false
,
name
=
"i18n_language"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"email"
)
})
public
Object
testMail
(
String
email
,
HttpServletRequest
request
)
{
String
i18n_language
=
request
.
getHeader
(
"i18n_language"
);
String
[]
strs
=
i18n_language
.
split
(
"_"
,
2
);
String
content
=
Common
.
getStringAsStream
(
"doc/first_pass_"
+
strs
[
0
].
toLowerCase
()
+
"_"
+
strs
[
1
].
toUpperCase
()
+
".txt"
);
content
=
MessageFormat
.
format
(
content
,
"曲欣亮"
,
"00001"
,
"蜘蛛侠"
);
emailService
.
send
(
"测试邮件"
,
content
,
email
);
return
Rjx
.
jsonOk
();
}
}
}
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