Subversion Repositories SmartDukaan

Rev

Show changed files | Directory listing | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
37515 4 m ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/ notification live fix conflict in app config  
37514 6 m ranu /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/enumuration/ notification live  
37513 7 m ranu /trunk/ notification live  
37512 12 m ranu /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/ notification live  
37511 13 m ranu /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/enumuration/ notification live  
37510 14 m ranu /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/ sales target and achievement added cron and flags  
37509 15 m ranu /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/enumuration/ rbm drr dashboard , all today po rbm view maped  
37508 41 m ranu /trunk/ notification live new ....api and modification , ui  
37507 42 m ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/ rbm drr dashboard , all today po rbm view maped  
37506 42 m ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/ rbm drr dashboard , all today po rbm view maped  
37505 1 h 4 m ranu /trunk/ rbm drr dashboard , all today po rbm view maped  
37504 1 h 54 m amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/invoicing/ Stop invoice read paths creating directories (AccessDeniedException 500s)

getInvoicePath called Files.createDirectories, and getInvoiceFile called it on every
download. Invoices are generated by the cron app as root, so /SaholicInvoices/<month>
is 755 root-owned; a download served by Tomcat cannot create a retailer subdirectory
and threw AccessDeniedException.

It threw on line 1 of getInvoiceFile, before the Files.exists check, so the
ProfitMandiBusinessException on the next line was unreachable and the callers'
deliberate 404 handler ("Invoice not yet generated, please retry shortly") never ran.
Downloads for a not-yet-generated invoice 500ed instead of 404ing - the exact log
noise that handler was added to remove.

Split the path computation out: resolveInvoicePath is side-effect free and used by
getInvoiceFile; getInvoicePath keeps the mkdir for the two generation callers
(InvoiceService:558, GstProService:952). The legacy relocation branch creates the
target directory only when there is actually a file to move.

No ops change needed - generation as root already works.
 
37503 2 h 18 m ranu /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/ sales target and achievement added cron and flags  
37502 2 h 21 m ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/integrations/icicilombard/model/ sales target and achievement added cron and flags  
37501 2 h 27 m ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/integrations/icicilombard/model/ sales target and achievement added cron and flags  
37500 2 h 34 m ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/ sales target and achievement added cron and flags  
37499 2 h 44 m ranu /trunk/ sales target and achievement added cron and flags  
37498 2 h 58 m amit /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/ Fix: namespace document-level handlers in remaining vm fragments

Completes the sweep started in r37493/r37494. These fragments are injected
with .html(), which re-executes their inline <script>, so every load stacked
another $(document) delegated handler. Mutating handlers then fired N
identical requests and were rejected as duplicates; read-only ones silently
fired N GETs (never deduped, so no alert - just N times the load).

35 fragments, 70 bindings. Adopts the create-purchase-return.vm convention:
one $(document).off('.ns') before the first binding, every event namespaced,
so only the newest binding survives a re-injection.

Notes:
- ticket.vm binds via jQuery(document).on, which the earlier passes did not
match, and its clear must sit OUTSIDE ready() - that callback fires async,
so an inside-ready clear would wipe the top-level binds registered before it.
- agreement-esign-panel, full-stock-payment-panel and create-purchase-return
were left alone; they already clear their handlers (selector-targeted
.off('click', sel) and .off('.createpr') respectively).

Behaviour-preserving: every diff line is either a namespace suffix on an
event string or a new off() call. Selectors, handlers and ordering untouched.
Verified no unprotected document-level bindings remain in any fragment.
 
37497 3 h 2 m ranu /trunk/ rbm drr dashboard , all today po rbm view maped  
37496 3 h 10 m amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/ Handle empty IN collections instead of failing the query

An empty IN list rendered as "in ()" (invalid SQL) or threw, in three inconsistent ways:
SQLGrammarException from prepareInPredicate, RuntimeException from prepareEqualPredicate,
and ProfitMandiBusinessException from selectAllByInOrderByDesc. A partner with no activity
for a brand legitimately produces an empty set, so these were 500ing on valid input
(~436 errors/week, mostly V2FofoSchemeController.getBrandWiseIncome).

An empty IN matches nothing: route every IN site through inPredicateOrNone, which returns
an empty disjunction. Empty NOT IN excludes nothing, so it matches everything (conjunction).
selectAllByInOrderByDesc returns an empty list without a DB round-trip.

Also covers three sites that had no guard at all: selectAllByInEqualOrderBysDesc,
selectCountByIn and mapToPredicate. Public API unchanged.
 

Show All