diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/YxtCallBackDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/YxtCallBackDTO.java new file mode 100644 index 0000000..4a1a5a2 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/YxtCallBackDTO.java @@ -0,0 +1,43 @@ +/** + * Copyright 2023 json.cn + */ +package com.ningdatech.pmapi.meeting.entity.dto; + +import lombok.Data; + +import java.time.LocalDateTime; + +/** + *
+ * 电话结果回调内容 + *
+ * + * @author WendyYang + * @since 2023/4/17 + **/ +@Data +public class YxtCallBackDTO { + + private Integer duration; + + private String pressKey; + + private String receiveNumber; + + private LocalDateTime dialEndTime; + + private Integer resultCode; + + private Integer retryNumber; + + private String failCode; + + private LocalDateTime dialBeginTime; + + private String sendNumber; + + private String failReason; + + private String transactionId; + +} \ No newline at end of file diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/task/ExpertCallResultRewriteTask.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/task/ExpertCallResultRewriteTask.java index 518c69a..92be74b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/task/ExpertCallResultRewriteTask.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/task/ExpertCallResultRewriteTask.java @@ -1,7 +1,6 @@ package com.ningdatech.pmapi.meeting.task; import cn.hutool.core.util.ObjectUtil; -import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; @@ -14,6 +13,7 @@ import com.ningdatech.pmapi.meeting.entity.domain.ExpertInviteRule; import com.ningdatech.pmapi.meeting.entity.domain.Meeting; import com.ningdatech.pmapi.meeting.entity.domain.MeetingExpert; import com.ningdatech.pmapi.meeting.entity.dto.RandomInviteRuleDTO; +import com.ningdatech.pmapi.meeting.entity.dto.YxtCallBackDTO; import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertAttendStatusEnum; import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertInviteTypeEnum; import com.ningdatech.pmapi.meeting.helper.YxtCallOrSmsHelper; @@ -28,7 +28,6 @@ import com.ningdatech.yxt.model.cmd.SendSmsCmd.SendSmsContext; import com.ningdatech.yxt.service.ISysMsgRecordDetailService; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; import org.springframework.stereotype.Component; @@ -69,6 +68,8 @@ public class ExpertCallResultRewriteTask { private final IExpertUserFullInfoService userFullInfoService; private final static int MINUTES_CALL_RESULT_FEEDBACK = 15; + private static final String AGREE_KEY = "1"; + @PostConstruct public void initTask() { if (!randomInviteProperties.getEnable()) { @@ -77,7 +78,8 @@ public class ExpertCallResultRewriteTask { } Instant startTime = Instant.now().plus(randomInviteProperties.getResultRewriteFixedRate(), ChronoUnit.MINUTES); // 处理电话结果回填 - scheduler.scheduleAtFixedRate(this::rewritePhoneCallResult, startTime, Duration.ofMinutes(randomInviteProperties.getResultRewriteFixedRate())); + Duration fixedRate = Duration.ofMinutes(randomInviteProperties.getResultRewriteFixedRate()); + scheduler.scheduleAtFixedRate(this::rewritePhoneCallResult, startTime, fixedRate); } @@ -101,7 +103,7 @@ public class ExpertCallResultRewriteTask { if (!randomRuleIds.isEmpty()) { List