Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Show changed files | Directory listing | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
35429 213 d 9 h amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ Remove unnecessary @Transactional from DashboardController

- Removed class-level @Transactional(rollbackOn = Throwable.class)
- All 57 methods in this controller are read-only operations (dashboards, charts, reports)
- No transaction management needed for pure read operations
- Reduces unnecessary connection pool usage
 
35428 213 d 9 h amit /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/controller/checkout/ Refactor OrderController: Move from class-level to method-level @Transactional

- Removed class-level @Transactional(rollbackFor = Throwable.class) from OrderController
- Added method-level @Transactional to 13 write methods only:
- createOrder (GET & POST)
- partnerCancelOrder
- CancellableRequest
- createAddress
- NotifyColorChange
- NotifyHold
- cancelOrder
- cancelNotifyOrder
- raiseBypassRequest
- createSamsungUpgradeOffer
- changeOrderPricing
- createInsurance

Benefits:
- 21 read-only methods no longer hold database connections for entire request duration
- Connections are acquired per-query and released immediately for reads
- Reduces connection pool exhaustion under load
- Follows "validate then transact" pattern
 
35427 213 d 10 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/catalog/ changeList  
35426 213 d 10 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/ eol item remove from listing b2b (solr)  
35425 213 d 10 h aman /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Fix:Trial Mail For training and activation mail to user  
35424 213 d 10 h amit /trunk/ Fix order billing vs cancellation race condition with pessimistic locking

Problem:
- Concurrent billing and cancellation of the same order caused data inconsistency
- Money was refunded to wallet while order was also getting billed

Solution:
- Added pessimistic locking (SELECT FOR UPDATE) to prevent concurrent modifications
- Added validation methods to check order state before billing/cancellation
- Optimized billing method to reduce lock duration with pre-fetching

Changes:
- OrderRepository: Added selectByIdForUpdate, selectByOrderIdsForUpdate,
selectByInvoiceNumbersForUpdate, selectAllByTransactionIdForUpdate,
validateOrdersForBilling, validateOrderForRefund methods
- OrderRepositoryImpl: Implemented locking methods with PESSIMISTIC_WRITE
- TransactionServiceImpl: Updated billing methods with locking, fail-fast
validation, pre-fetching to avoid N+1 queries
- ScheduledTasks: Updated removePartialBillingForTransaction with locking
- TransactionRelatedTasks: Updated reverseRTO with locking
 
35423 213 d 10 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/ Fixed  
35422 213 d 10 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/dtr/ Fixed  
35421 213 d 11 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/ committed for query and testing for soler  
35420 213 d 13 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/ Fix LeadActivity scheduled time to use last updated schedule

- Added selectValueByMaxOfAnotherColumn method to GenericRepository
- Returns valueColumn from row with MAX of another column (e.g., createdTimestamp)
- Updated LeadRepositoryImpl to get schelduleTimestamp from most recently
created LeadActivity instead of MAX schelduleTimestamp
- Supports equalsMap filtering with DateRangeModel
 
35419 213 d 17 h aman /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/controller/ Fix:Response message for registered user  
35418 213 d 17 h aman /trunk/ Fix:Trial Mail For training and activation mail to user  
35417 213 d 18 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/ Fixed  
35416 214 d 11 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/ Fixed Long to Int  
35415 214 d 14 h amit /trunk/ Commit Changes  
35414 214 d 16 h amit /trunk/profitmandi-dao/src/main/resources/ Fixed performance  
35413 214 d 16 h amit /trunk/profitmandi-dao/src/main/resources/ Fixed performance  
35412 214 d 18 h amit /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/controller/ Fixed performance  
35411 214 d 19 h amit /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/controller/ Fixed performance issues  
35410 214 d 19 h amit /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/controller/ Fixed performance issues  

Show All