|
@@ -1,6 +1,8 @@
|
|
package com.care.common.service.impl;
|
|
package com.care.common.service.impl;
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
+import com.care.common.cache.RedisKeyConstant;
|
|
|
|
+import com.care.common.cache.RedisUtil;
|
|
import com.care.common.enums.SmsTemplateTypeEnum;
|
|
import com.care.common.enums.SmsTemplateTypeEnum;
|
|
import com.care.common.service.VoiceSendService;
|
|
import com.care.common.service.VoiceSendService;
|
|
import com.care.common.util.VoiceUtil;
|
|
import com.care.common.util.VoiceUtil;
|
|
@@ -9,6 +11,8 @@ import com.tencentcloudapi.vms.v20200902.models.SendStatus;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @Author: lilt
|
|
* @Author: lilt
|
|
* @Date: 2021/6/5
|
|
* @Date: 2021/6/5
|
|
@@ -16,6 +20,8 @@ import org.springframework.stereotype.Service;
|
|
*/
|
|
*/
|
|
@Service
|
|
@Service
|
|
public class VoiceSendServiceImpl implements VoiceSendService {
|
|
public class VoiceSendServiceImpl implements VoiceSendService {
|
|
|
|
+ @Resource
|
|
|
|
+ private RedisUtil redisUtil;
|
|
|
|
|
|
@Value("${voice.notice.endpoint:#{null}}")
|
|
@Value("${voice.notice.endpoint:#{null}}")
|
|
private String noticeEndpoint;
|
|
private String noticeEndpoint;
|
|
@@ -49,6 +55,8 @@ public class VoiceSendServiceImpl implements VoiceSendService {
|
|
if (sendStatus != null && sendStatus.getCallId() != null){
|
|
if (sendStatus != null && sendStatus.getCallId() != null){
|
|
mySendStatus.setCallId(sendStatus.getCallId());
|
|
mySendStatus.setCallId(sendStatus.getCallId());
|
|
mySendStatus.setSessionContext(sendStatus.getSessionContext());
|
|
mySendStatus.setSessionContext(sendStatus.getSessionContext());
|
|
|
|
+ //存入redis
|
|
|
|
+ redisUtil.hset(RedisKeyConstant.VOICE_CALLBACK_INFO, sendStatus.getCallId(), sendStatus.getSessionContext(), RedisKeyConstant.VOICE_CALLBACK_INFO_TIME);
|
|
mySendStatus.setSuccess(true);
|
|
mySendStatus.setSuccess(true);
|
|
}
|
|
}
|
|
}
|
|
}
|