🐛 修复登录自动建档把脱敏手机号写入司机档案

This commit is contained in:
2026-10-23 18:05:20 +08:00
parent e54359c113
commit 7fa20747ab
4 changed files with 62 additions and 33 deletions
@@ -134,6 +134,10 @@ public class DriverServiceImpl extends BaseServiceImpl<DriverMapper, Driver> imp
if (mobile == null) {
throw new ServiceException("手机号不能为空");
}
// 脱敏手机号(如 155****2748)不是可用的业务数据:写进档案后按手机号查不到司机
if (mobile.contains("*")) {
throw new ServiceException("手机号无效,不能写入司机档案");
}
// 查找顺序固定为 user_id → phone:user_id 是账号的稳定标识,
// phone 会被运营商二次放号
Driver bound = findDriverByUserId(mpUserId);