| | |
| | | if (StrUtil.isNotBlank(req.getWorkerNo())) { |
| | | // 获取绑定顾问岗位ID(这里做校验) |
| | | customerService.getBindWorkerPostIds(req.getWorkerNo(), PostIdEnum.PO_11, PostIdEnum.PO_21); |
| | | |
| | | //绑定工号 |
| | | // 幸福顾问 |
| | | PostIdEnum post11Enum = PostIdEnum.PO_11; |
| | | // 咨询顾问 |
| | | PostIdEnum post21Enum = PostIdEnum.PO_21; |
| | | |
| | | // 获取绑定顾问岗位ID |
| | | String[] bindWorkerPostIds = customerService.getBindWorkerPostIds(req.getWorkerNo(), post11Enum, post21Enum); |
| | | Customer workerByNo = customerService.getOne( |
| | | Wrappers.<Customer>lambdaUpdate().eq(Customer::getWorkerNo, req.getWorkerNo()).last("LIMIT 1") |
| | | ); |
| | | |
| | | LambdaUpdateWrapper<Customer> wrapper = Wrappers.<Customer>lambdaUpdate().eq(Customer::getCustomerId, validCustomer.getCustomerId()); |
| | | for (String postId : bindWorkerPostIds) { |
| | | if (postId.equals(post11Enum.getCode().toString())) { |
| | | wrapper.set(Customer::getClassWorkerId, workerByNo.getCustomerId()); |
| | | } else if (postId.equals(post21Enum.getCode().toString())) { |
| | | wrapper.set(Customer::getConsultWorkerId, workerByNo.getCustomerId()); |
| | | } |
| | | } |
| | | |
| | | // 修改用户信息 |
| | | Boolean update = customerService.update(wrapper); |
| | | } |
| | | |
| | | // 验证码通过 |
| | | sysSmsInfoService.validateSmsInfo(req); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // 组装返回结果 |
| | | return new SuccessResponseData<>(customerLoginBizService.phoneLogin(req.getPhone(), CustomerUserTypeEnum.USER)); |
| | |
| | | String phoneMd5 = MD5.create().digestHex(md5Salt + req.getPhone()); |
| | | Assert.isTrue(phoneMd5.equals(req.getPhoneMd5()), "手机号验证失败"); |
| | | |
| | | |
| | | |
| | | |
| | | // 组装返回结果 |
| | | return new SuccessResponseData<>(customerLoginBizService.phoneLogin(req.getPhone(), CustomerUserTypeEnum.USER)); |
| | | } |