if(!sqlBuildMap.isEmpty()){ Set<Entry<String, StringBuffer>> entrySet = sqlBuildMap.entrySet(); for(Entry<String, StringBuffer> entry : entrySet){ String key_table_src = entry.getKey().split("#")[0]; String key_table_dest = entry.getKey().split("#")[1]; //达到这样的效果:select A as D,B as E,C as F from table1 String selectSql = "select "+entry.getValue()+" from "+key_table_src; //TODO 使用SQLQuery进行查询得到List<Map> //假设获取的结果是List<Map> srcDataList List<Map<String,Object>> srcDataList = new ArrayList<Map<String,Object>>(); //这时候可以有两种选择:1.转化成对象进行保存;2.拼接sql语句进行插入操作
时间: 2024-12-23 04:10:20