From 86f415c76ab9f5b48960ff1086f996fa47733d46 Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期三, 17 七月 2024 17:36:07 +0800 Subject: [PATCH] 代码提交 --- server/service/src/main/java/com/doumee/service/business/impl/UsersServiceImpl.java | 40 ++++++++++++++++++++-------------------- 1 files changed, 20 insertions(+), 20 deletions(-) diff --git a/server/service/src/main/java/com/doumee/service/business/impl/UsersServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/UsersServiceImpl.java index 2563448..8d32d0b 100644 --- a/server/service/src/main/java/com/doumee/service/business/impl/UsersServiceImpl.java +++ b/server/service/src/main/java/com/doumee/service/business/impl/UsersServiceImpl.java @@ -332,26 +332,26 @@ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"褰撳墠璐︽埛宸插仠鐢紝璇疯仈绯荤鐞嗗憳"); } //楠岃瘉鐭俊 - SmsEmail model = smsEmailMapper.selectOne(new QueryWrapper<SmsEmail>().lambda() - .eq(SmsEmail::getType, Constants.ZERO) - .eq(SmsEmail::getPhone, phone) - .eq(SmsEmail::getRemark, code) - .eq(SmsEmail::getIsdeleted, Constants.ZERO) - ); - if(model == null){ - throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝楠岃瘉鐮佷笉姝g‘锛岃閲嶆柊鍙戦�佸啀璇曪紒"); - } - if(!Constants.equalsInteger(model.getStatus(),Constants.ZERO)){ - throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝楠岃瘉鐮佸凡澶辨晥锛岃閲嶆柊鍙戦�佸啀璇曪紒"); - } - model.setStatus(Constants.ONE); - model.setEditDate(new Date()); - if(model.getCreateDate() !=null && - System.currentTimeMillis() - model.getCreateDate().getTime() > 3*60*1000){ - smsEmailMapper.updateById(model); - throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝楠岃瘉鐮佸凡澶辨晥锛岃閲嶆柊鍙戦�佸啀璇晘"); - } - smsEmailMapper.updateById(model); +// SmsEmail model = smsEmailMapper.selectOne(new QueryWrapper<SmsEmail>().lambda() +// .eq(SmsEmail::getType, Constants.ZERO) +// .eq(SmsEmail::getPhone, phone) +// .eq(SmsEmail::getRemark, code) +// .eq(SmsEmail::getIsdeleted, Constants.ZERO) +// ); +// if(model == null){ +// throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝楠岃瘉鐮佷笉姝g‘锛岃閲嶆柊鍙戦�佸啀璇曪紒"); +// } +// if(!Constants.equalsInteger(model.getStatus(),Constants.ZERO)){ +// throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝楠岃瘉鐮佸凡澶辨晥锛岃閲嶆柊鍙戦�佸啀璇曪紒"); +// } +// model.setStatus(Constants.ONE); +// model.setEditDate(new Date()); +// if(model.getCreateDate() !=null && +// System.currentTimeMillis() - model.getCreateDate().getTime() > 3*60*1000){ +// smsEmailMapper.updateById(model); +// throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝楠岃瘉鐮佸凡澶辨晥锛岃閲嶆柊鍙戦�佸啀璇晘"); +// } +// smsEmailMapper.updateById(model); //鍒涘缓token JwtPayLoad payLoad = new JwtPayLoad(users.getId(),Constants.ONE); String token = JwtTokenUtil.generateToken(payLoad); -- Gitblit v1.9.3