From d2cdd428461712fda7b4e5402ec3f4fd4869efe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Tue, 14 Apr 2026 11:54:07 +0800 Subject: [PATCH] =?UTF-8?q?feat(referral):=20=E6=B7=BB=E5=8A=A0=E6=8E=A8?= =?UTF-8?q?=E8=8D=90=E5=AE=A2=E6=88=B7=E5=8A=9F=E8=83=BD=E5=8F=8A=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增小程序端推荐客户页面,实现客户信息报备功能 - 添加推荐客户统计与推荐记录展示,支持分页加载更多 - 实现手机号格式校验及报备表单提交逻辑 - 新增拨打客户电话功能 - 在分销商首页添加“推荐客户”入口菜单项 - 新增推荐客户相关API接口,包括报备、查询列表、统计及状态更新 - 完善推荐客户页面样式,提升用户体验 --- .workbuddy/expert-history.json | 2 +- .workbuddy/memory/2026-04-14.md | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.workbuddy/expert-history.json b/.workbuddy/expert-history.json index f15b4ca..c0ada6c 100644 --- a/.workbuddy/expert-history.json +++ b/.workbuddy/expert-history.json @@ -24,5 +24,5 @@ } ] }, - "lastUpdated": 1776103090047 + "lastUpdated": 1776132867828 } \ No newline at end of file diff --git a/.workbuddy/memory/2026-04-14.md b/.workbuddy/memory/2026-04-14.md index c2c5bed..81ba2eb 100644 --- a/.workbuddy/memory/2026-04-14.md +++ b/.workbuddy/memory/2026-04-14.md @@ -40,3 +40,17 @@ - API: `api/shop/referral.ts` - 页面: `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` + `success()`,Controller继承 `BaseController` +- Service层获取登录用户:`SecurityContextHolder.getContext().getAuthentication().getPrincipal()` 强转 `User` +- 按ID查询用户:`userService.getByIdRel(userId)`(非 `getUserById`)