Subversion Repositories SmartDukaan

Rev

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

Rev 1901 Rev 2000
Line 70... Line 70...
70
            Client userClient = userContextServiceClient.getClient();
70
            Client userClient = userContextServiceClient.getClient();
71
 
71
 
72
            List<Map<String, String>> contentRows = new LinkedList<Map<String,String>>(); 
72
            List<Map<String, String>> contentRows = new LinkedList<Map<String,String>>(); 
73
            MasterAffiliate mAffiliate = userClient.getMasterAffiliateById(mAfId);
73
            MasterAffiliate mAffiliate = userClient.getMasterAffiliateById(mAfId);
74
            for (Affiliate aff : userClient.getAffiliatesByMasterAffiliate(mAfId)) {
74
            for (Affiliate aff : userClient.getAffiliatesByMasterAffiliate(mAfId)) {
75
                for (Tracker tracker : userClient.getTrackersByAffiliate(aff.getId())) {
75
                for (TrackLog tracklog : userClient.getTrackLogsByAffiliate(aff.getId())) {
76
                    for (TrackLog tracklog : userClient.getTrackLogsByTracker(tracker.getId())) {
-
 
77
                        Map<String, String> contentRow = new HashMap<String, String>();
76
                    Map<String, String> contentRow = new HashMap<String, String>();
78
                        contentRow.put("mAffiliate", mAffiliate.getName());
77
                    contentRow.put("mAffiliate", mAffiliate.getName());
79
                        contentRow.put("affiliate", aff.getName());
78
                    contentRow.put("affiliate", aff.getName());
80
                        contentRow.put("affiliateUrl", aff.getUrl());
79
                    contentRow.put("affiliateUrl", aff.getUrl());
81
                        contentRow.put("date", String.valueOf(tracklog.getAddedOn()));
80
                    contentRow.put("date",String.valueOf(tracklog.getAddedOn()));
82
                        contentRow.put("event", tracklog.getEvent());
81
                    contentRow.put("event", tracklog.getEvent());
83
                        contentRow.put("url", tracklog.getUrl());
82
                    contentRow.put("url", tracklog.getUrl());
84
                        contentRow.put("data", tracklog.getData());
83
                    contentRow.put("data", tracklog.getData());
85
                        contentRows.add(contentRow);
84
                    contentRows.add(contentRow);
86
                    }
-
 
87
                }
85
                }
88
            }
86
            }
89
             
87
             
90
            // Preparing XLS file for output
88
            // Preparing XLS file for output
91
            response.setContentType("application/vnd.ms-excel");
89
            response.setContentType("application/vnd.ms-excel");