Commit fb69ed8a authored by Quxl's avatar Quxl

x

parent 03391a59
...@@ -9,7 +9,6 @@ import java.util.Date; ...@@ -9,7 +9,6 @@ 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;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.PreparedStatementCreator; import org.springframework.jdbc.core.PreparedStatementCreator;
...@@ -18,7 +17,6 @@ import org.springframework.jdbc.support.KeyHolder; ...@@ -18,7 +17,6 @@ import org.springframework.jdbc.support.KeyHolder;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import com.alibaba.fastjson.JSON;
import com.egolm.common.DateUtil; import com.egolm.common.DateUtil;
import com.egolm.common.StringUtil; import com.egolm.common.StringUtil;
import com.egolm.common.jdbc.JdbcTemplate; import com.egolm.common.jdbc.JdbcTemplate;
...@@ -225,24 +223,6 @@ public class FilmServiceImpl implements FilmService { ...@@ -225,24 +223,6 @@ public class FilmServiceImpl implements FilmService {
jdbcTemplate.executeUpdate(sql, args); jdbcTemplate.executeUpdate(sql, args);
} }
public static void main(String[] args) {
String str = "{\"member_film_id\":[\"4445\"],\"playactor_type\":[\"director\"],\"playactor_name\":[\"siddharth sinha\"],\"playactor_film_nums\":[\"null\"],\"playactor_country\":[\"null\"],\"playactor_birthday\":[\"null\"],\"playactor_intro\":[\"Siddharth Sinha,1978,Compieted his post grauduate aiproma in film direction form Film & Television Institute of India. Jis graduation short film with Indian title UDHERBUN has won SILVER BEAR AWARD at 2008 Berlin International film festival 2008.\"],\"is_play_shanghai\":[\"0\"],\"playactor_role_name\":[\"1) UDHERBUN\\n2) RANGBELA\"]}";
Map<?, ?> map = JSON.parseObject(str);
FilmService s = new FilmServiceImpl();
s.saveMemberFilmPlayactor(
1L,
((List<?>)map.get("playactor_type")).toArray(new String[0]),
((List<?>)map.get("playactor_role_name")).toArray(new String[0]),
((List<?>)map.get("playactor_name")).toArray(new String[0]),
((List<?>)map.get("playactor_film_nums")).toArray(new String[0]),
((List<?>)map.get("playactor_country")).toArray(new String[0]),
((List<?>)map.get("playactor_birthday")).toArray(new String[0]),
((List<?>)map.get("playactor_intro")).toArray(new String[0]),
((List<String>)map.get("is_play_shanghai")).stream().map(Integer::valueOf).collect(Collectors.toList()).toArray(new Integer[0])
);
}
@Override @Override
@Transactional @Transactional
public void saveMemberFilmPlayactor( public void saveMemberFilmPlayactor(
......
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