Commit 243ae9ec authored by Quxl's avatar Quxl

x

parent d9599218
...@@ -3,6 +3,9 @@ package com.egolm.film.api.service; ...@@ -3,6 +3,9 @@ package com.egolm.film.api.service;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.egolm.common.jdbc.Page; import com.egolm.common.jdbc.Page;
import com.egolm.film.bean.Fc_member_film; import com.egolm.film.bean.Fc_member_film;
import com.egolm.film.bean.Fc_member_film_enroll; import com.egolm.film.bean.Fc_member_film_enroll;
...@@ -12,6 +15,8 @@ import com.egolm.film.bean.Fc_member_film_show; ...@@ -12,6 +15,8 @@ import com.egolm.film.bean.Fc_member_film_show;
import com.egolm.film.bean.model.Fc_member_film_base_model; import com.egolm.film.bean.model.Fc_member_film_base_model;
public interface FilmService { public interface FilmService {
Logger logger = LoggerFactory.getLogger(FilmService.class);
List<Fc_member_film_issuer> queryMemberFilmIssuerList(Long member_film_id); List<Fc_member_film_issuer> queryMemberFilmIssuerList(Long member_film_id);
......
...@@ -21,6 +21,8 @@ public class EmailServiceImpl implements EmailService { ...@@ -21,6 +21,8 @@ public class EmailServiceImpl implements EmailService {
@Value("${com.egolm.film.email.smtp.username}") private String username; @Value("${com.egolm.film.email.smtp.username}") private String username;
@Value("${com.egolm.film.email.smtp.password}") private String password; @Value("${com.egolm.film.email.smtp.password}") private String password;
@Value("${spring.profiles.active}") private String profiles;
@Autowired @Autowired
JdbcTemplate jdbcTemplate; JdbcTemplate jdbcTemplate;
...@@ -38,7 +40,7 @@ public class EmailServiceImpl implements EmailService { ...@@ -38,7 +40,7 @@ public class EmailServiceImpl implements EmailService {
new Thread() { new Thread() {
public void run() { public void run() {
try { try {
MailUtil.sendBySmtp(host, port, is_auth, username, password, from, subject, content, null, email); MailUtil.sendBySmtp(host, port, is_auth, username, password, from, subject, content, null, !profiles.equals("pro") ? "sun.nana@egolm.com" : email);
record.setSend_state(1); record.setSend_state(1);
} catch (Exception e) { } catch (Exception e) {
record.setSend_state(2); record.setSend_state(2);
......
...@@ -311,6 +311,7 @@ public class FilmServiceImpl implements FilmService { ...@@ -311,6 +311,7 @@ public class FilmServiceImpl implements FilmService {
jdbcTemplate.batchUpdate(sql, args); jdbcTemplate.batchUpdate(sql, args);
} else { } else {
throw new XException(messages.get("err.args_nums")); throw new XException(messages.get("err.args_nums"));
} }
} }
......
...@@ -26,6 +26,7 @@ import com.egolm.film.api.service.ReviewService; ...@@ -26,6 +26,7 @@ import com.egolm.film.api.service.ReviewService;
import com.egolm.film.bean.Fc_member; import com.egolm.film.bean.Fc_member;
import com.egolm.film.bean.Fc_member_film; import com.egolm.film.bean.Fc_member_film;
import com.egolm.film.bean.Fc_member_film_enroll; import com.egolm.film.bean.Fc_member_film_enroll;
import com.egolm.film.config.XRException;
import com.egolm.film.model.LoginToken; import com.egolm.film.model.LoginToken;
import com.egolm.film.util.Common; import com.egolm.film.util.Common;
...@@ -123,8 +124,25 @@ public class AdminFirstController { ...@@ -123,8 +124,25 @@ public class AdminFirstController {
memberFilmService.mergeMemberFilm(film); memberFilmService.mergeMemberFilm(film);
memberFilmService.pass(member_film_id); memberFilmService.pass(member_film_id);
List<Fc_member_film_enroll> enrolls = memberFilmService.queryFilmEnrollList(member_film_id); List<Fc_member_film_enroll> enrolls = memberFilmService.queryFilmEnrollList(member_film_id);
Integer enroll_1_2 = null;
Integer enroll_4 = null;
for(Fc_member_film_enroll enroll : enrolls) { for(Fc_member_film_enroll enroll : enrolls) {
reviewService.toFirstRound(member_film_id, enroll.getEnroll_type_id()); Integer enroll_type_id = enroll.getEnroll_type_id();
if(enroll_type_id == 1 || enroll_type_id == 2) {
if(enroll_1_2 == null) {
enroll_1_2 = enroll_type_id;
} else {
throw new XRException("不能同时申请亚新和金爵流程");
}
} else if(enroll_type_id == 4) {
enroll_4 = enroll_type_id;
}
}
if(enroll_1_2 != null) {
reviewService.toFirstRound(member_film_id, enroll_1_2);
} else if(enroll_4 != null) {
reviewService.toFirstRound(member_film_id, enroll_4);
} }
Fc_member_film memberFilm = memberFilmService.queryMemberFilmById(member_film_id); Fc_member_film memberFilm = memberFilmService.queryMemberFilmById(member_film_id);
Fc_member member = memberService.getMemberById(memberFilm.getMember_id()); Fc_member member = memberService.getMemberById(memberFilm.getMember_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