Subversion Repositories SmartDukaan

Rev

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

Rev 35346 Rev 35348
Line 165... Line 165...
165
 
165
 
166
		// group by catalogId
166
		// group by catalogId
167
		Map<Integer, List<VideoUrlPojo>> videoCatalogMap =
167
		Map<Integer, List<VideoUrlPojo>> videoCatalogMap =
168
				videoRows.stream().collect(Collectors.groupingBy(VideoUrlPojo::getCatalogId));
168
				videoRows.stream().collect(Collectors.groupingBy(VideoUrlPojo::getCatalogId));
169
 
169
 
-
 
170
		LOGGER.info("videoCatalogMap {}", videoCatalogMap);
-
 
171
 
170
		for (Map.Entry<Integer, List<VideoUrlPojo>> entry : videoCatalogMap.entrySet()) {
172
		for (Map.Entry<Integer, List<VideoUrlPojo>> entry : videoCatalogMap.entrySet()) {
171
 
173
 
172
			int catalogId = entry.getKey();
174
			int catalogId = entry.getKey();
-
 
175
 
-
 
176
			LOGGER.info("catalogId {}", catalogId);
-
 
177
 
173
			List<VideoUrlPojo> rowsForCatalog = entry.getValue();
178
			List<VideoUrlPojo> rowsForCatalog = entry.getValue();
174
 
179
 
175
			ContentPojo content = mongoClient.getEntityById(catalogId);
180
			ContentPojo content = mongoClient.getEntityById(catalogId);
176
 
181
 
177
			if (content == null) {
182
			if (content == null) {
Line 438... Line 443...
438
 
443
 
439
		for (CSVRecord record : records) {
444
		for (CSVRecord record : records) {
440
 
445
 
441
			try {
446
			try {
442
				// Must match CSV column order
447
				// Must match CSV column order
443
				Long catalogId = Long.parseLong(record.get(0));
448
				Long catalogId = Long.parseLong(record.get(1));
444
				String url = record.get(1);
449
				String url = record.get(2);
445
 
450
 
446
				VideoUrlPojo row = new VideoUrlPojo();
451
				VideoUrlPojo row = new VideoUrlPojo();
447
				row.setCatalogId(Math.toIntExact(catalogId));
452
				row.setCatalogId(Math.toIntExact(catalogId));
448
				row.setUrl(url);
453
				row.setUrl(url);
449
 
454