Commit 5be22cdc authored by Quxl's avatar Quxl

x

parent a41b9dc9
...@@ -13,6 +13,6 @@ public interface EmailService { ...@@ -13,6 +13,6 @@ public interface EmailService {
* @param member_film_id * @param member_film_id
* @param template * @param template
*/ */
Map<String, Object> sendByTemplate_01(Long member_film_id, String prefix); Map<String, Object> sendByTemplate_pass(Long member_film_id);
} }
...@@ -78,7 +78,10 @@ public class EmailServiceImpl implements EmailService { ...@@ -78,7 +78,10 @@ public class EmailServiceImpl implements EmailService {
@Autowired @Autowired
Messages messages; Messages messages;
public Map<String, Object> sendByTemplate_01(Long member_film_id, String prefix) { private static final String tpl_en = Common.getStringAsStream("doc/first_pass_en_US.txt");
private static final String tpl_zh = Common.getStringAsStream("doc/first_pass_zh_US.txt");
public Map<String, Object> sendByTemplate_pass(Long member_film_id) {
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
Integer adminid = (Integer)adminTokenService.getToken().getId(); Integer adminid = (Integer)adminTokenService.getToken().getId();
Fc_member_film memberFilm = filmService.queryMemberFilmById(member_film_id); Fc_member_film memberFilm = filmService.queryMemberFilmById(member_film_id);
...@@ -96,7 +99,11 @@ public class EmailServiceImpl implements EmailService { ...@@ -96,7 +99,11 @@ public class EmailServiceImpl implements EmailService {
locale = new Locale("en", "US"); locale = new Locale("en", "US");
} }
String subject = messages.get("email.getPassword.subject", locale); String subject = messages.get("email.getPassword.subject", locale);
String content = Common.getStringAsStream(prefix + "_" + locale.getLanguage().toLowerCase() + "_" + locale.getCountry().toUpperCase() + ".txt"); String language = locale.getLanguage().toLowerCase();
String content = tpl_zh;
if(language.equals("en")) {
content = tpl_en;
}
String filmName = null; String filmName = null;
if(locale.getLanguage().toLowerCase().equals("zh")) { if(locale.getLanguage().toLowerCase().equals("zh")) {
filmName = memberFilm.getCn_name(); filmName = memberFilm.getCn_name();
......
...@@ -127,7 +127,7 @@ public class AdminFirstController { ...@@ -127,7 +127,7 @@ public class AdminFirstController {
filmService.mergeMemberFilm(film); filmService.mergeMemberFilm(film);
filmService.pass(member_film_id); filmService.pass(member_film_id);
reviewService.toFirstRound(member_film_id); reviewService.toFirstRound(member_film_id);
Map<String, Object> map = emailService.sendByTemplate_01(member_film_id, "doc/first_pass"); Map<String, Object> map = emailService.sendByTemplate_pass(member_film_id);
Rjx rjx = Rjx.jsonOk(); Rjx rjx = Rjx.jsonOk();
rjx.putAll(map); rjx.putAll(map);
filmService.initKeywords(member_film_id); filmService.initKeywords(member_film_id);
......
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