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
35453 212 d 1 h amit /trunk/ Optimize /indent/today_po_rbm endpoint - reduce DB queries by ~99%

- Consolidate 5 weekly billing queries into 1 using SQL CASE statements
- Add RbmWeeklyBillingModel for consolidated weekly billing data
- Batch fetch partner collection remarks to avoid N+1 queries
- Batch fetch collection map for all fofoIds to avoid N+1 queries in nested loop
- Reduces ~1160 queries to ~10 queries for 50 RBMs
 
35452 212 d 3 h amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ Fixed npe issue and performance issue  
35451 212 d 3 h amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ Fixed  
35450 212 d 16 h amit /trunk/profitmandi-fofo/src/main/resources/META-INF/ Fixed  
35449 212 d 17 h amit /trunk/profitmandi-dao/src/main/resources/ Add missing think.walnut.digital.recharge.balance.url property to shared properties  
35448 212 d 17 h amit /trunk/profitmandi-web/src/main/resources/META-INF/ Add missing think.walnut.digital.recharge.balance.url property to all environments  
35447 212 d 20 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ Fix N+1 query in refundDnAmount() - batch fetch TagListings  
35446 212 d 20 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ Use selectAllByItems() to avoid duplicate item fetch in checkfocusedModelInPartnerStock

- Pass pre-fetched items to tagListingRepository.selectAllByItems()
- Eliminates redundant itemRepository.selectAllByCatalogIds() call

🤖 Generated with Claude Code
 
35445 212 d 20 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/catalog/ Add selectAllByItems() to avoid duplicate item fetch in tagListingRepository

- Added selectAllByItems(List<Item>) method to TagListingRepository
- Refactored selectAllByCatalogIds() to use selectAllByItems() internally
- Eliminates redundant item fetch when items are already available

🤖 Generated with Claude Code
 
35444 212 d 20 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/cs/ Fix Java 8 compatibility - use Collections.emptyList() instead of List.of()

🤖 Generated with Claude Code
 
35443 212 d 20 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/cs/ Optimize CsService methods - fix N+1 queries with batch fetching

- Add selectByPositionIds() batch method to PartnerPositionRepository
- getPositionCustomRetailerMap(): Batch fetch PartnerPositions and PartnerRegions
- getRegionPartners(): Batch fetch PartnerRegions upfront
- getAuthUserPartnerEmailMapping(): Batch fetch positions and AuthUsers
- getAuthUserPartnerIdMapping(): Batch fetch positions and AuthUsers

🤖 Generated with Claude Code
 
35442 212 d 20 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ Optimize checkfocusedModelInPartnerStock() - fix N+1 queries with batch fetching

- Reduced ~23,500 DB calls to ~12 batch queries
- Batch fetch customRetailers, inventory snapshots, GRN orders, items, tagListings upfront
- Fixed bug: partnerIdSalesHeadersMap.get(fofoStore.getId()) instead of get(fofoStore)

🤖 Generated with Claude Code
 
35441 212 d 20 h amit /trunk/profitmandi-fofo/src/main/resources/META-INF/ Remove duplicate properties - now inherited from shared-*.properties in profitmandi-dao

🤖 Generated with Claude Code
 
35440 212 d 20 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
 
35439 212 d 21 h amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ Fixed  
35438 212 d 21 h amit /trunk/profitmandi-fofo/src/main/resources/ Fix log4j2.xml: restore server paths (/var/log/tomcat7)  
35437 213 d 0 h amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ Fixed  
35436 213 d 2 h amit /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/util/offer/formatting/ Handle non-compliant strings in parseRaw method - First word treated as brand (map key), rest as value - Gracefully handle strings without parentheses - Updated toHtml() to handle empty RAM/storage  
35435 213 d 3 h amit /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/controller/ Add @Transactional(readOnly = true) to GET methods in controllers

Added @Transactional(readOnly = true) to all read-only GET methods across 14 controllers:
- RetailerController (10 methods)
- UserController (16 methods)
- WalletController (5 methods)
- CartController (2 methods)
- StoreController (25 methods)
- DealsController (20 methods)
- ShopController (1 method)
- CustomerController (2 methods)
- NotificationController (3 methods)
- SolrSearchController (2 methods)
- InsuranceController (1 method)
- GatewayController (1 method)
- LeadController (13 methods)
- RechargeController (4 methods)

Total: 105 methods updated

All methods verified to only set @Transient fields on entities, ensuring no dirty writes.
 
35434 213 d 18 h amit /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/ Add @Transactional(readOnly=true) to 12 read-only controllers

Skips dirty checking and snapshot storage for better performance
 

Show All