| 37528 |
34 d 14 h |
amit |
/trunk/profitmandi-fofo/src/ |
offer circular: apply the supersede rule on ingest (fofo)
A published circular now expires still-running offers from earlier circulars, and
deactivates the web offers they produced, so the same cashback is never current
twice. The converse also holds: re-ingesting an older circular while a newer one is
live leaves it expired rather than resurrecting it.
Older offers remain readable as reference - only status changes, never end_date.
Counts appear in the ingest summary as supersededOlderOffers / expiredAsSuperseded
and, on the web side, supersededOlderMonths / notPublishedSuperseded.
ScopeConfigTest's stub gains the two new CircularIngestRepository methods - the same
brittleness the scripts/offer_circular README notes for JdbcIngestRepo. |
|
/trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/offercircular/CircularIngestService.java /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/offercircular/WebOfferSyncService.java /trunk/profitmandi-fofo/src/test/java/com/spice/profitmandi/web/offercircular/ScopeConfigTest.java
|
| 37526 |
34 d 14 h |
amit |
/trunk/profitmandi-fofo/src/ |
offer circular: scope config screen, resolve screen, web offer sync (fofo)
Screens (each its own endpoint, under the OFFER CIRCULAR menu):
- /offerCircularScope - add/edit divisions, take a brand in or out of scope,
register label aliases. 'Remove' is in_scope=0 + a required reason, never a
DELETE: offer.division_id is an FK and the history would go with it.
- /offerCircularResolve - the product queue, split out of the review screen. The
editor was a <td colspan=6> pretending to be a form, which is why it never
aligned; it is now master-detail. Naming and Coverage are separate tabs because
an alias cannot answer a bundle at all - the coverage panel says so and offers
the two answers that ARE safe (ignore, or reclassify as naming).
Ingest:
- ScopeConfig resolves division aliases and carries the canonical label on
Decision. insertOffer and ProductAliases.find use it; offer_raw_row keeps the
verbatim label, being the source of truth for re-parsing.
- CircularIngestRunner publishes to dtr.web_offer after the document is marked
PUBLISHED, in its own transaction with exceptions swallowed - a circular that
parsed correctly must stay published even if the web sync fails.
Review screen:
- the ingest summary was a raw Map.toString() inside a nowrap span and ran off
the card; now parsed into chips with the drop reasons behind a disclosure.
jsVersion -> 417 (merged with r37525's 412; cssVersion 53 kept from that commit). |
|
/trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/OfferCircularScopeController.java /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/offercircular/WebOfferSyncService.java /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/offer-circular-resolve.vm /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/offer-circular-scope.vm /trunk/profitmandi-fofo/src/main/webapp/resources/js/offer-circular-resolve.js /trunk/profitmandi-fofo/src/main/webapp/resources/js/offer-circular-scope.js /trunk/profitmandi-fofo/src/test/java/com/spice/profitmandi/web/offercircular/ScopeConfigTest.java /trunk/profitmandi-fofo/src/test/java/com/spice/profitmandi/web/offercircular/WebOfferSyncServiceTest.java
/trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/config/AppConfig.java /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/OfferCircularController.java /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/offercircular/CircularIngestRunner.java /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/offercircular/CircularIngestService.java /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/offercircular/ScopeConfig.java /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/admin.vm /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/include-scripts.vm /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/offer-circular-review.vm /trunk/profitmandi-fofo/src/main/webapp/resources/js/offer-circular-review.js
|