Subversion Repositories SmartDukaan

Rev

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

Rev 27124 Rev 27411
Line 571... Line 571...
571
			retailerRegisteredAddressRepository.persist(retailerRegisteredAddress);
571
			retailerRegisteredAddressRepository.persist(retailerRegisteredAddress);
572
		}
572
		}
573
		return address;
573
		return address;
574
	}
574
	}
575
 
575
 
576
	private void updateAddress(Address address, CustomAddress customAddress) {
576
	private void updateAddress(Address address, CustomAddress customAddress) throws ProfitMandiBusinessException {
577
		address.setName(customAddress.getName());
577
		address.setName(customAddress.getName());
578
		address.setPhoneNumber(customAddress.getPhoneNumber());
578
		address.setPhoneNumber(customAddress.getPhoneNumber());
579
		address.setLine1(customAddress.getLine1());
579
		address.setLine1(customAddress.getLine1());
580
		address.setLine2(customAddress.getLine2());
580
		address.setLine2(customAddress.getLine2());
581
		address.setCity(customAddress.getCity());
581
		address.setCity(customAddress.getCity());
582
		address.setPinCode(customAddress.getPinCode());
582
		address.setPinCode(customAddress.getPinCode());
-
 
583
		State state = stateRepository.selectByName(customAddress.getState());
-
 
584
		if (state==null) {
-
 
585
			throw new ProfitMandiBusinessException("State name", "Invalid State - Pls Contact Technology", "Invalid State - Pls Contact Technology");
-
 
586
		}
583
		address.setState(customAddress.getState());
587
		address.setState(state.getName());
584
		addressRepository.persist(address);
588
		addressRepository.persist(address);
585
		LOGGER.info("Address Updated" + address);
589
		LOGGER.info("Address Updated" + address);
586
	}
590
	}
587
 
591
 
588
	private void updateRetailerShops(List<Shop> shops, Set<CustomShop> customShops, int retailerId,
592
	private void updateRetailerShops(List<Shop> shops, Set<CustomShop> customShops, int retailerId,