Commit 3f766930 authored by Quxl's avatar Quxl

优化申报接口

parent 4dbdb3c1
...@@ -16,6 +16,7 @@ import org.springframework.stereotype.Service; ...@@ -16,6 +16,7 @@ import org.springframework.stereotype.Service;
import com.egolm.common.StringUtil; import com.egolm.common.StringUtil;
import com.egolm.common.jdbc.JdbcTemplate; import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.common.web.ServletUtil;
import com.egolm.film.api.member.service.MemberService; import com.egolm.film.api.member.service.MemberService;
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;
...@@ -25,6 +26,7 @@ import com.egolm.film.bean.Fc_member_film_issuer; ...@@ -25,6 +26,7 @@ import com.egolm.film.bean.Fc_member_film_issuer;
import com.egolm.film.bean.Fc_member_film_playactor; import com.egolm.film.bean.Fc_member_film_playactor;
import com.egolm.film.bean.Fc_member_film_show; import com.egolm.film.bean.Fc_member_film_show;
import com.egolm.film.common.Messages; import com.egolm.film.common.Messages;
import com.egolm.film.config.WebMvcConfig;
import com.egolm.film.config.XException; import com.egolm.film.config.XException;
...@@ -160,9 +162,12 @@ public class MemberServiceImpl implements MemberService { ...@@ -160,9 +162,12 @@ public class MemberServiceImpl implements MemberService {
Integer is_show = 1; Integer is_show = 1;
Integer apply_state = 1; Integer apply_state = 1;
Integer is_check_director = 0; Integer is_check_director = 0;
Long create_time = System.currentTimeMillis();
Long last_modify_time = create_time;
String create_ip = ServletUtil.remoteIp(WebMvcConfig.getRequest());
String sql = "insert into fc_member_film (film_type_name, enroll_type_name, film_group_id, state, is_show, apply_state, is_check_director) values (?, ?, ?, ?, ?, ?, ?)"; String sql = "insert into fc_member_film (film_type_name, enroll_type_name, film_group_id, state, is_show, apply_state, is_check_director, create_time, create_ip, last_modify_time) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
Object[] args = new Object[]{film_type_name, enroll_type_name, film_group_id, state, is_show, apply_state, is_check_director}; Object[] args = new Object[]{film_type_name, enroll_type_name, film_group_id, state, is_show, apply_state, is_check_director, create_time, create_ip, last_modify_time};
KeyHolder keyHolder = new GeneratedKeyHolder(); KeyHolder keyHolder = new GeneratedKeyHolder();
jdbcTemplate.update(new PreparedStatementCreator() { jdbcTemplate.update(new PreparedStatementCreator() {
public PreparedStatement createPreparedStatement(Connection connection) throws SQLException { public PreparedStatement createPreparedStatement(Connection connection) throws SQLException {
...@@ -191,9 +196,10 @@ public class MemberServiceImpl implements MemberService { ...@@ -191,9 +196,10 @@ public class MemberServiceImpl implements MemberService {
String cn_name, String cn_name,
String en_name, String en_name,
String intro) { String intro) {
String sql = "update fc_member_film set enroll_type_name_other = ?, cn_name = ?, en_name = ?, intro = ? where id = ?"; Long last_modify_time = System.currentTimeMillis();
String sql = "update fc_member_film set enroll_type_name_other = ?, cn_name = ?, en_name = ?, intro = ?, last_modify_time = ? where id = ?";
String str = StringUtil.join(",", "", "", "", enroll_type_name_other); String str = StringUtil.join(",", "", "", "", enroll_type_name_other);
Object[] args = new Object[]{str, cn_name, en_name, intro, member_film_id}; Object[] args = new Object[]{str, cn_name, en_name, intro, last_modify_time, member_film_id};
jdbcTemplate.executeUpdate(sql, args); jdbcTemplate.executeUpdate(sql, args);
} }
...@@ -209,9 +215,11 @@ public class MemberServiceImpl implements MemberService { ...@@ -209,9 +215,11 @@ public class MemberServiceImpl implements MemberService {
String show_date, String show_date,
String film_medium, String film_medium,
String film_format) { String film_format) {
String sql = "update fc_member_film set film_country = ?, dialogue_lang = ?, subtitle_lang = ?, co_production_country = ?, film_total_time = ?, completion_date = ?, show_date = ?, film_medium = ?, film_format = ? where id = ?";
Long last_modify_time = System.currentTimeMillis();
String sql = "update fc_member_film set film_country = ?, dialogue_lang = ?, subtitle_lang = ?, co_production_country = ?, film_total_time = ?, completion_date = ?, show_date = ?, film_medium = ?, film_format = ?, last_modify_time = ? where id = ?";
String str = StringUtil.join(",", "", "", "", co_production_country); String str = StringUtil.join(",", "", "", "", co_production_country);
Object[] args = new Object[]{str, film_country, dialogue_lang, subtitle_lang, str, film_total_time, completion_date, show_date, film_medium, film_format, member_film_id}; Object[] args = new Object[]{str, film_country, dialogue_lang, subtitle_lang, str, film_total_time, completion_date, show_date, film_medium, film_format, last_modify_time, member_film_id};
jdbcTemplate.executeUpdate(sql, args); jdbcTemplate.executeUpdate(sql, args);
} }
...@@ -339,7 +347,8 @@ public class MemberServiceImpl implements MemberService { ...@@ -339,7 +347,8 @@ public class MemberServiceImpl implements MemberService {
for(int i = 0; i < show_filmfest.length; i++) { for(int i = 0; i < show_filmfest.length; i++) {
args[i] = new Object[]{member_film_id, show_filmfest[i], show_filmfest_type[i], show_filmfest_intro[i], create_time}; args[i] = new Object[]{member_film_id, show_filmfest[i], show_filmfest_type[i], show_filmfest_intro[i], create_time};
} }
jdbcTemplate.executeUpdate("update fc_member_film set play_shanghai = ? where id = ?", play_shanghai, member_film_id); Long last_modify_time = System.currentTimeMillis();
jdbcTemplate.executeUpdate("update fc_member_film set play_shanghai = ?, last_modify_time = ? where id = ?", play_shanghai, last_modify_time, member_film_id);
jdbcTemplate.executeUpdate("delete from fc_member_film_show where film_id = ?", member_film_id); jdbcTemplate.executeUpdate("delete from fc_member_film_show where film_id = ?", member_film_id);
String sql = "insert into fc_member_film_show (film_id, show_filmfest, show_filmfest_type, show_filmfest_intro, create_time) values (?, ?, ?, ?, ?);"; String sql = "insert into fc_member_film_show (film_id, show_filmfest, show_filmfest_type, show_filmfest_intro, create_time) values (?, ?, ?, ?, ?);";
jdbcTemplate.batchUpdate(sql, args); jdbcTemplate.batchUpdate(sql, args);
...@@ -357,6 +366,8 @@ public class MemberServiceImpl implements MemberService { ...@@ -357,6 +366,8 @@ public class MemberServiceImpl implements MemberService {
String film_apply_tel, String film_apply_tel,
String film_apply_mobile, String film_apply_mobile,
String film_apply_country) { String film_apply_country) {
Long last_modify_time = System.currentTimeMillis();
String sql = "" String sql = ""
+ "update " + "update "
+ "fc_member_film " + "fc_member_film "
...@@ -366,7 +377,8 @@ public class MemberServiceImpl implements MemberService { ...@@ -366,7 +377,8 @@ public class MemberServiceImpl implements MemberService {
+ "film_apply_email = ?, " + "film_apply_email = ?, "
+ "film_apply_tel = ?, " + "film_apply_tel = ?, "
+ "film_apply_mobile = ?, " + "film_apply_mobile = ?, "
+ "film_apply_country = ? " + "film_apply_country = ?,"
+ "last_modify_time = ? "
+ "where " + "where "
+ "id = ?"; + "id = ?";
Object[] args = new Object[]{ Object[] args = new Object[]{
...@@ -376,6 +388,7 @@ public class MemberServiceImpl implements MemberService { ...@@ -376,6 +388,7 @@ public class MemberServiceImpl implements MemberService {
film_apply_tel, film_apply_tel,
film_apply_mobile, film_apply_mobile,
film_apply_country, film_apply_country,
last_modify_time,
member_film_id}; member_film_id};
jdbcTemplate.executeUpdate(sql, args); jdbcTemplate.executeUpdate(sql, args);
} }
......
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