Subversion Repositories SmartDukaan

Rev

Show changed files | Directory listing | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
37844 1 d 3 h amit /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/ refactor(warehouse): drop WAREHOUSE_MAP and WAREHOUSE_NAME_MAP - billing warehouses, their labels and status now come from transaction.sellerwarehouse (BillingWarehouseService)  
37824 5 d 1 h amit /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/ feat(warehouse): add HR Gurugram warehouses 13368/13370/13372 to WAREHOUSE_MAP

HR-NSSPL/GGN, HR-NSSPL/DL and HR-NSSPL/UPW (seller 21 NSSPL-HR-GGN, 06AACCN9802G2ZI)
in WAREHOUSE_MAP and WAREHOUSE_NAME_MAP, so the PO / GRN destination lists, vendor
warehouse lookup, Solr availability fields and warehouse reports include them.
Labels are the warehouse display names; 'HR' stays 7720.
 
37800 8 d 3 h ranu /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/ offer-radar notification commit  
37799 8 d 4 h ranu /trunk/ offer-radar notification commit  
37794 8 d 6 h ranu /trunk/ offer-radar notification commit  
37789 8 d 9 h amit /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/util/ FormattingUtils.formatDigit: print whole numbers, as intended

digitFormatter set the MINIMUM fraction digits twice and never set the
maximum, so Java's default of 3 applied: formatDigit(84745.76f) rendered
"84,745.758" - float noise at three decimals - where a whole number was
meant. The second call was clearly a typo for setMaximumFractionDigits(0).

Only one other call site (ItemCriteria "with Selling Price >= ..."), which
passes whole rupees and is unaffected. Needed by the B2C return refund,
which prints whole-rupee amounts on screen and in mails.
 
37768 12 d 3 h amit /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/util/ feat(supplier): GstinUtil - read state code / PAN from a GSTIN so the GSTIN decides a supplier's state  
37730 15 d 10 h amit /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/ Remove dead third-party integrations: common

Part of the integrations cleanup across all modules. Nothing here had a
live caller.

- Snapdeal product-page parser and UserMessagePojo (affiliate live pricing)
- FundFina request/response DTOs (inbound lender API, removed)
- Aramex XML tracking client (only reachable via /track provider=2)
- WiseApp insurance model
- URL constants for PayU, the SmartPing caller-ID hook, affiliate clicks and
live pricing; the SmartPing agent map
 
37672 19 d 9 h amit /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/util/ Add BrowserLane: machine-wide interlock so only one headless Chrome runs at a time

Every ChromeDriver tree on the app box costs ~850MB RSS, on a host holding a
-Xmx8g tomcat and a -Xmx2g cron jar on 16GB that has been kernel-OOM-killed
twice with tomcat the victim. Peak concurrent drivers is the number that
matters, not drivers per day.

Measured on the oppo/realme lane: a 25-imei chunk takes 505s (12s driver
startup, then ~19.7s an imei) against a fixed 20s fixedDelay, i.e. a 96% duty
cycle. Meanwhile tomcat starts its own driver 8 times a day for the knowlarity
scrape. On 17-Sep that scrape ran 11:40:00-11:41:07 and the lane's next driver
came up at 11:42:21 -- it cleared by 74 seconds, by luck. At a 96% duty cycle
the collision cannot be dodged by choosing better times, only by serialising.

The two JVMs are separate processes owned by different users, so an in-process
flag cannot see across the boundary. Uses an OS file lock at
/var/lock/sd-browser.lock (overridable via -Dsd.browser.lock), created 0666 on
first use because cron runs as root and tomcat as tomcat and whichever starts
first creates it. A file lock rather than a marker file so the kernel reclaims
it when the holder dies: verified by SIGKILLing the holder mid-hold, the next
JVM acquired in 264ms. A ReentrantLock gates it first, since a second thread in
the same JVM would otherwise get OverlappingFileLockException rather than block.

Callers wait rather than skip. The knowlarity scrape needs 67s against a lane
busy 96% of the time, so skip-on-contention would mean it essentially never
refreshed again. Eight scrapes a day costs the imei lane about nine minutes of
waiting in total.

Fails open if the lock file is unusable (missing /var/lock, read-only mount, dev
laptop): serialising within the JVM only, rather than stopping imei activation
over what is a safety interlock.
 
37668 20 d 2 h amit /trunk/profitmandi-common/src/main/ Validate GSTIN shape, state code and checksum

isValidGstNumber accepted any 15-character string, so a pincode (110095, rejected only for
length) and junk (Hdjiekwbdbsjskz) reached fofo_store.gst_number, which billing sends to NIC
as the recipient - the invoice is then refused and the goods cannot ship.

Now: 2-digit state code + PAN + entity + Z + mod-36 check digit, trimmed and upper-cased.
Blank still passes (the field is optional); callers needing one present check that themselves.
Checked against live data: 1,569 of 1,570 well-formed partner GSTINs pass, the one that fails
(HRSP330) has a genuinely wrong check digit.

Adds RTLR_1020 / RTLR_1021 for the invalid and mismatched cases.
 
37665 20 d 3 h amit /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/solr/ Hot Deal brand: optional categoryId on the brand facet, so the chips can be scoped to one tab  
37661 20 d 4 h amit /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/web/client/ Fix trunk: RestClient was left behind by r37655

r37655 deleted MandiiResponse but omitted RestClient from the commit, so
trunk did not compile - RestClient still imported the deleted class.

RestClient now uses RawHttpResponse: executeMandii is renamed executeRaw and
postWithResponse returns the new type. The dead getMandii helper is removed;
its only caller was MandiiService.
 
37655 20 d 5 h amit /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/ Remove the dead Mandii BNPL integration (common)

Mandii has taken no payment since 2022-08-23 and holds no credit account, so
MandiiService and the 29 classes only it used are deleted.

The package had become a home for live types, which are moved out rather than
lost: Gender/MaritalStatus/AddressProofType -> services.kyc (they back
@Enumerated columns on user.fofo_kyc, 317 rows), and the SD Credit account
status model - AccountStatusResponseOut and its 10 dependencies ->
services.sdcredit, still served by GatewayController for SDDIRECT.

MandiiResponse was a generic body+status holder named after the integration;
renamed RawHttpResponse, still used by RestClient for Kommuno recordings.
Its dead getMandii() helper is gone. AccountStatusResponseOut no longer
carries the hardcoded merchant.mandii.com URL it shipped to the app.

FundfinaService was logging under MandiiService.class - fixed.
 
37638 21 d 4 h amit /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/ Hot Deal brand: HOT_DEAL_BRAND constant, oem_brand_s facet and hot-deal brand filter routing  
37627 21 d 9 h amit /trunk/profitmandi-common/src/ feat(mail): drop inactive recipients before send

Add MailRecipientFilter and RecipientFilteringMailSender, which strips To/Cc/Bcc addresses the filter reports inactive and skips a mail left with no recipients instead of failing. AuthenticatedIdentityMailSender now extends it.
 
37619 22 d 5 h amit /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/solr/ Return active_b in the unlimited content search

The offer screen's model picker needs to mark delisted models as inactive when
it is asked to include them. The other unlimited-search callers read only
catalogId_i and title_s, so the extra field changes nothing for them.
 
37514 35 d 3 h ranu /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/enumuration/ notification live  
37513 35 d 3 h ranu /trunk/ notification live  
37512 35 d 3 h ranu /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/ notification live  
37511 35 d 3 h ranu /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/enumuration/ notification live  

Show All