@Override
  public List<PriceData> retrieveAllPrices(Long plan_code, String billingFreq, Long clientId) {

    PriceMapper mapper1 = new PriceMapper();

    String sql =
        "select "
            + mapper1.schema()
            + " and da.plan_id = '"
            + plan_code
            + "' and (c.billfrequency_code='"
            + billingFreq
            + "'  or c.billfrequency_code='Once')"
            + " AND ca.client_id = ?  AND da.price_region_id =pd.priceregion_id AND s.state_name = ca.state And s.parent_code=pd.country_id"
            + " AND pd.state_id = s.id group by da.id";
    return this.jdbcTemplate.query(sql, mapper1, new Object[] {clientId});
  }
예제 #2
0
 private void setUpAppleJuice() {
   appleJuice = new Product("apple juice", "good");
   productMapper.createProduct(appleJuice);
   appleJuicePrice = new Price(120, "kiwi", new Timestamp(114, 1, 1, 0, 0, 0, 0));
   priceMapper.createPrice(appleJuice, appleJuicePrice);
 }