Subversion Repositories SmartDukaan

Rev

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

Rev 12024 Rev 12101
Line 102... Line 102...
102
	public void insertPriceInSolrData(long catalogId, String priceString, String availabilityString) throws IOException{
102
	public void insertPriceInSolrData(long catalogId, String priceString, String availabilityString) throws IOException{
103
		String irSolrFilename = Utils.EXPORT_PATH + "xml/final/" + catalogId + "_irdata_solr.xml";
103
		String irSolrFilename = Utils.EXPORT_PATH + "xml/final/" + catalogId + "_irdata_solr.xml";
104
		String finalFile = Utils.EXPORT_PATH + "solr/" + catalogId + "_irdata_solr.xml";
104
		String finalFile = Utils.EXPORT_PATH + "solr/" + catalogId + "_irdata_solr.xml";
105
		File f = new File(irSolrFilename);
105
		File f = new File(irSolrFilename);
106
		String s = FileUtils.readFileToString(f);
106
		String s = FileUtils.readFileToString(f);
-
 
107
		if(privateDealsMap.containsKey(catalogId)) {
-
 
108
			priceString += "<field name=\"50039\">Show Deals Only</field>";
-
 
109
		}
107
		s = s.replaceAll("<field name=\"F_50002\">.*</field>", priceString);
110
		s = s.replaceAll("<field name=\"F_50002\">.*</field>", priceString);
108
		s = s.replaceAll("<field name=\"F_50028\">.*</field>", availabilityString);
111
		s = s.replaceAll("<field name=\"F_50028\">.*</field>", availabilityString);
109
		File f1 = new File(finalFile);
112
		File f1 = new File(finalFile);
110
		FileUtils.writeStringToFile(f1, s);
113
		FileUtils.writeStringToFile(f1, s);
111
	}
114
	}
Line 193... Line 196...
193
				}
196
				}
194
				if(showmrp) {
197
				if(showmrp) {
195
					itemPojo.setMrp(mrp);
198
					itemPojo.setMrp(mrp);
196
				}
199
				}
197
				if(privateDealsMap.containsKey(item.getId())){
200
				if(privateDealsMap.containsKey(item.getId())){
-
 
201
					privateDealsMap.put(item.getCatalogItemId(), null);
198
					if (items.size()>1){
202
					if (items.size()>1){
199
						dealAvailableString += "<b>" +  item.getColor() + "</b>, ";
203
						dealAvailableString += "<b>" +  item.getColor() + "</b>, ";
200
					}
204
					}
201
					privateDealCounter += 1;
205
					privateDealCounter += 1;
202
					PrivateDeal pd = privateDealsMap.get(item.getId());
206
					PrivateDeal pd = privateDealsMap.get(item.getId());