Subversion Repositories SmartDukaan

Rev

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

Rev 14385 Rev 15164
Line 15... Line 15...
15
    private static Logger log = Logger.getLogger(Class.class);
15
    private static Logger log = Logger.getLogger(Class.class);
16
    
16
    
17
    private static final long serialVersionUID = 1L;
17
    private static final long serialVersionUID = 1L;
18
    
18
    
19
    private String skuBundleId;
19
    private String skuBundleId;
20
 
-
 
21
    private String source_id;
20
    private String source_id;
-
 
21
    private String id;
-
 
22
    
22
 
23
 
23
    public String index(){
24
    public String index(){
24
        Gson gs = new Gson();
25
        Gson gs = new Gson();
25
        Client dc = null;
26
        Client dc = null;
26
        try {
27
        try {
Line 31... Line 32...
31
            log.info(e);
32
            log.info(e);
32
        }
33
        }
33
        return "index";
34
        return "index";
34
    }
35
    }
35
    
36
    
-
 
37
    public String latestPriceById(){
-
 
38
    	Client dc = null;
-
 
39
    	try {
-
 
40
            dc = new DtrClient().getClient();
-
 
41
            dc.updateLatestPriceForItem(Long.valueOf(id));
-
 
42
            setResultJson("{1:'Updated Successfully'}");
-
 
43
        } catch (Exception e) {
-
 
44
            log.info(e);
-
 
45
            setResultJson("{0:'Unable to update'}");
-
 
46
        }
-
 
47
        return "index";
-
 
48
   
-
 
49
    }
-
 
50
    
36
    public String getSkuBundleId() {
51
    public String getSkuBundleId() {
37
        return skuBundleId;
52
        return skuBundleId;
38
    }
53
    }
39
 
54
 
40
 
55
 
Line 48... Line 63...
48
 
63
 
49
    public void setSource_id(String source_id) {
64
    public void setSource_id(String source_id) {
50
        this.source_id = source_id;
65
        this.source_id = source_id;
51
    }
66
    }
52
 
67
 
-
 
68
	public void setId(String id) {
-
 
69
		this.id = id;
-
 
70
	}
-
 
71
 
-
 
72
	public String getId() {
-
 
73
		return id;
-
 
74
	}
-
 
75
	
-
 
76
	public static void main (String[] args){
-
 
77
		LivePricingController live = new LivePricingController();
-
 
78
		live.setId("84");
-
 
79
		live.latestPriceById();
-
 
80
		System.out.println(live.getResultJson());
-
 
81
	}
-
 
82
 
53
 
83
 
54
 
84
 
55
}
85
}