zoukankan      html  css  js  c++  java
  • 把查询出来的结果进行修改再赋值给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;
  • 相关阅读:
    JS对象
    常见简单算法的实现
    JavaScript基础
    CSS3 边框 border-image
    HTTP消息头详解
    apache安装
    常见访问错误整理
    apache虚拟主机配置
    apache配置项
    Windows下使用ssh-add报错 Error connecting to agent: No such file or directory
  • 原文地址:https://www.cnblogs.com/tonggc1668/p/7018158.html
Copyright © 2011-2022 走看看