| Line 28... |
Line 28... |
| 28 |
import com.spice.profitmandi.dao.repository.fofo.*;
|
28 |
import com.spice.profitmandi.dao.repository.fofo.*;
|
| 29 |
import com.spice.profitmandi.dao.repository.inventory.StateRepository;
|
29 |
import com.spice.profitmandi.dao.repository.inventory.StateRepository;
|
| 30 |
import com.spice.profitmandi.dao.repository.trialOnboarding.TrialFormRepository;
|
30 |
import com.spice.profitmandi.dao.repository.trialOnboarding.TrialFormRepository;
|
| 31 |
import com.spice.profitmandi.dao.repository.user.*;
|
31 |
import com.spice.profitmandi.dao.repository.user.*;
|
| 32 |
import com.spice.profitmandi.service.PostOfficeService;
|
32 |
import com.spice.profitmandi.service.PostOfficeService;
|
| - |
|
33 |
import com.spice.profitmandi.service.SellerService;
|
| 33 |
import com.spice.profitmandi.service.catalog.BrandsService;
|
34 |
import com.spice.profitmandi.service.catalog.BrandsService;
|
| 34 |
import in.shop2020.model.v1.user.CartStatus;
|
35 |
import in.shop2020.model.v1.user.CartStatus;
|
| 35 |
import org.apache.logging.log4j.LogManager;
|
36 |
import org.apache.logging.log4j.LogManager;
|
| 36 |
import org.apache.logging.log4j.Logger;
|
37 |
import org.apache.logging.log4j.Logger;
|
| 37 |
import org.springframework.beans.factory.annotation.Autowired;
|
38 |
import org.springframework.beans.factory.annotation.Autowired;
|
| Line 60... |
Line 61... |
| 60 |
|
61 |
|
| 61 |
@Autowired
|
62 |
@Autowired
|
| 62 |
private RetailerRepository retailerRepository;
|
63 |
private RetailerRepository retailerRepository;
|
| 63 |
|
64 |
|
| 64 |
@Autowired
|
65 |
@Autowired
|
| - |
|
66 |
private SellerService sellerService;
|
| - |
|
67 |
|
| - |
|
68 |
@Autowired
|
| 65 |
private RetailerBlockBrandsRepository retailerBlockBrandsRepository;
|
69 |
private RetailerBlockBrandsRepository retailerBlockBrandsRepository;
|
| 66 |
|
70 |
|
| 67 |
@Autowired
|
71 |
@Autowired
|
| 68 |
private UserAccountRepository userAccountRepository;
|
72 |
private UserAccountRepository userAccountRepository;
|
| 69 |
|
73 |
|
| Line 894... |
Line 898... |
| 894 |
} catch (ProfitMandiBusinessException profitMandiBusinessException) {
|
898 |
} catch (ProfitMandiBusinessException profitMandiBusinessException) {
|
| 895 |
|
899 |
|
| 896 |
}
|
900 |
}
|
| 897 |
|
901 |
|
| 898 |
if (fofoStore != null) {
|
902 |
if (fofoStore != null) {
|
| - |
|
903 |
int previousWarehouseId = fofoStore.getWarehouseId();
|
| - |
|
904 |
FofoType previousFofoType = fofoStore.getFofoType();
|
| 899 |
fofoStore.setCounterSize(updateRetailerRequest.getCountersize());
|
905 |
fofoStore.setCounterSize(updateRetailerRequest.getCountersize());
|
| 900 |
fofoStore.setAstId(updateRetailerRequest.getAstId());
|
906 |
fofoStore.setAstId(updateRetailerRequest.getAstId());
|
| 901 |
fofoStore.setMinimumInvestment(updateRetailerRequest.getMinInvestment());
|
907 |
fofoStore.setMinimumInvestment(updateRetailerRequest.getMinInvestment());
|
| 902 |
fofoStore.setWarehouseId(updateRetailerRequest.getWarehouseId());
|
908 |
fofoStore.setWarehouseId(updateRetailerRequest.getWarehouseId());
|
| 903 |
fofoStore.setCounterPotential(updateRetailerRequest.getCounterPotential());
|
909 |
fofoStore.setCounterPotential(updateRetailerRequest.getCounterPotential());
|
| 904 |
fofoStore.setFofoType(updateRetailerRequest.getFofoType());
|
910 |
fofoStore.setFofoType(updateRetailerRequest.getFofoType());
|
| 905 |
fofoStore.setGstNumber(updateRetailerRequest.getGstNumber());
|
911 |
fofoStore.setGstNumber(updateRetailerRequest.getGstNumber());
|
| 906 |
|
912 |
|
| - |
|
913 |
// An INTERNAL store bills movements to its warehouse's address, so moving it (or making it internal)
|
| - |
|
914 |
// must carry the new warehouse's address across; the retailer address saved above is replaced.
|
| - |
|
915 |
if (fofoStore.getFofoType() == FofoType.INTERNAL
|
| - |
|
916 |
&& (previousWarehouseId != fofoStore.getWarehouseId() || previousFofoType != FofoType.INTERNAL)) {
|
| - |
|
917 |
sellerService.syncInternalStoreAddress(fofoStore);
|
| - |
|
918 |
}
|
| - |
|
919 |
|
| 907 |
// The store already exists but its code may never have reached the onboarding
|
920 |
// The store already exists but its code may never have reached the onboarding
|
| 908 |
// panel (e.g. verification approved while another dtr user held the partner's
|
921 |
// panel (e.g. verification approved while another dtr user held the partner's
|
| 909 |
// mobile, so the approval-time linker resolved the wrong account). Re-saving the
|
922 |
// mobile, so the approval-time linker resolved the wrong account). Re-saving the
|
| 910 |
// form previously did nothing for the panel because linking only ran on NEW
|
923 |
// form previously did nothing for the panel because linking only ran on NEW
|
| 911 |
// store creation. Link here too; the method is a no-op if the panel already
|
924 |
// store creation. Link here too; the method is a no-op if the panel already
|