Commit 3fb8675f authored by Quxl's avatar Quxl

x

parent 11680c6f
...@@ -136,6 +136,8 @@ public interface FilmService { ...@@ -136,6 +136,8 @@ public interface FilmService {
void allot(Long member_film_id, Integer review_round, Integer[] user_id); void allot(Long member_film_id, Integer review_round, Integer[] user_id);
void saveUploadInfo(Long member_film_id, String upload_id, Integer upload_state); void saveUploadId(Long member_film_id, String upload_id);
void saveUploadState(Long member_film_id, Integer upload_state);
} }
...@@ -5,6 +5,7 @@ import java.sql.PreparedStatement; ...@@ -5,6 +5,7 @@ import java.sql.PreparedStatement;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.Statement; import java.sql.Statement;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -514,14 +515,13 @@ public class FilmServiceImpl implements FilmService { ...@@ -514,14 +515,13 @@ public class FilmServiceImpl implements FilmService {
} }
@Override @Override
public void saveUploadInfo(Long member_film_id, String upload_id, Integer upload_state) { public void saveUploadId(Long member_film_id, String upload_id) {
Fc_member_film film = new Fc_member_film(); jdbcTemplate.executeUpdate("update fc_member_film set upload_id = ?, upload_time = ? where id = ?", upload_id, new Date(), member_film_id);
film.setId(member_film_id);
film.setUpload_state(upload_state);
if(StringUtil.isNotBlank(upload_id)) {
film.setUpload_id(upload_id);
} }
jdbcTemplate.merge(film);
@Override
public void saveUploadState(Long member_film_id, Integer upload_state) {
jdbcTemplate.executeUpdate("update fc_member_film set upload_state = ? where id = ?", upload_state, member_film_id);
} }
} }
...@@ -170,15 +170,26 @@ public class AdminFirstController { ...@@ -170,15 +170,26 @@ public class AdminFirstController {
} }
@ResponseBody @ResponseBody
@PostMapping("save_upload_info") @PostMapping("save_upload_id")
@ApiOperation("保存上传状态和上传ID") @ApiOperation("保存上传状态和上传ID")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="member_film_id", value="申报影片ID"), @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"), @ApiImplicitParam(paramType="query", dataType="string", required=true, name="upload_id", value="影片上传ID"),
})
public Object save_upload_id(Long member_film_id, String upload_id) {
memberFilmService.saveUploadId(member_film_id, upload_id);
return Rjx.jsonOk();
}
@ResponseBody
@PostMapping("save_upload_info")
@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已完成)"), @ApiImplicitParam(paramType="query", dataType="int", required=true, name="upload_state", value="影片上传状态(0上传中,1已完成)"),
}) })
public Object save_upload_info(Long member_film_id, String upload_id, Integer upload_state) { public Object save_upload_info(Long member_film_id, Integer upload_state) {
memberFilmService.saveUploadInfo(member_film_id, upload_id, upload_state); memberFilmService.saveUploadState(member_film_id, upload_state);
return Rjx.jsonOk(); return Rjx.jsonOk();
} }
......
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