| Rev |
Age |
Author |
Path |
Log message |
Diff |
| 37845 |
3 d 9 h |
amit |
/trunk/profitmandi-dao/src/ |
feat(warehouse): ACTIVE/SUSPENDED/INACTIVE status + label on sellerwarehouse replace WAREHOUSE_MAP - BillingWarehouseService (active for dashboards, active+suspended for warehouse screens, names in every state, 5 min cache); setup service: guarded status change (no suspend while franchise stores or brand mapping route there, no close while stock/unshipped orders), rename, all-warehouse overview with usage; partner store assignable only to an active warehouse; daily stock alert for suspended/inactive warehouses to logistics/accounts top 2 staffed levels + leadership; dashboard warehouse list = active (replaces r37834 stock-holding loop); migration sellerwarehouse_status_display_name_20261005.sql (applied on hadb1) |
|
| 37840 |
3 d 15 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ |
fix(offers): select month offers by date overlap so multi-month offers show in price circular
selectAll(YearMonth) kept an offer only if its start or end date fell in the month,
so an offer running Sep 24 -> Nov 15 (e.g. 10378) was missing from October's price
circular, partner offer view and getMonthOfferIds. Now start <= month end AND
end >= month start. Offer cache eviction (edit + bulk create) clears every month
the offer covers instead of only the start month. |
|
| 37409 |
43 d 15 h |
vikas |
/trunk/ |
Changed WhatsApp service to botpenguin (DigiWaha) |
|
| 36702 |
134 d 15 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/offers/ |
Add evictMonthCaches for centralized month-level offer cache eviction. Fix createOffers upload path missing catalog.published_yearmonth eviction. Add cache inventory comments to evictOfferCaches. |
|
| 36633 |
140 d 7 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/offers/ |
Fix offer activation cache race: REQUIRES_NEW ensures DB commit before cache eviction, notification failures no longer rollback activation |
|
| 36521 |
150 d 12 h |
amit |
/trunk/ |
Added RequestCachingFilter |
|
| 36486 |
154 d 11 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/offers/ |
offer batch: add reprocess guard and hasUnfinishedBatch check in submitBatchAsync |
|
| 36451 |
159 d 11 h |
amit |
/trunk/profitmandi-dao/src/main/ |
Add reference field to catalog.offer and catalog.scheme for payout collation |
|
| 36374 |
167 d 13 h |
ranu |
/trunk/ |
schemes and offer for v2 version |
|
| 36357 |
169 d 10 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/ |
Fix background-thread 'no session' error in DB guard. CronBatchRepository.selectRunningForOffer uses getCurrentSession() which needs an open tx; when OfferBatchService.processOfferWithBatch is called from the async worker thread (no outer tx), the guard query crashed with 'Could not obtain transaction-synchronized Session'. Offer 8819 submit succeeded but the background run died at the guard — before createBatch, so no cron_batch / cron_batch_item rows. Added CronBatchService.findRunningForOffer wrapping the repo call in @Transactional(readOnly=true); orchestrator calls the service method instead of repo directly. Matches the pattern used by loadOfferRequest / createBatch / calculate*Payouts — every caller opens its own tx. |
|
| 36355 |
169 d 11 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/offers/ |
Skip already-paid partners before creating cron_batch_item rows. Adds hasRemainingSellinPayout / hasRemainingOfferPayout predicates on OfferProcessingHelper that mirror the amount calc in processPartner*Payout. Orchestrator filters partnerPayouts through these before createBatch — partners whose serials are fully paid (amount=0 after subtracting serialNumberPaid) are excluded entirely. Reruns of a completed offer now create no batch at all (log says 'all N eligible partners already fully paid, skipping batch'); partial reruns log filtered count. Avoids audit-trail noise of SUCCESS items that did zero work. |
|
| 36354 |
169 d 12 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ |
DB-backed concurrent-run guard for OfferBatchService.processOfferWithBatch. Adds CronBatchRepository.selectRunningForOffer(offerId) — single HQL query for RUNNING cron_batch rows named processSellinOffer-N or processActivationOffer-N. OfferBatchService early-returns (with a log) if any such row exists. Covers the three gaps the in-memory guard can't: JVM restart, multi-JVM, cron CLI + user click racing. Applies to both sync (cron --processOffersWithBatch) and async (/offer/process HTTP) paths. |
|
| 36347 |
169 d 13 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/offers/ |
Add submitBatchAsync for fire-and-forget /offer/process — schedules processOfferWithBatch on a bounded background pool (3 daemon threads) and returns immediately with a human-readable message. In-memory ConcurrentHashMap.newKeySet() per-offerId guard prevents duplicate concurrent runs for the same offer (the scenario that caused offer 8802 deadlocks). Sync processOfferWithBatch kept unchanged for cron CLI (--processOffersWithBatch). |
|
| 36342 |
169 d 16 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/offers/ |
Add OfferBatchService orchestrator — shared batch entrypoint for offer processing, used by cron CLI and /offer/process controllers. Loads offer, calls calculate*Payouts (read), creates cron_batch, runs each partner in REQUIRES_NEW via OfferProcessingHelper, finalizes batch and emails on partial failure. No @Transactional on the class — must not carry outer tx. |
|
| 36337 |
169 d 16 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/ |
Move CronBatchService and OfferProcessingHelper from cron to dao so web/fofo can reuse the batch infra; fix empty-IMEI NPE in getInventoryItemMap that broke /offer/process for partners with no billed/scanned serials |
|
| 36305 |
172 d 20 h |
amit |
/trunk/profitmandi-dao/src/main/ |
Batch processing infrastructure + per-partner offer processing + partner limit optimization + investment cache eviction on billing/payment/cancellation with 3hr TTL |
|
| 36103 |
192 d 9 h |
amit |
/trunk/profitmandi-dao/src/main/ |
Add DN rejection with full reversal: restore inventory, schemes, price drops, offers; add deny reason to purchase return items; add purchase return notification service |
|
| 36081 |
196 d 8 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ |
Use JDK serialization for Redis caches with Map<Integer,...> keys
GenericJackson2JsonRedisSerializer converts Map Integer keys to String
during JSON serialization. On deserialization, map.get(Integer) returns
null since keys are now Strings. This broke allOffers, offer.slabpayout,
catalog.published_yearmonth, and offer.achievement caches.
Fix: Use JdkSerializationRedisSerializer for these specific caches to
preserve exact Java types. Added Serializable to 9 model classes in the
offer object graph: CreateOfferRequest, TargetSlab, ItemCriteriaPayout,
ItemCriteria, PartnerCriteria, PayoutSlab, AmountModel, QtyAmountModel,
DateRangeModel. |
|
| 36051 |
198 d 12 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ |
Support FIXED per-pc payout with VALUE target: use per-criteria qty for payout calculation, sort payoutSlabs ascending |
|
| 36049 |
198 d 14 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ |
Redesign offer caching: separate definition from achievement, per-partner Redis cache, deep-copy before mutation, centralized eviction |
|