无关风月
2024-11-26 5cf8494a6da08dfcdc5fdb4c5e55aefd8b27d684
xinquan-auth/src/main/java/com/xinquan/auth/service/SysLoginService.java
@@ -281,6 +281,8 @@
                return CacheConstants.APP_CHANGE_PHONE_CODE_PREFIX;
            case 6:
                return CacheConstants.ADD_CARD_PHONE_CODE_PREFIX;
            case 7:
                return CacheConstants.MANAGEMENT_PASSWORD_SECRET_PREFIX;
            default:
                return "";
        }
@@ -303,10 +305,10 @@
                    TimeUnit.MINUTES);
            log.info("发送验证码成功,手机号:{} 验证码:{}", cellPhone, code);
            // TODO 修改sender参数及templateId
//             HuaWeiSMSUtil.sendSms("[\"" + code + "\"]", cellPhone, "8824110423893",
//                     "767ad27dce184a32a4b4863517fbd301");
             HuaWeiSMSUtil.sendSms("[\"" + code + "\"]", cellPhone, "8824110423893",
                     "767ad27dce184a32a4b4863517fbd301");
            hwSendSms.sendSms(code, cellPhone);
//            hwSendSms.sendSms(code, cellPhone);
        } catch (Exception e) {
            log.error("发送短信失败", e);
            throw new ServiceException("验证码发送失败");
@@ -331,7 +333,7 @@
        }
        // 查询用户信息
        AppUser appUser = remoteAppUserService.getUserByCondition(
                AppUserDTO.builder().cellPhone(body.getCellPhone()).device(body.getDevice()).build(),
                AppUserDTO.builder().cellPhone(body.getCellPhone()).build(),
                SecurityConstants.INNER).getData();
        if (StringUtils.isNull(appUser)) {
            recordLogService.recordLogininfor(body.getCellPhone(), Constants.LOGIN_FAIL,