Subversion Repositories SmartDukaan

Rev

Show changed files | Directory listing | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
36534 9 h 31 m aman /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/order/ Fix:First Po check (is it pending )  
36518 2 d 10 h aman /trunk/ Fix:Fix first po and edge case for bulk order  
36399 16 d 10 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Replace mailSender (SendGrid) with gmailRelaySender - SendGrid API key expired/revoked  
36362 21 d 5 h amit /trunk/profitmandi-dao/src/main/ Make fofo_order creation idempotent on (fofo_id, invoice_number)

Fixes insert-intention gap-lock deadlocks on idx_invoice_number observed in
SHOW ENGINE INNODB STATUS at 2026-04-22 13:01:54 — two concurrent requests
inserting the same invoice_number for the same customer (client retry /
upstream webhook retry pattern).

- OrderServiceImpl.createAndGetFofoOrder: select-then-insert idempotency.
Fast path returns existing row if already created; slow-race path catches
DataIntegrityViolationException and re-selects the winner's row.
- add_uk_fofo_order_fofo_invoice.sql: adds UNIQUE KEY (fofo_id, invoice_number)
so the loser of a concurrent-insert race gets a clean DIVE instead of a
silent duplicate row (pre-check showed zero existing dup groups, safe).

findExistingFofoOrder wraps the repo call to swallow the repo's declared
ProfitMandiBusinessException — the impl actually returns null on not-found
(constructs an exception but never throws), so the swallow matches reality.
 
36309 24 d 0 h amit /trunk/profitmandi-dao/src/main/ Route phantom orders to per-region Dummy warehouse; complete applyColorChange rename

- Phantom allocations in getFulfillments route to the Dummy/GOOD/OURS warehouse under
vendor 40 for the partner's billing region. WarehouseServiceImpl.ensureDummyForBillingRegion
returns the existing Dummy or creates one on the fly. createVendorWarehouse hook auto-seeds
a Dummy when a new billing region's first warehouse is created.
- WarehouseRepository.selectByVendorBillingAndType supports the lookup.
- OrderService interface: rename notifyColorChange -> applyColorChange to match r36305's impl
rename (r36305 renamed only the impl, leaving trunk inconsistent).
- PurchaseOrderServiceImpl: remove auto-rebalance on PO receive. Real-wh rebalancing and
phantom-to-real binding are now ops-driven via the order billing UI
(changeFulfillmentWarehouse / applyColorChange / moveOrdersFulfilmentWarehouse).
- migration_dummy_warehouses.sql: idempotent seeding script for 14 Dummy/GOOD/OURS warehouses
under vendor 40, one per WAREHOUSE_MAP billing region that lacked one. Already applied to
hadb1 and local.
 
36305 24 d 17 h amit /trunk/profitmandi-dao/src/main/ Batch processing infrastructure + per-partner offer processing + partner limit optimization + investment cache eviction on billing/payment/cancellation with 3hr TTL  
36262 30 d 5 h aman /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Fix:Send Mail for filled loi form to finance team  
36126 42 d 12 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/order/ Change FOFO invoice PDF title from Retailer Invoice to Tax Invoice  
36093 47 d 5 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/order/ Remove WOD brand eligibility check from tertiary billing flow  
36064 49 d 5 h aman /trunk/ Fix:FULL_Stock flow , fin service mark unapplicable ,send invoice to whatsapp by default, update contact list ,Training mail issue  
36024 55 d 5 h aman /trunk/ Fix:Exclude non working days and approval flow based on role and PO type.  
35995 61 d 5 h aman /trunk/ Fix:Redesign the Po Approval page, and po creation logic for first po, trail mails formatting fix  
35971 65 d 5 h aman /trunk/ Feat : Loi 2.0 Enhancement and redesigning  
35956 67 d 12 h amit /trunk/profitmandi-dao/src/main/ Mail outbox pattern: persist mail in transaction, send async after commit. Fixes lock contention between /cancelOrder and /om/addBillingDetailsForGrouppedOrders caused by SMTP calls inside transactions holding DB locks.  
35896 73 d 2 h amit /trunk/profitmandi-dao/src/main/ Simplify partner GST: read/write from fofo_store.gst_number instead of Counter chain

- Set fofo_store.gst_number when store code is created/updated in RetailerServiceImpl
- Replace PrivateDealUser->Counter->gstin reads with FofoStore.getGstNumber() in:
RetailerServiceImpl, OrderServiceImpl, InvoiceService
- Remove unnecessary PrivateDealUser/Counter batch fetches in getFofoRetailers/getFofoRetailerUserId
- Add migration script to backfill existing GST from counter to fofo_store
 
35800 83 d 5 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Optimize credit note generation (bulk query), fix brand code NPE, add dealer code order validation, add @Profile guard on SolrStartupSync  
35736 91 d 9 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/order/ Fix remaining coding issues in FOFO order creation

- Remove unused changedTotalBillAmount dead code
- Fix NPE when serializedInventoryItemMap returns null for an item
- Replace break-in-loop with iterator().next() in createAndGetFofoOrderItem
- Replace e.printStackTrace() with proper LOGGER.error()
- Log actual exception in state rate lookup instead of swallowing it
- Skip processScratchOffer when no smartphone in order
 
35733 91 d 9 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/order/ Fix noGST bug, remove dead price validation code, optimize live demo query in order creation

- noGST: compute once before loop with anyMatch instead of last-item-wins
- Remove pricingService.getPurchasePriceMopPriceNotFound call and empty validateDpPrice/validateMopPrice (disabled since 11 sep 2025)
- Replace selectAllSerialNumber full table load with targeted selectBySerialNumbers for order serials only
 
35695 93 d 12 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Perf: N+1 fix in FOFO OrderServiceImpl.createOrder - batch fetch live demo serials and collect FofoOrderItems during loop  
35690 93 d 17 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Optimize order creation performance: add overloaded focusedModelShortageValidation with pre-fetched data, add overloaded payThroughWallet and processTransaction to avoid duplicate fetches, fix N+1 queries in BulkOrderService by batch-fetching items and tagListings  

Show All