Commit 50016f92 authored by 张永's avatar 张永

1

parent 8e685394
......@@ -35,6 +35,7 @@ import com.egolm.film.bean.model.Fc_member_film_base_model;
import com.egolm.film.config.WebMvcConfig;
import com.egolm.film.config.XException;
import com.egolm.film.config.XRException;
import com.egolm.film.util.FilmContrants;
import com.egolm.film.util.SqlWhere;
......@@ -635,15 +636,25 @@ public class FilmServiceImpl implements FilmService {
@Override
public void updateFilmUploadState(String[] film_id,String[] number) {
if(film_id.length == number.length) {
List<Object[]> objs = new ArrayList<Object[]>();
List<Object[]> uploadObjs = new ArrayList<Object[]>();
List<Object[]> filmObjs = new ArrayList<Object[]>();
for(int i = 0; i < film_id.length; i++) {
objs.add(new Object[]{
uploadObjs.add(new Object[]{
FilmContrants.UPLOAD_STATUS_INIT,
film_id[i],
number[i]});
filmObjs.add(new Object[]{
FilmContrants.UPLOAD_STATUS_INIT,
film_id[i]});
}
String sql = "update fc_film_upload set upload_state = 0 ,upload__error_message= '',upload_progress='0%' where film_id = ? and number = ? ";
jdbcTemplate.batchUpdate(sql, objs);
String updateSql = "update fc_film_upload set upload_state = ? ,upload__error_message= '',upload_progress='0%' where film_id = ? and number = ? ";
jdbcTemplate.batchUpdate(updateSql, uploadObjs);
String filmSql = "update fc_member_film set upload_state = ? where film_no = ? ";
jdbcTemplate.batchUpdate(filmSql, filmObjs);
}
}
}
package com.egolm.film.api.web.admin;
import java.io.IOException;
import java.net.URLEncoder;
import java.text.MessageFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.egolm.common.DateUtil;
import com.egolm.common.Util;
import com.egolm.common.bean.Rjx;
import com.egolm.common.jdbc.Page;
import com.egolm.film.api.service.AdminTokenService;
import com.egolm.film.api.service.EmailService;
import com.egolm.film.api.service.ExportService;
import com.egolm.film.api.service.FilmService;
import com.egolm.film.api.service.ReviewService;
import com.egolm.film.bean.Fc_admin;
import com.egolm.film.bean.Fc_member_film;
import com.egolm.film.model.LoginToken;
import com.egolm.film.util.Common;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
/**
* 初审
* @author Quxl
*
*/
@Api
@Controller
@RequestMapping("admin/first")
public class AdminFirstController {
Logger logger = LoggerFactory.getLogger(AdminFirstController.class);
@Autowired
FilmService filmService;
@Autowired
AdminTokenService tokenService;
@Autowired
EmailService emailService;
@Autowired
ReviewService reviewService;
@Autowired
ExportService exportService;
@ResponseBody
@PostMapping("list")
@ApiOperation("影片列表")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="string", required=false, name="keyword", value="关键字"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="state", value="影片状态 1未提交 2 已提交"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="apply_state", value="初审状态 1未初审 2初审通过 3初审否决"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="film_type", value="影片类型"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="enroll_type", value="影片性质"),
@ApiImplicitParam(paramType="query", dataType="string", required=false, name="film_country", value="影片国家地区"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="film_type_short", value="影片扩展分类"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="upload_state", value="影片文件上传状态(0,1)"),
@ApiImplicitParam(paramType="query", dataType="string", required=false, name="play_shanghai", value="首映情况"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="review_round", value="审片轮数,第几轮审片"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="review_state", value="审片结论 1通过 2否决 3参赛 4参赛备选 5参展"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="allot_atate", value="评委分配状态 0未分配评委 1已分配评委评选中"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="opt_state", value="评选状态 0未评选 1有争议 2管理员分配 3已完成"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="film_group_id", value="影片分组ID"),
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="index", value="分页编号"),
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="limit", value="分页大小"),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="limitKey", value="排序"),
})
public Object list(
String keyword, String film_country, String play_shanghai,
Integer state, Integer apply_state, Integer film_type, Integer enroll_type, Integer upload_state, Integer film_type_short,
Integer review_round, Integer review_state, Integer allot_atate, Integer opt_state, Integer[] film_group_id,
Long index,
Long limit,
String[] limitKey,
HttpServletRequest request,
HttpServletResponse response) throws IOException {
index = index == null ? 1 : index;
limit = limit == null ? 20 : limit;
Page page = new Page(index, limit, limitKey);
Fc_admin admin = Util.mapTo(tokenService.getTokenObj(), Fc_admin.class);
List<Map<String, Object>> list = filmService.queryFilmList(admin.getGroup_id(), keyword, state, apply_state, upload_state, film_type, enroll_type, film_country, film_type_short, play_shanghai, review_round, review_state, allot_atate, opt_state, film_group_id, page);
return Rjx.jsonOk().setData(list).setPage(page);
}
@ResponseBody
@Transactional
@PostMapping("pass")
@ApiOperation("初审通过")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="member_film_id", value="申报影片ID"),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="film_type_name_short", value="影片分类扩展分类"),
})
public Object pass(Long member_film_id, String film_type_name_short) {
filmService.verifyFilmDuplicate(member_film_id);
Fc_member_film film = new Fc_member_film();
LoginToken token = tokenService.getToken();
Integer adminid = (Integer)token.getId();
film.setId(member_film_id);
film.setFilm_type_name_short(film_type_name_short);
film.setFirst_admin_id(adminid);
film.setApply_state(2);
film.setUpload_state(0);
film.setPass_time(System.currentTimeMillis()/1000);
filmService.mergeMemberFilm(film);
filmService.pass(member_film_id);
reviewService.toFirstRound(member_film_id);
Map<String, Object> map = emailService.sendByTemplate_01(member_film_id, "doc/first_pass");
Rjx rjx = Rjx.jsonOk();
rjx.putAll(map);
filmService.initKeywords(member_film_id);
return rjx;
}
@ResponseBody
@PostMapping("reject")
@ApiOperation("初审驳回")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="member_film_id", value="申报影片ID"),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="apply_state_intro", value="拒绝理由,初审结论"),
@ApiImplicitParam(paramType="query", dataType="boolean", required=false, name="is_stop_apply", value="true否决 false驳回"),
})
public Object reject(Boolean is_stop_apply, Long member_film_id, String apply_state_intro) {
if(is_stop_apply == null) {
is_stop_apply = false;
}
filmService.reject(is_stop_apply, member_film_id, apply_state_intro);
return Rjx.jsonOk();
}
@ResponseBody
@PostMapping("testMail")
@ApiOperation("初审通过邮件通知测试")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", dataType="string", required=true, name="i18n_language"),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="email")
})
public Object testMail(String email, HttpServletRequest request) {
String i18n_language = request.getHeader("i18n_language");
String[] strs = i18n_language.split("_", 2);
String content = Common.getStringAsStream("doc/first_pass_" + strs[0].toLowerCase() + "_" + strs[1].toUpperCase() + ".txt");
content = MessageFormat.format(content, "曲欣亮", "00001", "蜘蛛侠");
LoginToken token = tokenService.getToken();
Integer adminid = (Integer)token.getId();
emailService.send(2, adminid, "测试邮件", content, email);
return Rjx.jsonOk();
}
@ResponseBody
@PostMapping("save_upload_id")
@ApiOperation("保存上传状态和上传ID")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="member_film_id", value="申报影片ID"),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="upload_id", value="影片上传ID"),
})
public Object save_upload_id(Long member_film_id, String upload_id) {
filmService.saveUploadId(member_film_id, upload_id);
return Rjx.jsonOk();
}
@ResponseBody
@PostMapping("save_upload_state")
@ApiOperation("保存上传状态和上传ID")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="member_film_id", value="申报影片ID"),
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="upload_state", value="影片上传状态(0未上传, 1已上传)"),
})
public Object save_upload_state(Long member_film_id, Integer upload_state) {
filmService.saveUploadState(member_film_id, upload_state);
return Rjx.jsonOk();
package com.egolm.film.api.web.admin;
import java.io.IOException;
import java.net.URLEncoder;
import java.text.MessageFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.egolm.common.DateUtil;
import com.egolm.common.Util;
import com.egolm.common.bean.Rjx;
import com.egolm.common.jdbc.Page;
import com.egolm.film.api.service.AdminTokenService;
import com.egolm.film.api.service.EmailService;
import com.egolm.film.api.service.ExportService;
import com.egolm.film.api.service.FilmService;
import com.egolm.film.api.service.ReviewService;
import com.egolm.film.bean.Fc_admin;
import com.egolm.film.bean.Fc_member_film;
import com.egolm.film.model.LoginToken;
import com.egolm.film.util.Common;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
/**
* 初审
* @author Quxl
*
*/
@Api
@Controller
@RequestMapping("admin/first")
public class AdminFirstController {
Logger logger = LoggerFactory.getLogger(AdminFirstController.class);
@Autowired
FilmService filmService;
@Autowired
AdminTokenService tokenService;
@Autowired
EmailService emailService;
@Autowired
ReviewService reviewService;
@Autowired
ExportService exportService;
@ResponseBody
@PostMapping("list")
@ApiOperation("影片列表")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="string", required=false, name="keyword", value="关键字"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="state", value="影片状态 1未提交 2 已提交"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="apply_state", value="初审状态 1未初审 2初审通过 3初审否决"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="film_type", value="影片类型"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="enroll_type", value="影片性质"),
@ApiImplicitParam(paramType="query", dataType="string", required=false, name="film_country", value="影片国家地区"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="film_type_short", value="影片扩展分类"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="upload_state", value="影片文件上传状态(0,1)"),
@ApiImplicitParam(paramType="query", dataType="string", required=false, name="play_shanghai", value="首映情况"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="review_round", value="审片轮数,第几轮审片"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="review_state", value="审片结论 1通过 2否决 3参赛 4参赛备选 5参展"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="allot_atate", value="评委分配状态 0未分配评委 1已分配评委评选中"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="opt_state", value="评选状态 0未评选 1有争议 2管理员分配 3已完成"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="film_group_id", value="影片分组ID"),
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="index", value="分页编号"),
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="limit", value="分页大小"),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="limitKey", value="排序"),
})
public Object list(
String keyword, String film_country, String play_shanghai,
Integer state, Integer apply_state, Integer film_type, Integer enroll_type, Integer upload_state, Integer film_type_short,
Integer review_round, Integer review_state, Integer allot_atate, Integer opt_state, Integer[] film_group_id,
Long index,
Long limit,
String[] limitKey,
HttpServletRequest request,
HttpServletResponse response) throws IOException {
index = index == null ? 1 : index;
limit = limit == null ? 20 : limit;
Page page = new Page(index, limit, limitKey);
Fc_admin admin = Util.mapTo(tokenService.getTokenObj(), Fc_admin.class);
List<Map<String, Object>> list = filmService.queryFilmList(admin.getGroup_id(), keyword, state, apply_state, upload_state, film_type, enroll_type, film_country, film_type_short, play_shanghai, review_round, review_state, allot_atate, opt_state, film_group_id, page);
return Rjx.jsonOk().setData(list).setPage(page);
}
@ResponseBody
@Transactional
@PostMapping("pass")
@ApiOperation("初审通过")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="member_film_id", value="申报影片ID"),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="film_type_name_short", value="影片分类扩展分类"),
})
public Object pass(Long member_film_id, String film_type_name_short) {
filmService.verifyFilmDuplicate(member_film_id);
Fc_member_film film = new Fc_member_film();
LoginToken token = tokenService.getToken();
Integer adminid = (Integer)token.getId();
film.setId(member_film_id);
film.setFilm_type_name_short(film_type_name_short);
film.setFirst_admin_id(adminid);
film.setApply_state(2);
film.setUpload_state(0);
film.setPass_time(System.currentTimeMillis()/1000);
filmService.mergeMemberFilm(film);
filmService.pass(member_film_id);
reviewService.toFirstRound(member_film_id);
Map<String, Object> map = emailService.sendByTemplate_01(member_film_id, "doc/first_pass");
Rjx rjx = Rjx.jsonOk();
rjx.putAll(map);
filmService.initKeywords(member_film_id);
return rjx;
}
@ResponseBody
@PostMapping("reject")
@ApiOperation("初审驳回")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="member_film_id", value="申报影片ID"),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="apply_state_intro", value="拒绝理由,初审结论"),
@ApiImplicitParam(paramType="query", dataType="boolean", required=false, name="is_stop_apply", value="true否决 false驳回"),
})
public Object reject(Boolean is_stop_apply, Long member_film_id, String apply_state_intro) {
if(is_stop_apply == null) {
is_stop_apply = false;
}
filmService.reject(is_stop_apply, member_film_id, apply_state_intro);
return Rjx.jsonOk();
}
@ResponseBody
@PostMapping("testMail")
@ApiOperation("初审通过邮件通知测试")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", dataType="string", required=true, name="i18n_language"),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="email")
})
public Object testMail(String email, HttpServletRequest request) {
String i18n_language = request.getHeader("i18n_language");
String[] strs = i18n_language.split("_", 2);
String content = Common.getStringAsStream("doc/first_pass_" + strs[0].toLowerCase() + "_" + strs[1].toUpperCase() + ".txt");
content = MessageFormat.format(content, "曲欣亮", "00001", "蜘蛛侠");
LoginToken token = tokenService.getToken();
Integer adminid = (Integer)token.getId();
emailService.send(2, adminid, "测试邮件", content, email);
return Rjx.jsonOk();
}
@ResponseBody
@PostMapping("save_upload_id")
@ApiOperation("保存上传状态和上传ID")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="member_film_id", value="申报影片ID"),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="upload_id", value="影片上传ID"),
})
public Object save_upload_id(Long member_film_id, String upload_id) {
filmService.saveUploadId(member_film_id, upload_id);
return Rjx.jsonOk();
}
@ResponseBody
@PostMapping("save_upload_state")
@ApiOperation("保存上传状态和上传ID")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="member_film_id", value="申报影片ID"),
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="upload_state", value="影片上传状态(0未上传, 1已上传)"),
})
public Object save_upload_state(Long member_film_id, Integer upload_state) {
filmService.saveUploadState(member_film_id, upload_state);
return Rjx.jsonOk();
}
@ResponseBody
......@@ -207,62 +207,78 @@ public class AdminFirstController {
Page page = new Page(index, limit);
List<Map<String, Object>> list = filmService.queryMonitorUploadList(keyword,upload_state,page);
return Rjx.jsonOk().setData(list).setPage(page);
}
@ResponseBody
@PostMapping("update_state")
@ApiOperation("修改影片状态")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="member_film_id", value="影片ID"),
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="state", value="影片状态:1未提交 2已提交"),
})
public Object update_state(Long member_film_id, Integer state) {
filmService.updateFilmState(member_film_id, state);
return Rjx.jsonOk();
}
@ResponseBody
@PostMapping("exchangeFilmNo")
@ApiOperation("交换影片编号, id1影片会被更新初审待审核状态,id2影片会被更新为初审否决状态")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="id1", value="做为主影片,会被保留,状态重置为初审待审核"),
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="id2", value="编号会被替换,并且状态会重置为初审否决"),
})
public Object exchangeFilmNo(Integer id1, Integer id2) {
filmService.exchangeFilmNo(id1, id2);
filmService.initKeywords(id1.longValue());
filmService.initKeywords(id2.longValue());
return Rjx.jsonOk();
}
@ResponseBody
@PostMapping("getApplyListColumns")
@ApiOperation("获取报名列表导出列")
public Object getApplyListColumns() {
return Rjx.jsonOk().setData(exportService.getApplyListColumns());
}
@GetMapping("exportApplyList")
@ApiOperation("导出报名列表")
public void exportApplyList(HttpServletResponse response, String[] columns) throws IOException {
response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("报名列表[" + DateUtil.format(new Date(), "yyMMdd-HHmmss") + "].xls", "UTF-8"));
exportService.exportApplyList(response.getOutputStream(), columns);
}
@ResponseBody
@PostMapping("getApplyPassListColumns")
@ApiOperation("获取影片列表导出列")
public Object getApplyPassListColumns() {
return Rjx.jsonOk().setData(exportService.getApplyPassListColumns());
}
@GetMapping("exportApplyPassList")
@ApiOperation("导出影片列表")
public void exportApplyPassList(HttpServletResponse response, String[] columns) throws IOException {
response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("影片列表[" + DateUtil.format(new Date(), "yyMMdd-HHmmss") + "].xls", "UTF-8"));
exportService.exportApplyPassList(response.getOutputStream(), columns);
}
}
@ResponseBody
@PostMapping("batch_update_state")
@ApiOperation("批量修改上传列表状态")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="int", allowMultiple=true, required=true, name="film_id", value="影片ID"),
@ApiImplicitParam(paramType="query", dataType="int", allowMultiple=true, required=true, name="number", value="第几集"),
})
public Object batch_update_state(HttpServletRequest req) {
String[] film_id = req.getParameterValues("film_id");
String[] number = req.getParameterValues("number");
filmService.updateFilmUploadState(film_id, number);
return Rjx.jsonOk();
}
@ResponseBody
@PostMapping("update_state")
@ApiOperation("修改影片状态")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="member_film_id", value="影片ID"),
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="state", value="影片状态:1未提交 2已提交"),
})
public Object update_state(Long member_film_id, Integer state) {
filmService.updateFilmState(member_film_id, state);
return Rjx.jsonOk();
}
@ResponseBody
@PostMapping("exchangeFilmNo")
@ApiOperation("交换影片编号, id1影片会被更新初审待审核状态,id2影片会被更新为初审否决状态")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="id1", value="做为主影片,会被保留,状态重置为初审待审核"),
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="id2", value="编号会被替换,并且状态会重置为初审否决"),
})
public Object exchangeFilmNo(Integer id1, Integer id2) {
filmService.exchangeFilmNo(id1, id2);
filmService.initKeywords(id1.longValue());
filmService.initKeywords(id2.longValue());
return Rjx.jsonOk();
}
@ResponseBody
@PostMapping("getApplyListColumns")
@ApiOperation("获取报名列表导出列")
public Object getApplyListColumns() {
return Rjx.jsonOk().setData(exportService.getApplyListColumns());
}
@GetMapping("exportApplyList")
@ApiOperation("导出报名列表")
public void exportApplyList(HttpServletResponse response, String[] columns) throws IOException {
response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("报名列表[" + DateUtil.format(new Date(), "yyMMdd-HHmmss") + "].xls", "UTF-8"));
exportService.exportApplyList(response.getOutputStream(), columns);
}
@ResponseBody
@PostMapping("getApplyPassListColumns")
@ApiOperation("获取影片列表导出列")
public Object getApplyPassListColumns() {
return Rjx.jsonOk().setData(exportService.getApplyPassListColumns());
}
@GetMapping("exportApplyPassList")
@ApiOperation("导出影片列表")
public void exportApplyPassList(HttpServletResponse response, String[] columns) throws IOException {
response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("影片列表[" + DateUtil.format(new Date(), "yyMMdd-HHmmss") + "].xls", "UTF-8"));
exportService.exportApplyPassList(response.getOutputStream(), columns);
}
}
\ 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