| Rev |
Age |
Author |
Path |
Log message |
Diff |
| 35458 |
25 d 2 h |
amit |
/trunk/ |
Revert @Transactional(readOnly=true) - keep @Transactional only at Controller level
Changes:
- profitmandi-web: Controllers use @Transactional(rollbackFor = Throwable.class) at class level, removed method-level @Transactional(readOnly = true)
- profitmandi-fofo: Controllers use @Transactional(rollbackFor = Throwable.class) at class level, removed method-level @Transactional
- profitmandi-dao: Removed @Transactional from services/repositories
Exceptions (called from interceptors, need own transaction):
- RoleManager: @Transactional(readOnly = true) - called from interceptor for auth
- PartnerTypeChangeServiceImpl.getBestPartner(): @Transactional - called from JWTUtil via interceptor
Fixed javax.transaction.Transactional to org.springframework.transaction.annotation.Transactional
Fixed rollbackOn to rollbackFor for Spring compatibility |
|
| 35457 |
25 d 2 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/ |
Fixed method thats not readonly |
|
| 35456 |
25 d 3 h |
amit |
/trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/controller/ |
Fixed method thats not readonly |
|
| 35455 |
25 d 5 h |
ranu |
/trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/controller/checkout/ |
order controller @Transaction roll back for current |
|
| 35454 |
25 d 7 h |
amit |
/trunk/ |
perf: Optimize N+1 queries and reduce stream iterations in today_po and today_po_rbm endpoints
MonitorController.java:
- Consolidate 12 stream ops on rbmArrViewModels into single loop
- Consolidate 6 stream ops on sold15daysOldAgingModels into single loop
- Consolidate 6 stream ops on weeklyBillingData into single loop
- Merge double iteration loops into single pass operations
- Replace containsKey+get patterns with computeIfAbsent/getOrDefault
- Add extractRbmNames() helper to eliminate duplicated stream operations
CsServiceImpl.java:
- Fix N+1 in getAuthUserIdAndAuthUserMap using batch selectByIds
- Fix N+1 in getTicketIdAndAuthUserMapUsingTickets using batch selectByIds
- Fix N+1 in getAuthUserIdAndAuthUserMapUsingPositions using batch selectByIds
- Fix N+1 in getCategoryIdAndCategoryUsingPositions using batch selectAll
- Fix N+1 in getRegionIdAndRegionMap using batch selectAll
- Fix N+1 in getAuthUserByPartnerId using batch selectByIds
- Fix double N+1 in getAuthUserAndEsclationTypeByPartnerId
- Fix N+1 in authUserpartnerIdMap using selectByPositionIds
- Fix N+1 in getAuthUserIdPartnerIdMappingByCatIds
- Fix N+1 in getAuthUserIdPartnerIdMapping
RbmTargetServiceImpl.java:
- Fix O(n*m) stream filter in getRbmTodayArr using pre-built lookup maps
- Fix O(n*m) stream filter in setMovementWiseRbmTargets using pre-built maps
today_po.vm:
- Optimize template lookups with single get instead of containsKey+get |
|
| 35453 |
25 d 8 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 |
25 d 10 h |
amit |
/trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ |
Fixed npe issue and performance issue |
|
| 35451 |
25 d 10 h |
amit |
/trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ |
Fixed |
|
| 35450 |
25 d 23 h |
amit |
/trunk/profitmandi-fofo/src/main/resources/META-INF/ |
Fixed |
|
| 35449 |
26 d 0 h |
amit |
/trunk/profitmandi-dao/src/main/resources/ |
Add missing think.walnut.digital.recharge.balance.url property to shared properties |
|
| 35448 |
26 d 0 h |
amit |
/trunk/profitmandi-web/src/main/resources/META-INF/ |
Add missing think.walnut.digital.recharge.balance.url property to all environments |
|
| 35447 |
26 d 2 h |
amit |
/trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ |
Fix N+1 query in refundDnAmount() - batch fetch TagListings |
|
| 35446 |
26 d 3 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 |
26 d 3 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 |
26 d 3 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 |
26 d 3 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 |
26 d 3 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 |
26 d 3 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 |
26 d 3 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 |
26 d 3 h |
amit |
/trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ |
Fixed |
|