Subversion Repositories SmartDukaan

Rev

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

Rev 2735 Rev 2738
Line 389... Line 389...
389
	 */
389
	 */
390
    private void getMostComparedProducts(ExpandedEntity expEntity, String exportPath) throws Exception{
390
    private void getMostComparedProducts(ExpandedEntity expEntity, String exportPath) throws Exception{
391
	    long catalogId = expEntity.getID();
391
	    long catalogId = expEntity.getID();
392
        
392
        
393
	    Map<Long, Long> comparedPhones = CreationUtils.getComparisonStats().get(catalogId);
393
	    Map<Long, Long> comparedPhones = CreationUtils.getComparisonStats().get(catalogId);
-
 
394
	    
394
	    StringBuffer sb = new StringBuffer();
395
	    StringBuffer sb = new StringBuffer();
395
	    int maxCount = 10;
396
	    int maxCount = 10;
396
	    int count = 0;
397
	    int count = 0;
-
 
398
	    if(comparedPhones != null){
397
	    for(Long entityID: comparedPhones.keySet()){
399
		    for(Long entityID: comparedPhones.keySet()){
398
	    	if(count > maxCount){
400
		    	if(count > maxCount){
399
				break;
401
					break;
400
			}
402
				}
401
			sb.append(entityID + "\n");
403
				sb.append(entityID + "\n");
402
			count++;
404
				count++;
-
 
405
		    }
403
	    }
406
	    }
404
	    
407
	    
405
        String exportFileName = exportPath + catalogId + File.separator + "MostComparedProducts.vm";
408
        String exportFileName = exportPath + catalogId + File.separator + "MostComparedProducts.vm";
406
        File exportFile = new File(exportFileName);
409
        File exportFile = new File(exportFileName);
407
        if(!exportFile.exists()) {
410
        if(!exportFile.exists()) {