Commit b222f286 authored by 张永's avatar 张永

1

parent 3496fd5e
......@@ -37,6 +37,9 @@ public class OtherUploadServiceImpl implements OtherUploadService {
if(StringUtil.isNotEmpty(taskName)) {
String sql = "update fc_film_upload set id = ? ,upload_state = ? ,upload_progress = '0%' ,taskName=? where film_id = ? and number = ? ";
jdbcTemplate.executeUpdate(sql,videoId,FilmContrants.UPLOAD_STATUS_ING,taskName,film_id,number);
String filmSql = "update fc_member_film set upload_id =?, upload_state = ? where id = ? ";
jdbcTemplate.executeUpdate(filmSql, videoId,FilmContrants.UPLOAD_STATUS_ING,film_id);
}else {
String sql = "update fc_film_upload set id = ? ,upload_state = ? ,upload_progress = '0%' where film_id = ? and number = ? ";
jdbcTemplate.executeUpdate(sql,videoId,FilmContrants.UPLOAD_STATUS_ING,film_id,number);
......@@ -52,16 +55,24 @@ public class OtherUploadServiceImpl implements OtherUploadService {
public void updateSuccess(String videoId) {
String sql = "update fc_film_upload set upload_time = now() ,file_local_path = '' ,upload_state = ? where id = ? ";
jdbcTemplate.executeUpdate(sql,FilmContrants.UPLOAD_STATUS_COMPLETED,videoId);
String filmSql = "update fc_member_film set upload_state = ? ,upload_time =now() where upload_id = ? ";
jdbcTemplate.executeUpdate(filmSql, FilmContrants.UPLOAD_STATUS_COMPLETED,videoId);
}
//上传失败
public void updateFail(String videoId,String errorMessage) {
String sql = "update fc_film_upload set upload__error_message =? ,upload_state = ? where id = ? ";
jdbcTemplate.executeUpdate(sql, errorMessage,FilmContrants.UPLOAD_STATUS_FILE,videoId);
String filmSql = "update fc_member_film set upload_state = ? where upload_id = ? ";
jdbcTemplate.executeUpdate(filmSql,FilmContrants.UPLOAD_STATUS_FILE,videoId);
}
public void updateFail(Integer film_id,Integer number,String errorMessage) {
String sql = "update fc_film_upload set upload__error_message =? ,upload_state = ? where film_id = ? and number = ? ";
jdbcTemplate.executeUpdate(sql, errorMessage,FilmContrants.UPLOAD_STATUS_FILE,film_id,number);
}
/**
......
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