Subversion Repositories SmartDukaan

Rev

Rev 14374 | Rev 15164 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14374 Rev 14385
Line 11... Line 11...
11
import com.mongodb.util.JSON;
11
import com.mongodb.util.JSON;
12
 
12
 
13
 
13
 
14
public class LivePricingController extends BaseController{
14
public class LivePricingController extends BaseController{
15
    private static Logger log = Logger.getLogger(Class.class);
15
    private static Logger log = Logger.getLogger(Class.class);
-
 
16
    
16
    private static final long serialVersionUID = 1L;
17
    private static final long serialVersionUID = 1L;
17
    private String id;
-
 
18
    public String getSource_id() {
-
 
19
        return source_id;
-
 
20
    }
18
    
21
 
-
 
22
    public void setSource_id(String source_id) {
19
    private String skuBundleId;
23
        this.source_id = source_id;
-
 
24
    }
-
 
25
 
-
 
26
 
20
 
27
    private String source_id;
21
    private String source_id;
28
 
22
 
29
 
-
 
30
    public String index(){
23
    public String index(){
31
        Gson gs = new Gson();
24
        Gson gs = new Gson();
32
        Client dc = null;
25
        Client dc = null;
33
        try {
26
        try {
34
            dc = new DtrClient().getClient();
27
            dc = new DtrClient().getClient();
35
            log.info("Insode try");
-
 
36
            List<in.shop2020.model.v1.dtr.LivePricing> pricingObj = dc.getLatestPricing(Long.valueOf(id), Long.valueOf(source_id));
28
            List<in.shop2020.model.v1.dtr.LivePricing> pricingObj = dc.getLatestPricing(Long.valueOf(skuBundleId), Long.valueOf(source_id));
37
            setResultJson(JSON.parse(gs.toJson(pricingObj)).toString());
29
            setResultJson(JSON.parse(gs.toJson(pricingObj)).toString());
38
        } catch (Exception e) {
30
        } catch (Exception e) {
39
            log.info(e);
31
            log.info(e);
40
        }
32
        }
41
        return "index";
33
        return "index";
42
    }
34
    }
-
 
35
    
-
 
36
    public String getSkuBundleId() {
-
 
37
        return skuBundleId;
-
 
38
    }
-
 
39
 
43
 
40
 
-
 
41
    public void setSkuBundleId(String skuBundleId) {
-
 
42
        this.skuBundleId = skuBundleId;
-
 
43
    }
-
 
44
    
-
 
45
    public String getSource_id() {
-
 
46
        return source_id;
-
 
47
    }
-
 
48
 
44
    public void setId(String id) {
49
    public void setSource_id(String source_id) {
45
        this.id = id;
50
        this.source_id = source_id;
46
    }
51
    }
47
 
52
 
48
 
53
 
49
 
54
 
50
}
55
}