コード例 #1
0
  @Override
  public AdWebTrxInfo getAdWebTrxInfoByTrxId(String trxOrderId) {
    String sql =
        "select bai.trxorderid,bai.adweb_cid,bai.adweb_wi,bai.buycount,bai.ordermoney,bai.ordertime,bai.userid,ba.adweb_trxurl from beiker_adwebtrxinfo bai left join beiker_adweb ba on bai.adwebid=adweb_id where trxorderid=?";
    List list = getSimpleJdbcTemplate().queryForList(sql, trxOrderId);

    if (list == null || list.size() == 0) return null;
    AdWebTrxInfo ati = new AdWebTrxInfo();
    Map map = (Map) list.get(0);
    ati.setTrxorderid((String) map.get(("trxorderid")));
    ati.setAdcid((String) map.get("adweb_cid"));
    ati.setAdwi((String) map.get("adweb_wi"));
    ati.setBuycount(((Number) map.get("buycount")).intValue());
    ati.setOrderMoney(((Number) map.get("ordermoney")).doubleValue());
    ati.setOrderTime((Timestamp) map.get("ordertime"));
    ati.setAdweb_trxurl((String) map.get(("adweb_trxurl")));
    return ati;
  }
コード例 #2
0
    @Override
    public AdWebTrxInfo mapRow(ResultSet rs, int num) throws SQLException {

      AdWebTrxInfo adWebTrxInfo = new AdWebTrxInfo();
      adWebTrxInfo.setAdWebTrxId(rs.getLong("adwebtrx_id"));
      adWebTrxInfo.setTrxorderid(rs.getString("trxorderid"));
      adWebTrxInfo.setAdcid(rs.getString("adweb_cid"));
      adWebTrxInfo.setAdwebid(rs.getLong("adwebid"));
      adWebTrxInfo.setAdwi(rs.getString("adweb_wi"));
      adWebTrxInfo.setBuycount(rs.getInt("buycount"));
      adWebTrxInfo.setOrderMoney(rs.getDouble("ordermoney"));
      adWebTrxInfo.setOrderTime(rs.getTimestamp("ordertime"));

      String adweb_trxurl = rs.getString("adweb_trxurl");
      if (adweb_trxurl != null) {
        adWebTrxInfo.setAdweb_trxurl(adweb_trxurl);
      }

      return adWebTrxInfo;
    }