| | |
| | | import cn.stylefeng.roses.kernel.auth.api.pojo.auth.LoginRequest; |
| | | import cn.stylefeng.roses.kernel.auth.api.pojo.auth.LoginResponse; |
| | | import cn.stylefeng.roses.kernel.auth.api.pojo.login.LoginUser; |
| | | import cn.stylefeng.roses.kernel.cache.api.CacheOperatorApi; |
| | | import cn.stylefeng.roses.kernel.customer.api.exception.CustomerException; |
| | | import cn.stylefeng.roses.kernel.customer.api.exception.enums.CustomerExceptionEnum; |
| | | import cn.stylefeng.roses.kernel.customer.api.pojo.CustomerInfo; |
| | |
| | | return new SuccessResponseData(update); |
| | | } |
| | | |
| | | @Resource |
| | | private CacheOperatorApi<CustomerInfo> customerInfoCacheOperatorApi; |
| | | |
| | | @ApiOperation(value = "验证码登录") |
| | | @PostResource(name = "验证码登录", path = RuleConstants.NOT_LOGIN + "/smsCodeLogin", requiredPermission = false, requiredLogin = false) |
| | | public ResponseData<LoginResponse> smsCodeLogin(@RequestBody SysSmsVerifyParam req) { |
| | |
| | | // 验证码通过 |
| | | sysSmsInfoService.validateSmsInfo(req); |
| | | |
| | | |
| | | // //绑定工号 |
| | | // // 幸福顾问 |
| | | // 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); |
| | | |
| | | |
| | | |
| | | // 组装返回结果 |
| | | return new SuccessResponseData<>(customerLoginBizService.phoneLogin(req.getPhone(), CustomerUserTypeEnum.WORKER)); |
| | | } |