Commit 334050e5 authored by Quxl's avatar Quxl

xxx

parent 6f2f9af5
......@@ -2,6 +2,6 @@ package com.egolm.film.api.service;
public interface FilmService {
void copyFilm(Integer member_film_id, Integer adminid);
void copyFilm(Long member_film_id, Integer adminid);
}
......@@ -6,15 +6,12 @@ import java.util.Map;
import com.egolm.common.jdbc.Page;
import com.egolm.film.bean.Fc_member_film;
import com.egolm.film.bean.Fc_member_film_all;
import com.egolm.film.bean.Fc_member_film_director;
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_show;
public interface MemberFilmService {
List<Fc_member_film_director> queryMemberFilmDirectorList(Long member_film_id);
List<Fc_member_film_issuer> queryMemberFilmIssuerList(Long member_film_id);
List<Fc_member_film_playactor> queryMemberFilmPlayactorList(Long member_film_id);
......@@ -104,9 +101,9 @@ public interface MemberFilmService {
List<Map<String, Object>> queryChuShenList(String keyword, Integer state, Integer apply_state, String film_type, String enroll_type, String film_country, Page page);
void pass(Integer member_film_id);
void pass(Long member_film_id);
void reject(Integer member_film_id);
void reject(Long member_film_id);
Fc_member_film queryMemberFilmById(Long member_film_id);
......
package com.egolm.film.api.service.impl;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.film.api.service.FilmService;
import com.egolm.film.api.service.MemberFilmService;
import com.egolm.film.bean.Fc_film;
import com.egolm.film.bean.Fc_film_enroll;
import com.egolm.film.bean.Fc_member_film;
@Service
public class FilmServiceImpl implements FilmService {
@Autowired
JdbcTemplate jdbcTemplate;
@Autowired
MemberFilmService memberFilmService;
@Value("${opt.project.type}")
private Integer project_type;
@Override
public void copyFilm(Integer member_film_id, Integer adminid) {
public synchronized void copyFilm(Long member_film_id, Integer adminid) {
Fc_member_film memberFilm = memberFilmService.queryMemberFilmById(member_film_id);
Integer film_id = member_film_id.intValue();
Fc_film film = new Fc_film();
film.setFilm_id(film_id);
film.setAdminid(adminid);
film.setCreate_time(new Date());
film.setCn_name(memberFilm.getCn_name());
film.setCo_production_country(memberFilm.getCo_production_country());
film.setColor_tag(memberFilm.getFilm_medium());
film.setCompletion_date(memberFilm.getCompletion_date());
film.setDialogue_lang(memberFilm.getDialogue_lang());
film.setEn_intro(memberFilm.getEn_intro());
film.setEn_name(memberFilm.getEn_name());
film.setFilm_country(memberFilm.getFilm_country());
film.setFilm_total_time(memberFilm.getFilm_total_time());
film.setFilm_medium(memberFilm.getFilm_format());
film.setFilm_online_address(memberFilm.getFilm_format_url());
film.setFilm_online_password(memberFilm.getFilm_format_passw());
film.setFilm_producers(memberFilm.getFilm_producers());
film.setFilm_type_id(Integer.valueOf(memberFilm.getFilm_type_name()));
film.setFirst_play_address(memberFilm.getFirst_show_city());
film.setIntro(memberFilm.getIntro());
film.setIs_like_show(memberFilm.getIs_like_show());
film.setOrigion_name(memberFilm.getOrigion_name());
film.setPlay_shanghai(memberFilm.getPlay_shanghai());
film.setPrize(memberFilm.getPrize());
film.setProduction_company(memberFilm.getProduction_company());
film.setShow_date(memberFilm.getShow_date());
film.setShow_time(memberFilm.getShow_time());
film.setState(0);
film.setSubtitle_lang(memberFilm.getSubtitle_lang());
film.setType(project_type);
List<Fc_film_enroll> enrolls = new ArrayList<Fc_film_enroll>();
String enroll_types = memberFilm.getEnroll_type_name();
if(enroll_types != null) {
String[] strs = enroll_types.split(",");
if(strs != null && strs.length > 0) {
for(String str : strs) {
if(str != null && str.matches("\\d+")) {
Fc_film_enroll enroll = new Fc_film_enroll();
enroll.setFilm_enroll_id(Integer.valueOf(str));
enroll.setFilm_id(film_id);
enrolls.add(enroll);
}
}
}
}
jdbcTemplate.save(film);
jdbcTemplate.batchSave(enrolls);
}
}
......@@ -23,7 +23,6 @@ import com.egolm.film.api.service.MemberFilmService;
import com.egolm.film.api.service.Messages;
import com.egolm.film.bean.Fc_member_film;
import com.egolm.film.bean.Fc_member_film_all;
import com.egolm.film.bean.Fc_member_film_director;
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_show;
......@@ -41,11 +40,6 @@ public class MemberFilmServiceImpl implements MemberFilmService {
@Autowired
private JdbcTemplate jdbcTemplate;
@Override
public List<Fc_member_film_director> queryMemberFilmDirectorList(Long member_film_id) {
return jdbcTemplate.queryForBeans("select * from fc_member_film_director where film_id = ?", Fc_member_film_director.class, member_film_id);
}
@Override
public List<Fc_member_film_issuer> queryMemberFilmIssuerList(Long member_film_id) {
return jdbcTemplate.queryForBeans("select * from fc_member_film_issuer where film_id = ?", Fc_member_film_issuer.class, member_film_id);
......@@ -227,33 +221,19 @@ public class MemberFilmServiceImpl implements MemberFilmService {
Long create_time = System.currentTimeMillis()/1000;
List<Object[]> playactors = new ArrayList<Object[]>();
List<Object[]> directors = new ArrayList<Object[]>();
for(int i = 0; i < playactor_type.length; i++) {
if(!playactor_type[i].equals("0")) {
playactors.add(new Object[]{
member_film_id,
playactor_name[i],
playactor_film_nums[i],
playactor_intro[i],
playactor_country[i],
playactor_birthday[i],
create_time,
playactor_type[i],
playactor_role_name[i]});
} else {
directors.add(new Object[] {
member_film_id,
playactor_name[i],
playactor_film_nums[i],
playactor_intro[i],
playactor_country[i],
playactor_birthday[i],
create_time,
is_play_shanghai[i]});
}
playactors.add(new Object[]{
member_film_id,
playactor_name[i],
playactor_film_nums[i],
playactor_intro[i],
playactor_country[i],
playactor_birthday[i],
create_time,
playactor_type[i],
playactor_role_name[i]});
}
jdbcTemplate.executeUpdate("delete from fc_member_film_playactor where film_id = ?", member_film_id);
jdbcTemplate.executeUpdate("delete from fc_member_film_director where film_id = ?", member_film_id);
String sql_playactor = ""
+ "insert into fc_member_film_playactor("
+ "film_id, "
......@@ -267,20 +247,7 @@ public class MemberFilmServiceImpl implements MemberFilmService {
+ "playactor_role_name)"
+ "values "
+ "(?, ?, ?, ?, ?, ?, ?, ?, ?)";
String sql_director = ""
+ "insert into fc_member_film_director ("
+ "film_id, "
+ "director_name, "
+ "director_film_nums, "
+ "director_intro, "
+ "playactor_country, "
+ "playactor_birthday, "
+ "create_time, "
+ "director_is_play_shanghai) "
+ "values "
+ "(?, ?, ?, ?, ?, ?, ?, ?)";
jdbcTemplate.batchUpdate(sql_playactor, playactors);
jdbcTemplate.batchUpdate(sql_director, directors);
} else {
throw new XException(messages.get("err.args_nums"));
}
......@@ -411,13 +378,13 @@ public class MemberFilmServiceImpl implements MemberFilmService {
}
@Override
public void pass(Integer member_film_id) {
public void pass(Long member_film_id) {
String sql = "update fc_member_film set apply_state = ? where id = ?";
jdbcTemplate.executeUpdate(sql, 2, member_film_id);
}
@Override
public void reject(Integer member_film_id) {
public void reject(Long member_film_id) {
String sql = "update fc_member_film set apply_state = ? where id = ?";
jdbcTemplate.executeUpdate(sql, 3, member_film_id);
}
......
......@@ -15,9 +15,7 @@ import com.egolm.common.jdbc.Page;
import com.egolm.film.api.service.AdminTokenService;
import com.egolm.film.api.service.FilmService;
import com.egolm.film.api.service.MemberFilmService;
import com.egolm.film.api.service.MemberService;
import com.egolm.film.bean.Fc_member_film;
import com.egolm.film.bean.Fc_member_film_director;
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_show;
......@@ -41,9 +39,6 @@ public class AdminFirstController {
@Autowired
FilmService service;
@Autowired
MemberService memberService;
@Autowired
MemberFilmService memberFilmService;
......@@ -95,13 +90,13 @@ public class AdminFirstController {
@PostMapping("pass")
@ApiOperation("初审通过")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="member_film_id", value="申报影片ID"),
@ApiImplicitParam(paramType="query", dataType="long", required=false, name="member_film_id", value="申报影片ID"),
})
public Object pass(Integer member_film_id) {
public Object pass(Long member_film_id) {
LoginToken loginToken = tokenService.getToken();
Integer adminid = (Integer)loginToken.getId();
service.copyFilm(member_film_id, adminid);
memberFilmService.pass(member_film_id);
service.copyFilm(member_film_id, adminid);
return Rjx.jsonOk();
}
......@@ -109,9 +104,9 @@ public class AdminFirstController {
@PostMapping("reject")
@ApiOperation("初审拒绝")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="member_film_id", value="申报影片ID"),
@ApiImplicitParam(paramType="query", dataType="long", required=false, name="member_film_id", value="申报影片ID"),
})
public Object reject(Integer member_film_id) {
public Object reject(Long member_film_id) {
memberFilmService.reject(member_film_id);
return Rjx.jsonOk();
}
......@@ -124,14 +119,12 @@ public class AdminFirstController {
})
public Object getDetail(Long member_film_id) {
Fc_member_film memberFilm = memberFilmService.queryMemberFilmById(member_film_id);
List<Fc_member_film_director> directorList = memberFilmService.queryMemberFilmDirectorList(memberFilm.getId());
List<Fc_member_film_issuer> issuerList = memberFilmService.queryMemberFilmIssuerList(memberFilm.getId());
List<Fc_member_film_playactor> playactorList = memberFilmService.queryMemberFilmPlayactorList(memberFilm.getId());
List<Fc_member_film_show> showList = memberFilmService.queryMemberFilmShowList(memberFilm.getId());
return Rjx.jsonOk()
.setData(memberFilm)
.set("directorList", directorList)
.set("issuerList", issuerList)
.set("playactorList", playactorList)
.set("showList", showList);
......
......@@ -17,7 +17,6 @@ import com.egolm.film.api.service.MemberService;
import com.egolm.film.api.service.MemberTokenService;
import com.egolm.film.bean.Fc_member_film;
import com.egolm.film.bean.Fc_member_film_all;
import com.egolm.film.bean.Fc_member_film_director;
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_show;
......@@ -326,14 +325,12 @@ public class MemberApplyController {
})
public Object getDetail(Long member_film_id) {
Fc_member_film memberFilm = memberFilmService.queryMemberFilmById(member_film_id);
List<Fc_member_film_director> directorList = memberFilmService.queryMemberFilmDirectorList(memberFilm.getId());
List<Fc_member_film_issuer> issuerList = memberFilmService.queryMemberFilmIssuerList(memberFilm.getId());
List<Fc_member_film_playactor> playactorList = memberFilmService.queryMemberFilmPlayactorList(memberFilm.getId());
List<Fc_member_film_show> showList = memberFilmService.queryMemberFilmShowList(memberFilm.getId());
return Rjx.jsonOk()
.setData(memberFilm)
.set("directorList", directorList)
.set("issuerList", issuerList)
.set("playactorList", playactorList)
.set("showList", showList);
......
......@@ -16,12 +16,7 @@ public class Fc_film implements java.io.Serializable {
private static final long serialVersionUID = 1L;
/**
* 电影编号
*/
@Id
private String film_no;
private Integer film_id;
/**
......@@ -49,11 +44,6 @@ public class Fc_film implements java.io.Serializable {
*/
private Integer film_type_id;
/**
* 报名类型
*/
private Integer enroll_type_id;
/**
* 放映时间
*/
......@@ -174,11 +164,6 @@ public class Fc_film implements java.io.Serializable {
*/
private Integer adminid;
/**
* 创建ip
*/
private String create_ip;
/**
* 添加时间
*/
......@@ -199,14 +184,12 @@ public class Fc_film implements java.io.Serializable {
/**
* 全参数构造方法
* @param film_no 电影编号
* @param film_id
* @param origion_name 原片名
* @param en_name 英文名称
* @param cn_name 中文片名
* @param type 类型 1 电影 2电视
* @param film_type_id 影片类型
* @param enroll_type_id 报名类型
* @param show_date 放映时间
* @param show_time 上映时间
* @param film_medium 影片介质
......@@ -231,19 +214,16 @@ public class Fc_film implements java.io.Serializable {
* @param film_total_time 影片时长
* @param round 当前审核环节
* @param adminid 管理员id
* @param create_ip 创建ip
* @param create_time 添加时间
* @param last_update_time 最后更新时间
*/
public Fc_film(String film_no, Integer film_id, String origion_name, String en_name, String cn_name, Integer type, Integer film_type_id, Integer enroll_type_id, String show_date, Long show_time, String film_medium, String film_online_address, String film_online_password, String completion_date, String film_country, String co_production_country, String film_producers, String production_company, Integer is_like_show, String first_play_address, String film_file_time, String color_tag, String prize, String dialogue_lang, String subtitle_lang, String play_shanghai, String intro, String en_intro, Integer state, String film_total_time, Integer round, Integer adminid, String create_ip, Date create_time, Date last_update_time) {
this.film_no = film_no;
public Fc_film(Integer film_id, String origion_name, String en_name, String cn_name, Integer type, Integer film_type_id, String show_date, Long show_time, String film_medium, String film_online_address, String film_online_password, String completion_date, String film_country, String co_production_country, String film_producers, String production_company, Integer is_like_show, String first_play_address, String film_file_time, String color_tag, String prize, String dialogue_lang, String subtitle_lang, String play_shanghai, String intro, String en_intro, Integer state, String film_total_time, Integer round, Integer adminid, Date create_time, Date last_update_time) {
this.film_id = film_id;
this.origion_name = origion_name;
this.en_name = en_name;
this.cn_name = cn_name;
this.type = type;
this.film_type_id = film_type_id;
this.enroll_type_id = enroll_type_id;
this.show_date = show_date;
this.show_time = show_time;
this.film_medium = film_medium;
......@@ -268,19 +248,10 @@ public class Fc_film implements java.io.Serializable {
this.film_total_time = film_total_time;
this.round = round;
this.adminid = adminid;
this.create_ip = create_ip;
this.create_time = create_time;
this.last_update_time = last_update_time;
}
public void setFilm_no(String film_no) {
this.film_no = film_no;
}
public String getFilm_no() {
return film_no;
}
public void setFilm_id(Integer film_id) {
this.film_id = film_id;
}
......@@ -329,14 +300,6 @@ public class Fc_film implements java.io.Serializable {
return film_type_id;
}
public void setEnroll_type_id(Integer enroll_type_id) {
this.enroll_type_id = enroll_type_id;
}
public Integer getEnroll_type_id() {
return enroll_type_id;
}
public void setShow_date(String show_date) {
this.show_date = show_date;
}
......@@ -529,14 +492,6 @@ public class Fc_film implements java.io.Serializable {
return adminid;
}
public void setCreate_ip(String create_ip) {
this.create_ip = create_ip;
}
public String getCreate_ip() {
return create_ip;
}
public void setCreate_time(Date create_time) {
this.create_time = create_time;
}
......
......@@ -15,7 +15,7 @@ public class Fc_film_enroll implements java.io.Serializable {
private static final long serialVersionUID = 1L;
@Id
private String film_no;
private Integer film_id;
@Id
private Integer film_enroll_id;
......@@ -30,20 +30,20 @@ public class Fc_film_enroll implements java.io.Serializable {
/**
* 全参数构造方法
* @param film_no
* @param film_id
* @param film_enroll_id
*/
public Fc_film_enroll(String film_no, Integer film_enroll_id) {
this.film_no = film_no;
public Fc_film_enroll(Integer film_id, Integer film_enroll_id) {
this.film_id = film_id;
this.film_enroll_id = film_enroll_id;
}
public void setFilm_no(String film_no) {
this.film_no = film_no;
public void setFilm_id(Integer film_id) {
this.film_id = film_id;
}
public String getFilm_no() {
return film_no;
public Integer getFilm_id() {
return film_id;
}
public void setFilm_enroll_id(Integer film_enroll_id) {
......
......@@ -22,7 +22,7 @@ public class Fc_film_issuer implements java.io.Serializable {
/**
* 报名影片ID
*/
private String film_no;
private Integer film_id;
/**
* 发行公司
......@@ -57,16 +57,16 @@ public class Fc_film_issuer implements java.io.Serializable {
/**
* 全参数构造方法
* @param id
* @param film_no 报名影片ID
* @param film_id 报名影片ID
* @param issuer_company 发行公司
* @param issuer_contacts 联系人
* @param issuer_email 邮箱
* @param issuer_tel 电话
* @param create_time
*/
public Fc_film_issuer(Integer id, String film_no, String issuer_company, String issuer_contacts, String issuer_email, String issuer_tel, Date create_time) {
public Fc_film_issuer(Integer id, Integer film_id, String issuer_company, String issuer_contacts, String issuer_email, String issuer_tel, Date create_time) {
this.id = id;
this.film_no = film_no;
this.film_id = film_id;
this.issuer_company = issuer_company;
this.issuer_contacts = issuer_contacts;
this.issuer_email = issuer_email;
......@@ -82,12 +82,12 @@ public class Fc_film_issuer implements java.io.Serializable {
return id;
}
public void setFilm_no(String film_no) {
this.film_no = film_no;
public void setFilm_id(Integer film_id) {
this.film_id = film_id;
}
public String getFilm_no() {
return film_no;
public Integer getFilm_id() {
return film_id;
}
public void setIssuer_company(String issuer_company) {
......
......@@ -22,10 +22,10 @@ public class Fc_film_playactor implements java.io.Serializable {
/**
* 报名影片ID
*/
private Integer film_no;
private Integer film_id;
/**
* 演职人员类型(女演员,男演员,制片人,编剧,摄影师)
* 演职人员类型(女演员,男演员,制片人,编剧,摄影师,导演
*/
private String playactor_type;
......@@ -72,8 +72,8 @@ public class Fc_film_playactor implements java.io.Serializable {
/**
* 全参数构造方法
* @param id
* @param film_no 报名影片ID
* @param playactor_type 演职人员类型(女演员,男演员,制片人,编剧,摄影师)
* @param film_id 报名影片ID
* @param playactor_type 演职人员类型(女演员,男演员,制片人,编剧,摄影师,导演
* @param playactor_name 姓名
* @param playactor_country 国籍
* @param playactor_birthday 出生年月
......@@ -82,9 +82,9 @@ public class Fc_film_playactor implements java.io.Serializable {
* @param playactor_role_name 饰演的角色名
* @param create_time
*/
public Fc_film_playactor(Integer id, Integer film_no, String playactor_type, String playactor_name, String playactor_country, String playactor_birthday, String playactor_film_intro, String playactor_film_nums, String playactor_role_name, Date create_time) {
public Fc_film_playactor(Integer id, Integer film_id, String playactor_type, String playactor_name, String playactor_country, String playactor_birthday, String playactor_film_intro, String playactor_film_nums, String playactor_role_name, Date create_time) {
this.id = id;
this.film_no = film_no;
this.film_id = film_id;
this.playactor_type = playactor_type;
this.playactor_name = playactor_name;
this.playactor_country = playactor_country;
......@@ -103,12 +103,12 @@ public class Fc_film_playactor implements java.io.Serializable {
return id;
}
public void setFilm_no(Integer film_no) {
this.film_no = film_no;
public void setFilm_id(Integer film_id) {
this.film_id = film_id;
}
public Integer getFilm_no() {
return film_no;
public Integer getFilm_id() {
return film_id;
}
public void setPlayactor_type(String playactor_type) {
......
......@@ -22,7 +22,7 @@ public class Fc_film_show implements java.io.Serializable {
/**
* 报名影片ID
*/
private Integer film_no;
private Integer film_id;
/**
* 参加过什么电影节
......@@ -57,16 +57,16 @@ public class Fc_film_show implements java.io.Serializable {
/**
* 全参数构造方法
* @param id
* @param film_no 报名影片ID
* @param film_id 报名影片ID
* @param show_filmfest 参加过什么电影节
* @param show_filmfest_type 参与类型
* @param show_filmfest_date 时间
* @param show_filmfest_intro 简介(获奖或报名奖项等)
* @param create_time
*/
public Fc_film_show(Integer id, Integer film_no, String show_filmfest, String show_filmfest_type, String show_filmfest_date, String show_filmfest_intro, Date create_time) {
public Fc_film_show(Integer id, Integer film_id, String show_filmfest, String show_filmfest_type, String show_filmfest_date, String show_filmfest_intro, Date create_time) {
this.id = id;
this.film_no = film_no;
this.film_id = film_id;
this.show_filmfest = show_filmfest;
this.show_filmfest_type = show_filmfest_type;
this.show_filmfest_date = show_filmfest_date;
......@@ -82,12 +82,12 @@ public class Fc_film_show implements java.io.Serializable {
return id;
}
public void setFilm_no(Integer film_no) {
this.film_no = film_no;
public void setFilm_id(Integer film_id) {
this.film_id = film_id;
}
public Integer getFilm_no() {
return film_no;
public Integer getFilm_id() {
return film_id;
}
public void setShow_filmfest(String show_filmfest) {
......
......@@ -19,3 +19,5 @@ com.egolm.film.email.smtp.is_auth=true
com.egolm.film.email.smtp.from=filmpassword@siff.com
com.egolm.film.email.smtp.username=filmpassword@siff.com
com.egolm.film.email.smtp.password=siffstvf2018
opt.project.type=1
\ No newline at end of file
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