Subversion Repositories SmartDukaan

Rev

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

Rev 15230 Rev 15233
Line 19... Line 19...
19
 
19
 
20
	private String skuBundleId;
20
	private String skuBundleId;
21
	private String source_id;
21
	private String source_id;
22
	private String id;
22
	private String id;
23
	private String url;
23
	private String url;
-
 
24
	private String fetchLive;
24
 
25
 
25
	public String index(){
26
	public String index(){
26
		Gson gs = new Gson();
27
		Gson gs = new Gson();
27
		DtrClient dc = null;
28
		DtrClient dc = null;
28
		try {
29
		try {
Line 49... Line 50...
49
		UserMessagePojo ump = new UserMessagePojo();
50
		UserMessagePojo ump = new UserMessagePojo();
50
		ump.setMessage("");
51
		ump.setMessage("");
51
		ump.setResult(false);
52
		ump.setResult(false);
52
		try {
53
		try {
53
			dc = new DtrClient();
54
			dc = new DtrClient();
-
 
55
			if (Boolean.valueOf(fetchLive))
54
			dc.getClient().updateLatestPriceForItem(Long.valueOf(id));
56
			dc.getClient().updateLatestPriceForItem(Long.valueOf(id));
55
			if (Long.valueOf(source_id) == 3){
57
			if (Long.valueOf(source_id) == 3){
56
				SnapdealProductPageParserController spp = new SnapdealProductPageParserController();
58
				SnapdealProductPageParserController spp = new SnapdealProductPageParserController();
57
				spp.setUrl(url);
59
				spp.setUrl(url);
58
				setResultJson(spp.getColorMessage());
60
				setResultJson(spp.getColorMessage());
Line 99... Line 101...
99
	}
101
	}
100
 
102
 
101
	public void setUrl(String url) {
103
	public void setUrl(String url) {
102
		this.url = url;
104
		this.url = url;
103
	}
105
	}
-
 
106
	
-
 
107
	public void setFetchLive(String fetchLive) {
-
 
108
		this.fetchLive = fetchLive;
-
 
109
	}
-
 
110
 
-
 
111
	public String getFetchLive() {
-
 
112
		return fetchLive;
-
 
113
	}
104
 
114
 
105
	public static void main (String[] args){
115
	public static void main (String[] args){
106
		LivePricingController live = new LivePricingController();
116
		LivePricingController live = new LivePricingController();
107
		live.setId("84");
117
		live.setId("84");
108
		live.setUrl("aHR0cDovL20uc25hcGRlYWwuY29tL3Byb2R1Y3Qvc3BpY2UtYm9zcy1lbnRlcnRhaW5lci0zLW01NDA2LzEwNTA2ODk2MjM/c3VwYz1TREw3MDA0MzYzMTUmdXRtX3NvdXJjZT1hZmZfcHJvZyZ1dG1fY2FtcGFpZ249YWZ0cyZvZmZlcl9pZD0xNyZhZmZfaWQ9MTc5MTUmYWZmX3N1Yj1TSEEzMTQzMTY3NzM0NQ==");
118
		live.setUrl("aHR0cDovL20uc25hcGRlYWwuY29tL3Byb2R1Y3Qvc3BpY2UtYm9zcy1lbnRlcnRhaW5lci0zLW01NDA2LzEwNTA2ODk2MjM/c3VwYz1TREw3MDA0MzYzMTUmdXRtX3NvdXJjZT1hZmZfcHJvZyZ1dG1fY2FtcGFpZ249YWZ0cyZvZmZlcl9pZD0xNyZhZmZfaWQ9MTc5MTUmYWZmX3N1Yj1TSEEzMTQzMTY3NzM0NQ==");
109
		live.setSource_id("3");
119
		live.setSource_id("3");
-
 
120
		live.setFetchLive("false");
110
		live.latestPriceById();
121
		live.latestPriceById();
111
		System.out.println(live.getResultJson());
122
		System.out.println(live.getResultJson());
112
	}
123
	}
113
 
-
 
114
 
-
 
115
 
124
	
116
}
125
}