✨ 登录自动建档写入岗位并订正存量空岗位
- createPlaceholderProfile 写 posts='司机':岗位为空的档案会被派单候选筛掉 - 新增幂等订正脚本,只补 profile_source='login_auto' 且岗位为空的档案 - update_time 不覆盖,脚本内附校验与回退段
This commit is contained in:
+6
@@ -86,6 +86,11 @@ public class DriverServiceImpl extends BaseServiceImpl<DriverMapper, Driver> imp
|
||||
* 档案来源:绑定到已有档案
|
||||
*/
|
||||
private static final String PROFILE_SOURCE_LOGIN_BOUND = "login_bound";
|
||||
/**
|
||||
* 自动建档的默认岗位:从小程序司机端登录即视为司机。
|
||||
* 岗位为空会让档案被派单候选筛掉。
|
||||
*/
|
||||
private static final String PROFILE_DEFAULT_POST = "司机";
|
||||
private static final String CONFLICT_MOBILE_OCCUPIED = "该手机号已被其他账号占用,请联系管理员";
|
||||
private static final String CONFLICT_MOBILE_MULTIPLE = "该手机号存在多条司机档案,请联系管理员核对";
|
||||
|
||||
@@ -187,6 +192,7 @@ public class DriverServiceImpl extends BaseServiceImpl<DriverMapper, Driver> imp
|
||||
driver.setMobile(mobile);
|
||||
driver.setDrivingType("");
|
||||
driver.setDriverType("");
|
||||
driver.setPosts(PROFILE_DEFAULT_POST);
|
||||
driver.setOrganizationName("");
|
||||
driver.setEmergencyContactName("");
|
||||
driver.setEmergencyContactMobile("");
|
||||
|
||||
+1
@@ -106,6 +106,7 @@ class DriverEnsureProfileTest {
|
||||
assertEquals("", saved.getDrivingType());
|
||||
assertEquals("", saved.getDriverType());
|
||||
assertEquals("", saved.getOrganizationName());
|
||||
assertEquals("司机", saved.getPosts(), "岗位为空会被派单候选的 posts 过滤筛掉,新注册司机就选不到");
|
||||
assertEquals("", saved.getEmergencyContactName());
|
||||
assertEquals("", saved.getEmergencyContactMobile());
|
||||
assertEquals(1, saved.getStatus());
|
||||
|
||||
Reference in New Issue
Block a user