| | |
| | | |
| | | // 执行查询并处理结果 |
| | | ResultSet rs = pstmt.executeQuery(); |
| | | ResultSetMetaData meta = rs.getMetaData(); |
| | | boolean colCount = rs.next(); |
| | | if(!colCount){ |
| | | pstmt.setString(1, lastMonth); |
| | | meta = rs.getMetaData(); |
| | | rs = pstmt.executeQuery(); |
| | | colCount = rs.next(); |
| | | if(!colCount){ |
| | |
| | | } |
| | | } |
| | | byqlzAdsService.delete(yearMonth); |
| | | |
| | | while (rs.next()) { |
| | | while (colCount) { |
| | | ByqlzAdsEntity entity = new ByqlzAdsEntity(); |
| | | |
| | | // 映射基础字段 |
| | |
| | | case 7: entity.setVal7(val); break; |
| | | case 8: entity.setVal8(val); break; |
| | | case 9: entity.setVal9(val); break; |
| | | case 10: entity.setVal11(val); break; |
| | | case 11: entity.setVal12(val); break; |
| | | case 12: entity.setVal13(val); break; |
| | | case 13: entity.setVal14(val); break; |
| | | case 14: entity.setVal2(val); break; |
| | | case 10: entity.setVal10(val); break; |
| | | case 11: entity.setVal11(val); break; |
| | | case 12: entity.setVal12(val); break; |
| | | case 13: entity.setVal13(val); break; |
| | | case 14: entity.setVal14(val); break; |
| | | case 15: entity.setVal15(val); break; |
| | | case 16: entity.setVal16(val); break; |
| | | case 17: entity.setVal17(val); break; |
| | |
| | | } |
| | | } |
| | | |
| | | entity.setLoadTime(currentDate); |
| | | entity.setLoadTime(rs.getString("LOAD_TIME")); |
| | | resultList.add(entity); |
| | | } |
| | | |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | logger.info("SyncEmsTask运行完成"); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | SyncEmsTask task = new SyncEmsTask(); |
| | | String params = ""; |
| | | task.run(params); |
| | | } |
| | | } |