Subversion Repositories SmartDukaan

Rev

Show changed files | Directory listing | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
36313 3 h 30 m ranu /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/ rbm rating dashboard view commited  
36312 3 h 37 m ranu /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/monitors/ rbm rating dashboard view commited  
36311 3 h 55 m ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/ rbm rating dashboard view commited  
36310 11 h 37 m amit /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/controller/checkout/ Complete applyColorChange rename: caller + handler method

r36305 renamed OrderServiceImpl.notifyColorChange -> applyColorChange but missed the
caller in this controller and the handler method name. Completes the rename so trunk
compiles. REST endpoint URL /order/notify-color-change is preserved as an external
contract.
 
36309 11 h 37 m amit /trunk/profitmandi-dao/src/main/ Route phantom orders to per-region Dummy warehouse; complete applyColorChange rename

- Phantom allocations in getFulfillments route to the Dummy/GOOD/OURS warehouse under
vendor 40 for the partner's billing region. WarehouseServiceImpl.ensureDummyForBillingRegion
returns the existing Dummy or creates one on the fly. createVendorWarehouse hook auto-seeds
a Dummy when a new billing region's first warehouse is created.
- WarehouseRepository.selectByVendorBillingAndType supports the lookup.
- OrderService interface: rename notifyColorChange -> applyColorChange to match r36305's impl
rename (r36305 renamed only the impl, leaving trunk inconsistent).
- PurchaseOrderServiceImpl: remove auto-rebalance on PO receive. Real-wh rebalancing and
phantom-to-real binding are now ops-driven via the order billing UI
(changeFulfillmentWarehouse / applyColorChange / moveOrdersFulfilmentWarehouse).
- migration_dummy_warehouses.sql: idempotent seeding script for 14 Dummy/GOOD/OURS warehouses
under vendor 40, one per WAREHOUSE_MAP billing region that lacked one. Already applied to
hadb1 and local.
 
36308 11 h 37 m amit /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/ Add DEFAULT_FALLBACK_VENDOR_ID constant

Vendor id 40 ('Dummy') is the fallback routing marker when no real vendor has
pricing for a catalog. Each billing region has a Dummy/GOOD/OURS warehouse under
this vendor; phantom allocations route there.
 
36307 17 h 52 m ranu /trunk/profitmandi-fofo/src/main/ rbm rating dashboard view commited  
36306 1 d 3 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/ Batch processing: BatchScheduledTasks, helpers for offer/sellin/partnerLimit, CronBatchService, OpenCV fix for Apple Silicon, CLI triggers  
36305 1 d 3 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  
36304 2 d 16 h aman /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/ Fix:Show ICICI Bank Ltd in fullstock req pannel  
36303 2 d 17 h aman /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ Feat:Separate partner name and code into different columns in Partner Credit Report  
36302 2 d 17 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/catalog/ Add 2-min cache on Catalog.selectAllGoodStockBrandWise

Hottest query right now on the DB: 3851 execs x 297ms = ~1143 s over
2.9h uptime. Fired once per target-slab in TodayOfferServiceImpl's
findAllTodayOffer loop whenever the slab has no explicit catalog IDs.

Input is a single String brand (only ~10 brands), output is a list of
Catalog entities with no associations (all primitive/String columns,
no lazy-init risk) and the caller only invokes getBrand/getId on the
results. Safe to cache in the existing in-memory Caffeine
twoMintimeoutCacheManager.

Default Spring key (= brand) is stable; unless skips empty results.
 
36301 2 d 18 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/ code optimization of today po rbm page  
36300 2 d 19 h amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/config/ Bump JS version to 331 to bust cache for GRN correction auto-approve UI change  
36299 2 d 19 h amit /trunk/profitmandi-fofo/src/main/ GRN correction: surface autoApproved flag to UI

Controller returns {status, autoApproved} JSON; JS shows an
'auto-approved' message when the request bypasses approval, otherwise
the existing 'raised for approval' message. Pairs with dao r36298.
 
36298 2 d 19 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/warehouse/ GRN correction: auto-approve IMEI-only and color-only changes

When a correction request contains only IMEI swaps or item swaps where
old and new items share modelName+modelNumber (color-only change), the
request is persisted as APPROVED with requester as approver and applied
immediately. Mixed/model/qty changes continue to go through the existing
PENDING approval flow.
 
36297 2 d 20 h amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/monitors/ Fix MonitorController autowiring after @Cacheable proxy

UserWalletRepositoryImpl now has @Cacheable (r36296), which makes Spring
wrap it in a JDK interface proxy. MonitorController autowired the concrete
class, breaking startup with BeanNotOfRequiredTypeException. Switch to the
interface UserWalletRepository, matching every other repository injection
in the file.
 
36296 2 d 20 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Add 2-min cache on dashboard-family queries

Three queries dominate dashboard DB time (~830 s / 30 min combined) because
they re-execute on every dashboard refresh with near-identical parameters:

- OrderRepositoryImpl.selectPartnersBilledBetweenDates: dynamic endDate is
LocalDateTime.now(), so cache key bucketed to 2-minute boundaries via SpEL
(endDate.toEpochSecond / 120) so calls in the same bucket share an entry.
- UserWalletRepositoryImpl.getPartnerWiseCollectionAchievement and
RbmTargetServiceImpl.getWeeklyBillingDataForMonth: default Spring key
(fofoIds + startDate) is stable, no bucketing needed.

All three use the existing Caffeine 'twoMintimeoutCacheManager' (in-memory,
per-JVM, expireAfterWrite=2min). unless clause skips caching empty results
so legitimately-empty responses don't pin a bad entry.
 
36295 2 d 20 h amit /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/web/client/ Plug response-entity leak in RestClient

Apache HttpClient connections are released back to the PoolingConnectionManager
only when the response entity is fully consumed. Error paths in execute(),
executeMandii(), and executeJson() threw before consumeQuietly was called,
leaking pool slots and accumulating CLOSE_WAIT sockets against Solr, Tomcat,
and external APIs. Wrap each in try/finally with EntityUtils.consumeQuietly
so the connection is always returned. Methods that return raw HttpResponse
(getResponse, postResponse) are still caller-close responsibility.
 
36294 2 d 22 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/ Remove @Cacheable from getFirstBillingDate

Temporary revert while cache null-handling is reviewed end-to-end.
The method returns null for partners with no billing history; the
Redis cache (disableCachingNullValues) was causing log noise even
after unless="#result == null" was added. Reverting to direct DB
lookup until a proper caching strategy (e.g. per-cache nulls or
Optional return type) is decided.
 

Show All