Subversion Repositories SmartDukaan

Rev

Rev 29360 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 29360 Rev 29363
Line 22... Line 22...
22
 
22
 
23
	public ProductPojo getShortContent(long entityId) {
23
	public ProductPojo getShortContent(long entityId) {
24
		ContentPojo cp = null;
24
		ContentPojo cp = null;
25
		ProductPojo pp = null;
25
		ProductPojo pp = null;
26
		try {
26
		try {
27
			cp = gs.fromJson(contentMongoClient.getEntityById(entityId).toString(), ContentPojo.class);
27
			cp = contentMongoClient.getEntityById(entityId);
28
		} catch (Exception e) {
28
		} catch (Exception e) {
29
			e.printStackTrace();
29
			e.printStackTrace();
30
			return null;
30
			return null;
31
		}
31
		}
32
 
-
 
33
		LOGGER.info("cp" + cp);
-
 
34
 
-
 
35
		pp = new ProductPojo();
32
		pp = new ProductPojo();
36
		pp.setId(entityId);
33
		pp.setId(entityId);
37
		pp.setDefaultImgUrl(cp.getDefaultImageUrl());
34
		pp.setDefaultImgUrl(cp.getDefaultImageUrl());
38
		pp.setDescription(String.join(", ", cp.getKeySpecs().subList(0, Math.min(cp.getKeySpecs().size(), 3))));
35
		pp.setDescription(String.join(", ", cp.getKeySpecs().subList(0, Math.min(cp.getKeySpecs().size(), 3))));
39
		pp.setImageUrl(cp.getDefaultImageUrl());
36
		pp.setImageUrl(cp.getDefaultImageUrl());