| Line 1... |
Line 1... |
| 1 |
package in.shop2020.mobileapi.serving.utils;
|
1 |
package in.shop2020.mobileapi.serving.utils;
|
| 2 |
|
2 |
|
| 3 |
import in.shop2020.metamodel.util.ContentPojo;
|
3 |
import in.shop2020.metamodel.util.ContentPojo;
|
| 4 |
import in.shop2020.metamodel.util.ProductPojo;
|
4 |
import in.shop2020.metamodel.util.ProductPojo;
|
| - |
|
5 |
import in.shop2020.mobileapi.serving.cache.EhcacheWrapper;
|
| 5 |
import in.shop2020.mobileapi.serving.pojos.CartLinePojo;
|
6 |
import in.shop2020.mobileapi.serving.pojos.CartLinePojo;
|
| 6 |
import in.shop2020.mobileapi.serving.pojos.CartPojo;
|
7 |
import in.shop2020.mobileapi.serving.pojos.CartPojo;
|
| 7 |
import in.shop2020.mobileapi.serving.pojos.MenuPojo;
|
8 |
import in.shop2020.mobileapi.serving.pojos.MenuPojo;
|
| 8 |
import in.shop2020.mobileapi.serving.pojos.RechargeAmountPojo;
|
9 |
import in.shop2020.mobileapi.serving.pojos.RechargeAmountPojo;
|
| 9 |
import in.shop2020.model.v1.catalog.CatalogService;
|
10 |
import in.shop2020.model.v1.catalog.CatalogService;
|
| Line 14... |
Line 15... |
| 14 |
import in.shop2020.storage.mongo.StorageManager;
|
15 |
import in.shop2020.storage.mongo.StorageManager;
|
| 15 |
import in.shop2020.thrift.clients.CatalogClient;
|
16 |
import in.shop2020.thrift.clients.CatalogClient;
|
| 16 |
|
17 |
|
| 17 |
import java.util.ArrayList;
|
18 |
import java.util.ArrayList;
|
| 18 |
import java.util.List;
|
19 |
import java.util.List;
|
| - |
|
20 |
import java.util.Map;
|
| - |
|
21 |
|
| - |
|
22 |
import net.sf.ehcache.CacheManager;
|
| 19 |
|
23 |
|
| 20 |
import org.apache.commons.lang.StringUtils;
|
24 |
import org.apache.commons.lang.StringUtils;
|
| 21 |
import org.apache.log4j.Logger;
|
25 |
import org.apache.log4j.Logger;
|
| 22 |
|
26 |
|
| 23 |
import com.google.gson.Gson;
|
27 |
import com.google.gson.Gson;
|
| 24 |
|
28 |
|
| 25 |
public class PojoPopulator {
|
29 |
public class PojoPopulator {
|
| 26 |
|
30 |
|
| 27 |
public static Gson gson = new Gson();
|
31 |
public static Gson gson = new Gson();
|
| 28 |
private static Logger log = Logger.getLogger(PojoPopulator.class);
|
32 |
private static Logger log = Logger.getLogger(PojoPopulator.class);
|
| - |
|
33 |
|
| - |
|
34 |
static EhcacheWrapper<Long, Map<String, Object>> skuCache = new EhcacheWrapper<Long, Map<String, Object>>(
|
| - |
|
35 |
EhcacheWrapper.SKU_CACHE, CacheManager.create());
|
| 29 |
|
36 |
|
| 30 |
public static List<MenuPojo> getCurrentMenu() {
|
37 |
public static List<MenuPojo> getCurrentMenu() {
|
| 31 |
List<MenuPojo> finalList = new ArrayList<MenuPojo>();
|
38 |
List<MenuPojo> finalList = new ArrayList<MenuPojo>();
|
| 32 |
List<MenuPojo> children = new ArrayList<MenuPojo>();
|
39 |
List<MenuPojo> children = new ArrayList<MenuPojo>();
|
| 33 |
List<MenuPojo> children1 = new ArrayList<MenuPojo>();
|
40 |
List<MenuPojo> children1 = new ArrayList<MenuPojo>();
|