Commit 3e342232 authored by Quxl's avatar Quxl

xx

parent 88e5bfe2
......@@ -5,6 +5,8 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
......@@ -149,4 +151,20 @@ public class AdminFirstController {
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();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment