Subversion Repositories SmartDukaan

Rev

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

Rev 22732 Rev 22743
Line 195... Line 195...
195
		final Document shopDocument = documentRepository.selectById(createRetailerRequest.getShop().getDocumentId());
195
		final Document shopDocument = documentRepository.selectById(createRetailerRequest.getShop().getDocumentId());
196
		if(shopRepository.isExistByDocumentId(shopDocument.getId())){
196
		if(shopRepository.isExistByDocumentId(shopDocument.getId())){
197
			throw new ProfitMandiBusinessException(ProfitMandiConstants.DOCUMENT_ID, shopDocument.getId(), "DCMNT_1000");
197
			throw new ProfitMandiBusinessException(ProfitMandiConstants.DOCUMENT_ID, shopDocument.getId(), "DCMNT_1000");
198
		}
198
		}
199
		documentRepository.markDocumentAsPersisted(retailerDocument.getId());
199
		documentRepository.markDocumentAsPersisted(retailerDocument.getId());
-
 
200
		//This validation is not required
200
		if(retailerRepository.isExistByNumberAndType(retailer.getNumber(), retailer.getType())){
201
		/*if(retailerRepository.isExistByNumberAndType(retailer.getNumber(), retailer.getType())){
201
			throw new ProfitMandiBusinessException(ProfitMandiConstants.NUMBER + ", " + ProfitMandiConstants.TYPE, retailer.getNumber() + ", " + retailer.getType(), "RTLR_1001");
202
			throw new ProfitMandiBusinessException(ProfitMandiConstants.NUMBER + ", " + ProfitMandiConstants.TYPE, retailer.getNumber() + ", " + retailer.getType(), "RTLR_1001");
202
		}
203
		}*/
203
		documentRepository.markDocumentAsPersisted(shopDocument.getId());
204
		documentRepository.markDocumentAsPersisted(shopDocument.getId());
204
		
205
		
205
		com.spice.profitmandi.dao.entity.user.User saholicUser = null;
206
		com.spice.profitmandi.dao.entity.user.User saholicUser = null;
206
		boolean foundRetailer = false;
207
		boolean foundRetailer = false;
207
		saholicUser = userUserRepository.selectByEmailId(user.getEmailId());
208
		saholicUser = userUserRepository.selectByEmailId(user.getEmailId());