Subversion Repositories SmartDukaan

Rev

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

Rev 28908 Rev 29042
Line 40... Line 40...
40
import com.spice.profitmandi.dao.entity.dtr.UserAccount;
40
import com.spice.profitmandi.dao.entity.dtr.UserAccount;
41
import com.spice.profitmandi.dao.entity.dtr.UserRole;
41
import com.spice.profitmandi.dao.entity.dtr.UserRole;
42
import com.spice.profitmandi.dao.entity.fofo.FofoPartnerPaymentOption;
42
import com.spice.profitmandi.dao.entity.fofo.FofoPartnerPaymentOption;
43
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
43
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
44
import com.spice.profitmandi.dao.entity.fofo.PartnerOnBoardingPanel;
44
import com.spice.profitmandi.dao.entity.fofo.PartnerOnBoardingPanel;
-
 
45
import com.spice.profitmandi.dao.entity.fofo.PartnerVerificationpanel;
45
import com.spice.profitmandi.dao.entity.fofo.PaymentOption;
46
import com.spice.profitmandi.dao.entity.fofo.PaymentOption;
46
import com.spice.profitmandi.dao.entity.inventory.State;
47
import com.spice.profitmandi.dao.entity.inventory.State;
47
import com.spice.profitmandi.dao.entity.user.Address;
48
import com.spice.profitmandi.dao.entity.user.Address;
48
import com.spice.profitmandi.dao.entity.user.Cart;
49
import com.spice.profitmandi.dao.entity.user.Cart;
49
import com.spice.profitmandi.dao.entity.user.Counter;
50
import com.spice.profitmandi.dao.entity.user.Counter;
Line 52... Line 53...
52
import com.spice.profitmandi.dao.entity.user.PrivateDealUserAddressMapping;
53
import com.spice.profitmandi.dao.entity.user.PrivateDealUserAddressMapping;
53
import com.spice.profitmandi.dao.enumuration.dtr.AccountType;
54
import com.spice.profitmandi.dao.enumuration.dtr.AccountType;
54
import com.spice.profitmandi.dao.enumuration.dtr.RetailerType;
55
import com.spice.profitmandi.dao.enumuration.dtr.RetailerType;
55
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
56
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
56
import com.spice.profitmandi.dao.enumuration.fofo.PaymentOptionType;
57
import com.spice.profitmandi.dao.enumuration.fofo.PaymentOptionType;
-
 
58
import com.spice.profitmandi.dao.enumuration.transaction.PartnerVerificationApprovalStatus;
57
import com.spice.profitmandi.dao.repository.dtr.DistrictMasterRepository;
59
import com.spice.profitmandi.dao.repository.dtr.DistrictMasterRepository;
58
import com.spice.profitmandi.dao.repository.dtr.DocumentRepository;
60
import com.spice.profitmandi.dao.repository.dtr.DocumentRepository;
59
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
61
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
60
import com.spice.profitmandi.dao.repository.dtr.Mongo;
62
import com.spice.profitmandi.dao.repository.dtr.Mongo;
61
import com.spice.profitmandi.dao.repository.dtr.PartnerOnBoardingPanelRepository;
63
import com.spice.profitmandi.dao.repository.dtr.PartnerOnBoardingPanelRepository;
-
 
64
import com.spice.profitmandi.dao.repository.dtr.PartnerOnboardingVerificationRepository;
62
import com.spice.profitmandi.dao.repository.dtr.RetailerBlockBrandsRepository;
65
import com.spice.profitmandi.dao.repository.dtr.RetailerBlockBrandsRepository;
63
import com.spice.profitmandi.dao.repository.dtr.RetailerRegisteredAddressRepository;
66
import com.spice.profitmandi.dao.repository.dtr.RetailerRegisteredAddressRepository;
64
import com.spice.profitmandi.dao.repository.dtr.RetailerRepository;
67
import com.spice.profitmandi.dao.repository.dtr.RetailerRepository;
65
import com.spice.profitmandi.dao.repository.dtr.RoleRepository;
68
import com.spice.profitmandi.dao.repository.dtr.RoleRepository;
66
import com.spice.profitmandi.dao.repository.dtr.ShopAddressRepository;
69
import com.spice.profitmandi.dao.repository.dtr.ShopAddressRepository;
Line 157... Line 160...
157
	private StoreTimelineTatService storeTimelineTatService;
160
	private StoreTimelineTatService storeTimelineTatService;
158
 
161
 
159
	@Autowired
162
	@Autowired
160
	private PartnerOnBoardingPanelRepository partnerOnBoardingPanelRepository;
163
	private PartnerOnBoardingPanelRepository partnerOnBoardingPanelRepository;
161
 
164
 
-
 
165
	@Autowired
-
 
166
	private PartnerOnboardingVerificationRepository partnerOnboardingVerificationRepository;
-
 
167
 
162
	@Override
168
	@Override
163
	public Map<String, Object> getByEmailIdOrMobileNumber(String emailIdOrMobileNumber)
169
	public Map<String, Object> getByEmailIdOrMobileNumber(String emailIdOrMobileNumber)
164
			throws ProfitMandiBusinessException {
170
			throws ProfitMandiBusinessException {
165
		User user = null;
171
		User user = null;
166
		int fofoId = Utils.SYSTEM_PARTNER_ID;
172
		int fofoId = Utils.SYSTEM_PARTNER_ID;
Line 861... Line 867...
861
			fofoStoreRepository.persist(fofoStore);
867
			fofoStoreRepository.persist(fofoStore);
862
 
868
 
863
			// Auto fill in onboarding Panel
869
			// Auto fill in onboarding Panel
864
			PartnerOnBoardingPanel pobp = partnerOnBoardingPanelRepository
870
			PartnerOnBoardingPanel pobp = partnerOnBoardingPanelRepository
865
					.selectByPhoneNumber(Long.parseLong(retailerAddress.getPhoneNumber()));
871
					.selectByPhoneNumber(Long.parseLong(retailerAddress.getPhoneNumber()));
866
			pobp.setCode(fofoStore.getCode());
-
 
867
			if (pobp != null) {
872
			if (pobp != null) {
-
 
873
 
-
 
874
				PartnerVerificationpanel partnerVerificationpanel = partnerOnboardingVerificationRepository
-
 
875
						.selectByOnboardingId(pobp.getId());
-
 
876
 
-
 
877
				if (partnerVerificationpanel != null) {
-
 
878
					if (partnerVerificationpanel.getApproval().equals(PartnerVerificationApprovalStatus.YES)) {
-
 
879
						pobp.setCode(fofoStore.getCode());
-
 
880
 
868
				storeTimelineTatService.onCodeCreated(pobp.getId());
881
						storeTimelineTatService.onCodeCreated(pobp.getId());
-
 
882
 
-
 
883
					}
-
 
884
 
-
 
885
				}
869
 
886
 
870
			}
887
			}
871
		}
888
		}
872
 
889
 
873
		return fofoStore;
890
		return fofoStore;