| Rev |
Age |
Author |
Path |
Log message |
Diff |
| 37528 |
1 m |
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. |
|
| 37527 |
1 m |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/offers/ |
offer circular: a new month supersedes every older one
Publishing a circular expires still-running offers from earlier circulars, at the
offers level and again for the web offers they produced.
Why: the new circular restates whatever is still live, so leaving the old month
ACTIVE means the same cashback is current twice. Verified Aug'26 -> Sep'26: all 24
SKUs covered by August's four still-running Apple offers were carried into
September, six of them twice.
- expireOlderDocumentOffers: status ACTIVE -> EXPIRED for earlier documents.
end_date is deliberately NOT touched - it is what the OEM said, and older offers
stay readable as reference. They simply stop being current.
- expireIfSuperseded: the converse, so re-ingesting an OLD circular while a newer
one is live cannot resurrect it. With both, 'newest circular wins' holds whatever
order documents are ingested in.
- deactivateOlderPeriods / hasNewerPublishedPeriod do the same for dtr.web_offer.
Verified on real data in a rolled-back transaction: publishing Sep expired 165
still-ACTIVE Aug offers (many stale since the 18 Aug ingest), Sep did not expire
itself, and re-ingesting Aug while Sep is live self-expired its 4 revived offers. |
|
| 37526 |
33 m |
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). |
|
| 37525 |
34 m |
amit |
/trunk/profitmandi-dao/src/ |
offer circular: division aliases, portal-editable scope, web offer sync (dao)
- division_alias support: CircularIngestRepository.selectDivisionAliases so an
alternate OEM label resolves onto an existing division instead of dropping the
rows as UNKNOWN. Both pdf_label columns are ALIASED - Hibernate discovers
native-query results by name and throws NonUniqueDiscoveredSqlAlias on a dup.
- OfferScopeRepository{,Impl}: write side for scope config (add/edit a division,
in_scope toggle, label aliases). Kept apart from OfferCurationRepository, whose
contract is limited to product_alias - a bad alias mismaps one product, a bad
scope change silently drops a whole brand.
- OfferCircularRepositoryImpl: label-side division join now resolves through
division_alias (dva), otherwise an UNPARSED row under an aliased label is hidden
by the inScopeOnly filter - exactly the rows the review screen exists to show.
Also isoDate(): period_month left as java.sql.Date serialised to epoch millis,
which an <input type=date> silently rejects, so the circular filter cleared
itself and every circular showed every row.
- WebOfferSyncRepository{,Impl} + migration: publish a parsed circular into
dtr.web_offer / web_offer_product. Anchored on (document, page, row) stored as
VALUES, never offers.offer.id, which is recreated on every re-ingest. source
defaults to MANUAL so the 3850 hand-typed rows are untouched; web_offer_sync_shadow
is what lets a human edit win over a later sync. |
|
| 37524 |
17 h 8 m |
ranu |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/enumuration/onBorading/ |
loi process added, revival and code changes process |
|
| 37523 |
17 h 9 m |
ranu |
/trunk/ |
loi process added, revival and code changes process |
|
| 37522 |
22 h 41 m |
ranu |
/trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/ |
rbm drr dashboard po fragment ui modification |
|
| 37521 |
23 h 20 m |
ranu |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/ |
rbm drr dashboard position wise data |
|
| 37520 |
23 h 21 m |
ranu |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/ |
rbm drr dashboard position wise data |
|
| 37519 |
23 h 22 m |
ranu |
/trunk/ |
rbm drr dashboard position wise data |
|
| 37518 |
1 d 6 h |
ranu |
/trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ |
notification scheduler |
|
| 37517 |
1 d 22 h |
ranu |
/trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/ |
rbm drr dashboard position wise data |
|
| 37516 |
1 d 23 h |
ranu |
/trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ |
pending loi download access given to raj singh |
|
| 37515 |
1 d 23 h |
ranu |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/ |
notification live fix conflict in app config |
|
| 37514 |
1 d 23 h |
ranu |
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/enumuration/ |
notification live |
|
| 37513 |
1 d 23 h |
ranu |
/trunk/ |
notification live |
|
| 37512 |
1 d 23 h |
ranu |
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/ |
notification live |
|
| 37511 |
1 d 23 h |
ranu |
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/enumuration/ |
notification live |
|
| 37510 |
1 d 23 h |
ranu |
/trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/ |
sales target and achievement added cron and flags |
|
| 37509 |
1 d 23 h |
ranu |
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/enumuration/ |
rbm drr dashboard , all today po rbm view maped |
|