| Line 157... |
Line 157... |
| 157 |
JSONObject doc = docs.getJSONObject(i);
|
157 |
JSONObject doc = docs.getJSONObject(i);
|
| 158 |
FofoDealResponse ffdr = new FofoDealResponse();
|
158 |
FofoDealResponse ffdr = new FofoDealResponse();
|
| 159 |
ffdr.setCatalogId(doc.getInt("catalogId_i"));
|
159 |
ffdr.setCatalogId(doc.getInt("catalogId_i"));
|
| 160 |
ffdr.setImageUrl(doc.getString("imageUrl_s"));
|
160 |
ffdr.setImageUrl(doc.getString("imageUrl_s"));
|
| 161 |
ffdr.setTitle(doc.getString("title_s"));
|
161 |
ffdr.setTitle(doc.getString("title_s"));
|
| 162 |
for(int j=0; j< doc.getJSONArray("_childItems_").length(); j++) {
|
162 |
for(int j=0; j< doc.getJSONArray("_childDocuments_").length(); j++) {
|
| 163 |
JSONObject childItem = doc.getJSONArray("_childItems_").getJSONObject(j);
|
163 |
JSONObject childItem = doc.getJSONArray("_childDocuments_").getJSONObject(j);
|
| 164 |
int itemId = childItem.getInt("itemId_i");
|
164 |
int itemId = childItem.getInt("itemId_i");
|
| 165 |
float sellingPrice = (float)childItem.getDouble("sellingPrice_f");
|
165 |
float sellingPrice = (float)childItem.getDouble("sellingPrice_f");
|
| 166 |
if(itemPricing.containsKey(itemId)) {
|
166 |
if(itemPricing.containsKey(itemId)) {
|
| 167 |
if(itemPricing.get(itemId).getSellingPrice() > sellingPrice) {
|
167 |
if(itemPricing.get(itemId).getSellingPrice() > sellingPrice) {
|
| 168 |
itemPricing.get(itemId).setSellingPrice(sellingPrice);
|
168 |
itemPricing.get(itemId).setSellingPrice(sellingPrice);
|