Subversion Repositories SmartDukaan

Rev

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

Filtering Options

Rev Age Author Path Log message Diff
37588 25 d 9 h amit /trunk/profitmandi-dao/src/main/ Serve partner investment from a 2-minute snapshot instead of a 3-hour cache

getInvestment() was @Cacheable on a 3-hour Redis cache that addAmountToWallet
evicted but consumeAmountFromWallet did not. A partner whose advance payment was
swept straight to a loan had the money counted twice - once as a still-cached
wallet balance, once as the reduced utilisation - overstating their credit limit
by the payment x their tier until the cache expired.

Replaced with fofo.partner_investment, refreshed every 2 minutes by
PartnerInvestmentSweepService. Every coupled term is read in one pass, so wallet
and utilisation (and in-stock and aged-Apple) can never come from different
moments. A shorter TTL would only have made the error rarer - it scales with the
payment, not the delay.

- PartnerInvestment entity/repository + partner_investment_snapshot.sql
- PartnerInvestmentSweepService: 9 batched reads, stores base_value for change
detection, refreshes aged-Apple for partners whose stock moved intra-day
- getInvestment/getInvestmentsForFofoStores both read the snapshot, so the two
paths no longer disagree; live compute retained as fallback
- selectActivatedStockAmountByFofoIds: batches an N+1 that cost 233ms x 1690
partners (6.6 min -> 1.0 s)
- getFirstBillingDates: batches another N+1 (4.6 s -> 0.67 s)
- selectPendingGrnOrders(List) now applies the same SD_START_DATE floor as the
single-partner overload; the two were reporting different GRN-pending
- selectPartnerStockValueMap takes excludeActivated: an activated Apple handset
held past the aging window was added once to in-stock and subtracted twice
(activated stock, then the aged haircut). 90 units, 24 partners, Rs 65.19 lakh
double-deducted. Live-demo passes false - no overlap there.
- applyManualAdjustment: routes the two hand-rolled admin wallet adjustments
through WalletServiceImpl so they take the FOR UPDATE lock
- add_idx_order_grn_pending.sql: covering index, GRN query 1320ms -> 514ms
 
36518 148 d 11 h aman /trunk/ Fix:Fix first po and edge case for bulk order  
35856 222 d 10 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Optimize activated stock query (no cache), move offer cache to Redis, add bulk publish and delete offer  
33306 887 d 13 h amit.gupta /trunk/ Fixed logic for sale in inventory history  
33182 915 d 8 h shampa /trunk/ add fields in price drop table. Add purchase billing summery and sale summery table.  
33120 932 d 8 h amit.gupta /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/ patch for  
33115 932 d 13 h shampa /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/ spelling correction  
33023 951 d 8 h amit.gupta /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/ fixed InventoryItem  
33015 952 d 7 h amit.gupta /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/ Fixed added lower case  
31860 1256 d 12 h tejbeer /trunk/ change  
31163 1419 d 10 h amit.gupta /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/ Fixed  
30652 1565 d 9 h amit.gupta /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Added sellin margin payout  
30523 1590 d 15 h amit.gupta /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/ Fixed ahead issue  
29571 1792 d 7 h amit.gupta /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/  
29095 1862 d 12 h amit.gupta /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/  
29093 1862 d 12 h amit.gupta /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/  
26304 2438 d 14 h amit.gupta /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/  
26303 2438 d 16 h amit.gupta /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/  
26299 2438 d 22 h amit.gupta /trunk/ Added activation as seperate table  
26213 2452 d 15 h amit.gupta /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/  
24718 2759 d 19 h amit.gupta /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/  
24607 2777 d 10 h amit.gupta /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/  
24402 2835 d 14 h amit.gupta /trunk/ Fixed date formatting  
23983 2980 d 10 h amit.gupta /trunk/ Fixed price drop  
23527 3105 d 13 h ashik.ali /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Feature : Recharge Commission, some improvements, recharge live integration  
23509 3106 d 18 h amit.gupta /trunk/ Checking in Returns and added cron like behaviour to profitmandi  
23329 3165 d 14 h ashik.ali /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Retailer Update Panel  
23110 3206 d 8 h ashik.ali /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/  
23019 3225 d 14 h ashik.ali /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/  
22859 3255 d 10 h ashik.ali /trunk/profitmandi-dao/  
22352 3323 d 14 h ashik.ali /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/  
22216 3346 d 13 h ashik.ali /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/  
22009 3366 d 7 h ashik.ali /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/  
21984 3367 d 14 h kshitij.sood /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/  
21924 3372 d 14 h ashik.ali /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/ hashCode and equals method  
21714 3400 d 11 h ashik.ali /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/  
21710 3401 d 8 h ashik.ali /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/  
21662 3407 d 11 h kshitij.sood /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/  
21653 3408 d 9 h ashik.ali /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/  
21640 3409 d 23 h kshitij.sood /trunk/