| Line 62... |
Line 62... |
| 62 |
|
62 |
|
| 63 |
public void persistLeadDetail(LeadDetailModel leadDetailModel, AuthUser authUser) throws ProfitMandiBusinessException;
|
63 |
public void persistLeadDetail(LeadDetailModel leadDetailModel, AuthUser authUser) throws ProfitMandiBusinessException;
|
| 64 |
|
64 |
|
| 65 |
Lead selectByMobileNumber(String mobileNumber);
|
65 |
Lead selectByMobileNumber(String mobileNumber);
|
| 66 |
|
66 |
|
| - |
|
67 |
/**
|
| - |
|
68 |
* Batch mobile lookup for bulk imports — one query instead of one per row.
|
| - |
|
69 |
*
|
| - |
|
70 |
* <p>Takes normalised 10-digit numbers and also matches the prefixed forms that exist in the
|
| - |
|
71 |
* data ({@code 91…}, {@code 0…}): of ~37k leads, 121 are stored 11- or 12-digit, so an exact
|
| - |
|
72 |
* 10-digit match would miss them and a bulk import would create duplicates for real retailers.
|
| - |
|
73 |
*/
|
| - |
|
74 |
List<Lead> selectByMobileNumbers(List<String> normalisedMobiles);
|
| - |
|
75 |
|
| - |
|
76 |
/**
|
| - |
|
77 |
* Open-lead count per owner, for balancing a bulk assignment against what each agent is already
|
| - |
|
78 |
* carrying. Returns {@code [authId, count]} pairs; an agent with none is simply absent.
|
| - |
|
79 |
*/
|
| - |
|
80 |
java.util.List<Object[]> countOpenLeadsByAuthIds(List<Integer> authIds);
|
| - |
|
81 |
|
| 67 |
Lead selectByMobileNumberAndSource(String mobileNumber, String source);
|
82 |
Lead selectByMobileNumberAndSource(String mobileNumber, String source);
|
| 68 |
|
83 |
|
| 69 |
// ---- LMS dashboard aggregation (SOP §18) -------------------------------------------------
|
84 |
// ---- LMS dashboard aggregation (SOP §18) -------------------------------------------------
|
| 70 |
// All aggregates bucket EVERY lead: rows with a real `stage` use it; legacy rows (stage NULL)
|
85 |
// All aggregates bucket EVERY lead: rows with a real `stage` use it; legacy rows (stage NULL)
|
| 71 |
// derive a stage from `status` in SQL, mirroring LeadStage.fromLegacy. Read-only, no schema change.
|
86 |
// derive a stage from `status` in SQL, mirroring LeadStage.fromLegacy. Read-only, no schema change.
|