| Line 1386... |
Line 1386... |
| 1386 |
retailerContact.setMobile(contactNumber);
|
1386 |
retailerContact.setMobile(contactNumber);
|
| 1387 |
retailerContact.setBrandName(brandName);
|
1387 |
retailerContact.setBrandName(brandName);
|
| 1388 |
retailerContact.setContactType(contactType);
|
1388 |
retailerContact.setContactType(contactType);
|
| 1389 |
retailerContact.setActive(true);
|
1389 |
retailerContact.setActive(true);
|
| 1390 |
retailerContact.setCreatedAt(LocalDateTime.now());
|
1390 |
retailerContact.setCreatedAt(LocalDateTime.now());
|
| - |
|
1391 |
try {
|
| 1391 |
retailerContactRepository.persist(retailerContact);
|
1392 |
retailerContactRepository.persist(retailerContact);
|
| - |
|
1393 |
} catch (org.springframework.dao.DataIntegrityViolationException dup) {
|
| - |
|
1394 |
// uk_retailer_contact_fofo_mobile — same number already exists for this partner.
|
| - |
|
1395 |
throw new ProfitMandiBusinessException("RetailerContact", contactNumber,
|
| - |
|
1396 |
"This number is already registered for this partner");
|
| - |
|
1397 |
}
|
| 1392 |
|
1398 |
|
| 1393 |
List<RetailerContact> retailerContacts = retailerContactRepository.selectAllByRetailerId(fofoId);
|
1399 |
List<RetailerContact> retailerContacts = retailerContactRepository.selectAllByRetailerId(fofoId);
|
| 1394 |
|
1400 |
|
| 1395 |
model.addAttribute("retailerContacts", retailerContacts);
|
1401 |
model.addAttribute("retailerContacts", retailerContacts);
|
| 1396 |
model.addAttribute("brands", brandsRepository.selectAll());
|
1402 |
model.addAttribute("brands", brandsRepository.selectAll());
|