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);
}
}
}
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