| Line 420... |
Line 420... |
| 420 |
}
|
420 |
}
|
| 421 |
return saholicUser.getId();
|
421 |
return saholicUser.getId();
|
| 422 |
}
|
422 |
}
|
| 423 |
|
423 |
|
| 424 |
private com.spice.profitmandi.dao.entity.user.User createSaholicUser(
|
424 |
private com.spice.profitmandi.dao.entity.user.User createSaholicUser(
|
| 425 |
LoginRequestResponseModel loginRequestResponseModel) {
|
425 |
LoginRequestResponseModel loginRequestResponseModel) {
|
| 426 |
com.spice.profitmandi.dao.entity.user.User saholicUser = null;
|
426 |
com.spice.profitmandi.dao.entity.user.User saholicUser = null;
|
| 427 |
try {
|
427 |
try {
|
| 428 |
saholicUser = userUserRepository.selectByEmailId(loginRequestResponseModel.getEmail());
|
428 |
saholicUser = userUserRepository.selectByEmailId(loginRequestResponseModel.getEmail());
|
| 429 |
saholicUser.setCreateTimestamp(LocalDateTime.now());
|
429 |
saholicUser.setCreateTimestamp(LocalDateTime.now());
|
| 430 |
} catch (ProfitMandiBusinessException e) {
|
430 |
} catch (ProfitMandiBusinessException e) {
|
| Line 915... |
Line 915... |
| 915 |
|
915 |
|
| 916 |
@Override
|
916 |
@Override
|
| 917 |
@Cacheable(value = "getFofoRetailer", cacheManager = "thirtyMinsTimeOutCacheManager")
|
917 |
@Cacheable(value = "getFofoRetailer", cacheManager = "thirtyMinsTimeOutCacheManager")
|
| 918 |
public CustomRetailer getFofoRetailer(int fofoId) throws ProfitMandiBusinessException {
|
918 |
public CustomRetailer getFofoRetailer(int fofoId) throws ProfitMandiBusinessException {
|
| 919 |
com.spice.profitmandi.dao.entity.user.User saholicUser = userUserRepository.selectById(fofoId);
|
919 |
com.spice.profitmandi.dao.entity.user.User saholicUser = userUserRepository.selectById(fofoId);
|
| - |
|
920 |
|
| - |
|
921 |
User dtrUser = userRepository.selectByEmailId(saholicUser.getEmailId());
|
| 920 |
FofoStore store = fofoStoreRepository.selectByRetailerId(fofoId);
|
922 |
FofoStore store = fofoStoreRepository.selectByRetailerId(fofoId);
|
| 921 |
Address address = null;
|
923 |
Address address = null;
|
| 922 |
try {
|
924 |
try {
|
| 923 |
address = addressRepository.selectById(saholicUser.getAddressId());
|
925 |
address = addressRepository.selectById(saholicUser.getAddressId());
|
| 924 |
} catch (ProfitMandiBusinessException e1) {
|
926 |
} catch (ProfitMandiBusinessException e1) {
|
| Line 928... |
Line 930... |
| 928 |
Map<Integer, CustomRetailer> customRetailersMap = new HashMap<>();
|
930 |
Map<Integer, CustomRetailer> customRetailersMap = new HashMap<>();
|
| 929 |
CustomRetailer customRetailer = new CustomRetailer();
|
931 |
CustomRetailer customRetailer = new CustomRetailer();
|
| 930 |
customRetailer.setEmail(saholicUser.getEmailId());
|
932 |
customRetailer.setEmail(saholicUser.getEmailId());
|
| 931 |
customRetailer.setBusinessName(address.getName());
|
933 |
customRetailer.setBusinessName(address.getName());
|
| 932 |
customRetailer.setMobileNumber(address.getPhoneNumber());
|
934 |
customRetailer.setMobileNumber(address.getPhoneNumber());
|
| - |
|
935 |
customRetailer.setFirstName(dtrUser.getFirstName());
|
| - |
|
936 |
customRetailer.setLastName(dtrUser.getLastName());
|
| 933 |
try {
|
937 |
try {
|
| 934 |
customRetailer.setCartId(saholicUser.getActiveCartId());
|
938 |
customRetailer.setCartId(saholicUser.getActiveCartId());
|
| 935 |
PrivateDealUser pdu = privateDealUserRepository.selectById(address.getRetaierId());
|
939 |
PrivateDealUser pdu = privateDealUserRepository.selectById(address.getRetaierId());
|
| 936 |
Counter counter = counterRepository.selectById(pdu.getCounterId());
|
940 |
Counter counter = counterRepository.selectById(pdu.getCounterId());
|
| 937 |
customRetailer.setGstNumber(counter.getGstin());
|
941 |
customRetailer.setGstNumber(counter.getGstin());
|