Subversion Repositories SmartDukaan

Rev

Show changed files | Details | Compare with Previous | Blame | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
37669 5 d 12 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/user/ Reject an invalid or mismatched partner GSTIN before it is saved

The onboarding screen carries the GSTIN in two boxes both labelled GST NUMBER - the retailer
one (dtr.retailer.number) and the store one (fofo_store.gst_number, which billing reads).
Neither was validated, so DLSH1660 was saved with the LOI's pincode in the store box while the
retailer box held the real GSTIN, and its first invoice would have been refused by NIC.

validateGstNumbers runs before any write (covers the fofo portal, the V2 API and the partner
app, which all funnel through updateRetailerDetails): both values are normalised, both must be
valid GSTINs, and when both are present they must agree - across 1,800 partners on record they
already do, bar the one that caused this. Needs common r37668.
 
37648 5 d 23 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Retire user.counter / user.privatedealuser write path

Partner GST moved to fofo.fofo_store.gst_number in the Feb-2026 migration; counter.gstin
has had no reader since (Counter.getGstin() had no callers) and privatedealuser is only
read to decide its own insert-vs-update. Both were write-only bookkeeping.

- RetailerServiceImpl: drop createPrivateDealUser/createCounter and their two call sites
- MigrationUtil.migrateUserToRetailer: drop the same legacy block
- Delete Counter / PrivateDealUser / PrivateDealUserAddressMapping entities + repositories

No reader is affected: the 240 Reportico reports on static0 reference neither table
(the 'counter' hits are fofo_store.counter_size). Tables stay in place until this is
deployed, then get renamed out of the way.
 
37168 53 d 20 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/user/ Simplify onboarding GST guard: same-GST siblings allowed (parallel outlets are normal); block only when a non-internal sibling is in limbo (activation_type REVIVAL, or active=0 with closed=0); drop allowAdditionalOutlet override  
37156 54 d 16 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Partner identity integrity: fork guard + closed-store takeover in updateRetailerDetails (new code only after old store closed, reuse real email/login), idempotent user_accounts upsert replacing blind inserts, selectAllOpenByGstNumber lookup, @Transactional on updateRetailerDetails  
37151 56 d 15 h aman /trunk/ Fix 'Mobile already exist' on retailer save + store code not linking to onboarding panel. (1) RetailerServiceImpl: extract linkStoreCodeToOnboardingPanel and call it for EXISTING stores too, so re-saving Retailer Details heals a panel missing its code (never overwrites, requires verification YES, best-effort). (2) retailer-details form now identifies the partner by the server-rendered loadedUserEmail hidden field instead of the editable email input, so editing email/mobile updates the loaded account instead of tripping the duplicate-mobile check. Bump js version to 384. Case: onboarding 1929 / UKDH1623.  
37102 67 d 17 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Remove dead Counter/PrivateDealUser code: drop unused isFofo, bulkShipmentAmountLimit, verifiedOn, documentVerified fields and accessors; remove dead selectByIds repo methods; drop redundant Counter/PrivateDealUser repository injections in OrderServiceImpl and InvoiceService  
36439 143 d 20 h amit /trunk/profitmandi-dao/src/main/ Add outlet_name field to FofoStore entity, set from address.name on store creation

Adds outlet_name (VARCHAR 255) to FofoStore entity so the store's display
name is persisted directly on fofo_store instead of requiring a join through
retailer_registered_address -> address every time it is needed.

Sets fofoStore.setOutletName(retailerAddress.getName()) in both creation
paths: RetailerServiceImpl.createFofoStoreCodeByRetailerId (primary) and
RetailerController.createFofoStore (secondary).

Includes migration SQL script (migration_outlet_name_to_fofo_store.sql) to
ALTER TABLE and backfill existing rows from address.name. Must be run during
low-traffic window - fofo_store is heavily queried and ALTER takes a metadata
lock that blocks all concurrent SELECTs.
 
36064 180 d 12 h aman /trunk/ Fix:FULL_Stock flow , fin service mark unapplicable ,send invoice to whatsapp by default, update contact list ,Training mail issue  
35971 196 d 13 h aman /trunk/ Feat : Loi 2.0 Enhancement and redesigning  
35956 198 d 20 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 204 d 10 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
 
35440 276 d 13 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/ Optimize getCatalog() and getFofoRetailers() - fix N+1 queries with batch fetching

- getCatalog(): Batch fetch Items and TagListings instead of per-item queries
- getFofoRetailers(): Already optimized with batch fetching for FofoStores, PrivateDealUsers, Counters

🤖 Generated with Claude Code
 
35425 277 d 13 h aman /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Fix:Trial Mail For training and activation mail to user  
35418 277 d 20 h aman /trunk/ Fix:Trial Mail For training and activation mail to user  
35394 279 d 7 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Improved performance  
35372 285 d 13 h aman /trunk/ Fix:Store Code Creation for trial user  
35370 285 d 16 h aman /trunk/ DEBUG:add debugger for trialform  
35360 286 d 14 h aman /trunk/ Feat:Approval page for sales team  
35306 305 d 14 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/user/ Fixed bug related to trial form  
35289 310 d 23 h amit /trunk/ Added trial franchisee feature  

Show All