feat(referral): 添加推荐客户功能及相关接口
- 新增小程序端推荐客户页面,实现客户信息报备功能 - 添加推荐客户统计与推荐记录展示,支持分页加载更多 - 实现手机号格式校验及报备表单提交逻辑 - 新增拨打客户电话功能 - 在分销商首页添加“推荐客户”入口菜单项 - 新增推荐客户相关API接口,包括报备、查询列表、统计及状态更新 - 完善推荐客户页面样式,提升用户体验
This commit is contained in:
@@ -24,5 +24,5 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"lastUpdated": 1776103090047
|
"lastUpdated": 1776132867828
|
||||||
}
|
}
|
||||||
@@ -40,3 +40,17 @@
|
|||||||
- API: `api/shop/referral.ts`
|
- API: `api/shop/referral.ts`
|
||||||
- 页面: `dealer/referral/index.tsx`
|
- 页面: `dealer/referral/index.tsx`
|
||||||
- 首页入口: 在分销商首页添加「推荐客户」功能
|
- 首页入口: 在分销商首页添加「推荐客户」功能
|
||||||
|
|
||||||
|
### 编译错误修复(10:14)
|
||||||
|
1. **Controller层** - `R.ok()` → `ApiResult` + `success()`,两个Controller均继承 `BaseController`
|
||||||
|
- `CustomerLeadController`: 去掉 `import R`,改用 `ApiResult` + `extends BaseController`
|
||||||
|
- `LeadReferralController`: 同上
|
||||||
|
|
||||||
|
2. **Service层** - `userService.getLoginUser()` 方法不存在
|
||||||
|
- `CustomerLeadServiceImpl`: 去掉 `UserService` 注入,改用私有 `getLoginUser()` 方法(通过 `SecurityContextHolder` 实现,与 `BaseController` 逻辑一致)
|
||||||
|
- `LeadReferralServiceImpl`: 同上;另外修正 `userService.getUserById()` → `userService.getByIdRel()`(`UserService` 仍保留用于按ID查询用户)
|
||||||
|
|
||||||
|
**项目规范记录**:
|
||||||
|
- 返回值用 `ApiResult<T>` + `success()`,Controller继承 `BaseController`
|
||||||
|
- Service层获取登录用户:`SecurityContextHolder.getContext().getAuthentication().getPrincipal()` 强转 `User`
|
||||||
|
- 按ID查询用户:`userService.getByIdRel(userId)`(非 `getUserById`)
|
||||||
|
|||||||
Reference in New Issue
Block a user