123
This commit is contained in:
@@ -90,11 +90,11 @@ public class AliSmsKit {
|
|||||||
String data = response.getData();
|
String data = response.getData();
|
||||||
JSONObject jsonObject = JSONObject.parseObject(data);
|
JSONObject jsonObject = JSONObject.parseObject(data);
|
||||||
if(jsonObject.get("Code") == null || !"OK".equals(jsonObject.get("Code"))){
|
if(jsonObject.get("Code") == null || !"OK".equals(jsonObject.get("Code"))){
|
||||||
log.error("短信发送失败 response={}", jsonObject.toJSONString());
|
log.error("短信发送失败!phone={}, template={}, response={}", phone, messageTemplate, jsonObject.toJSONString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (ClientException e) {
|
} catch (ClientException e) {
|
||||||
log.error(e.getMessage(),e);
|
log.error("短信发送失败!phone={},template={},e={}",phone,messageTemplate,e.getMessage(),e);
|
||||||
throw new RuntimeException("短信发送失败!");
|
throw new RuntimeException("短信发送失败!");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -105,9 +105,11 @@ public class SmsVerifyServiceImpl extends ServiceImpl<SmsVerifyMapper,SmsVerify>
|
|||||||
throw new ServiceException("请"+(60-diff)+"秒之后再重试发送!");
|
throw new ServiceException("请"+(60-diff)+"秒之后再重试发送!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
long count = userInfoService.count(Wrappers.lambdaQuery(UserInfo.class).eq(UserInfo::getRegIp, clientIP));
|
if(codeEnum == CodeEnum.REGISTER){
|
||||||
if(count > 8){
|
long count = userInfoService.count(Wrappers.lambdaQuery(UserInfo.class).eq(UserInfo::getRegIp, clientIP));
|
||||||
throw new ServiceException("验证码发送失败!2"+count);
|
if(count > 8){
|
||||||
|
throw new ServiceException("验证码发送失败!次数过多!"+count);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
String code = RandomUtil.randomNumbers(6);
|
String code = RandomUtil.randomNumbers(6);
|
||||||
SmsVerify smsVerify = new SmsVerify();
|
SmsVerify smsVerify = new SmsVerify();
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ public class RoomCheckJobService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 检测是不是3分钟没有接听
|
// 检测是不是2分钟没有接听
|
||||||
private JobResp checkRoomCallerTimeOut(Room room){
|
private JobResp checkRoomCallerTimeOut(Room room){
|
||||||
if(!RoomStatusEnums.STATUS_CALLER_CONNECT.getCode().equals(room.getStatus())
|
if(!RoomStatusEnums.STATUS_CALLER_CONNECT.getCode().equals(room.getStatus())
|
||||||
&& !RoomStatusEnums.STATUS_RECEIVER_CONNECT.getCode().equals(room.getStatus())) {
|
&& !RoomStatusEnums.STATUS_RECEIVER_CONNECT.getCode().equals(room.getStatus())) {
|
||||||
|
|||||||
Reference in New Issue
Block a user