| | |
| | | import com.xinquan.auth.form.AppLoginBody; |
| | | import com.xinquan.auth.form.AppRegisterBody; |
| | | import com.xinquan.auth.form.VerifyResultVO; |
| | | import com.xinquan.auth.util.HWSendSms; |
| | | import com.xinquan.auth.util.HuaWeiSMSUtil; |
| | | import com.xinquan.common.core.constant.CacheConstants; |
| | | import com.xinquan.common.core.constant.Constants; |
| | |
| | | |
| | | LoginUser userInfo = userResult.getData(); |
| | | SysUser user = userResult.getData().getSysUser(); |
| | | if (user.getStatus().equals("1")){ |
| | | throw new ServiceException("对不起,您的账号:" + username + " 已被冻结,请联系管理员"); |
| | | } |
| | | if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) |
| | | { |
| | | recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "对不起,您的账号已被删除"); |
| | |
| | | default: |
| | | return ""; |
| | | } |
| | | |
| | | } |
| | | @Autowired |
| | | private HWSendSms hwSendSms; |
| | | /** |
| | | * 发送验证码 |
| | | * |
| | |
| | | TimeUnit.MINUTES); |
| | | log.info("发送验证码成功,手机号:{} 验证码:{}", cellPhone, code); |
| | | // TODO 修改sender参数及templateId |
| | | HuaWeiSMSUtil.sendSms("[\"" + code + "\"]", cellPhone, "8824110423893", |
| | | "767ad27dce184a32a4b4863517fbd301\n"); |
| | | // HuaWeiSMSUtil.sendSms("[\"" + code + "\"]", cellPhone, "8824110423893", |
| | | // "767ad27dce184a32a4b4863517fbd301"); |
| | | |
| | | hwSendSms.sendSms(code, cellPhone); |
| | | } catch (Exception e) { |
| | | log.error("发送短信失败", e); |
| | | throw new ServiceException("验证码发送失败"); |