Commit 9706d9f1 authored by Quxl's avatar Quxl

x

parent b2039d08
...@@ -79,6 +79,8 @@ public class EmailServiceImpl implements EmailService { ...@@ -79,6 +79,8 @@ public class EmailServiceImpl implements EmailService {
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);
String film_no = StringUtil.formatLength(memberFilm.getFilm_no(), "0000");
map.put("film_no", film_no);
Fc_member member = null; Fc_member member = null;
try { try {
member = memberService.getMemberById(memberFilm.getMember_id()); member = memberService.getMemberById(memberFilm.getMember_id());
...@@ -107,15 +109,15 @@ public class EmailServiceImpl implements EmailService { ...@@ -107,15 +109,15 @@ public class EmailServiceImpl implements EmailService {
if(filmName == null || filmName.trim().length() == 0) { if(filmName == null || filmName.trim().length() == 0) {
filmName = memberFilm.getCn_name(); filmName = memberFilm.getCn_name();
} }
String film_no = StringUtil.formatLength(memberFilm.getFilm_no(), "0000");
content = MessageFormat.format(content, member.getUsername(), film_no, filmName == null ? "" : filmName); content = MessageFormat.format(content, member.getUsername(), film_no, filmName == null ? "" : filmName);
this.send(2, adminid, subject, content, member.getEmail()); this.send(2, adminid, subject, content, member.getEmail());
map.put("email", member.getEmail()); map.put("email", member.getEmail());
map.put("film_no", film_no);
return map; return map;
} else { } else {
return new HashMap<String, Object>(); map.put("email", "后台申报影片,未发送邮件");
} }
return map;
} }
public static void main(String[] args) { public static void main(String[] args) {
......
...@@ -128,9 +128,7 @@ public class AdminFirstController { ...@@ -128,9 +128,7 @@ public class AdminFirstController {
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_01(member_film_id, "doc/first_pass");
Rjx rjx = Rjx.jsonOk(); Rjx rjx = Rjx.jsonOk();
if(map != null) { rjx.putAll(map);
rjx.putAll(map);
}
return rjx; return rjx;
} }
......
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