首页 > 代码库 > 把查询出来的结果进行修改再赋值给list
把查询出来的结果进行修改再赋值给list
List<RivBillNoPatternL> list = this.jdbcTemplate.getJdbcOperations().query(sqlSb.toString(), params.toArray(), new RowMapper<RivBillNoPatternL>(){ @Override public RivBillNoPatternL mapRow(ResultSet rs, int rowNum) throws SQLException { RivBillNoPatternL billNoPatternL = new RivBillNoPatternL(); billNoPatternL.setBnplId(rs.getInt("bnpl_id")); billNoPatternL.setBnplHeaderId(rs.getInt("bnpl_header_id")); billNoPatternL.setBnplOrder(rs.getBigDecimal("bnpl_order")); billNoPatternL.setBnplPatternType(rs.getString("bnpl_pattern_type")); billNoPatternL.setBnplPattern(rs.getString("bnpl_pattern")); billNoPatternL.setBnplResetNumber(rs.getBigDecimal("bnpl_reset_number")); return billNoPatternL; }});
final List<RivExpiredWarningL> list = new ArrayList<RivExpiredWarningL>(); final Date date = new Date(); jdbcTemplate.query(sql, params.toArray(),new RowCallbackHandler(){ @Override public void processRow(ResultSet rs) throws SQLException { RivExpiredWarningL exw = new RivExpiredWarningL(); exw.setExwWarningDatetime(date); exw.setExwOrgId(rs.getInt(1)); exw.setExwOwnerId(rs.getInt(2)); exw.setExwQuantId(rs.getInt(3)); list.add(exw); } }); return list;
把查询出来的结果进行修改再赋值给list
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。