فهرست منبع

个微SOP发消息完善

吴树波 6 روز پیش
والد
کامیت
20c863aef8

+ 124 - 0
fs-service/src/main/java/com/fs/company/vo/CdrBodyVo.java

@@ -0,0 +1,124 @@
+package com.fs.company.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class CdrBodyVo {
+
+    private String uuid;
+
+    private String cdrType;
+
+    private String cdrBody;
+
+    private Long answeredTime;
+    private Long answeredTimeLen;
+    private String callee;
+    private String caller;
+    private List<ChatContent> chatContent;
+    private String extnum;
+    private String groupId;
+    private String hangupCause;
+    private Long hangupTime;
+    private String id;
+    private Long inboundTime;
+    private String ivrDtmfDigits;
+    private Long manualAnsweredTime;
+    private Long manualAnsweredTimeLen;
+    private String opnum;
+    private OutboundPhoneInfo outboundPhoneInfo;
+    private Integer remoteVideoPort;
+    private Boolean startDtmfExecuted;
+    private Long timeLen;
+    private Boolean transferredSucceed;
+    private String wavFile;
+
+    @Data
+    public static class ChatContent {
+        private String content;
+        private String content_type;
+        private String role;
+        private Integer completionTokens;
+        private Integer promptTokens;
+        private String bizJson;
+    }
+
+    @Data
+    public static class OutboundPhoneInfo {
+        private String acdOpnum;
+        private Long acdQueueTime;
+        private Long acdWaitTime;
+        private Long answeredTime;
+        private Long batchId;
+        private String bizJson;
+        private Long callEndTime;
+        private Integer callcount;
+        private Long calloutTime;
+        private Integer callstatus;
+        private Long connectedTime;
+        private Long createtime;
+        private String custName;
+        private List<Dialogue> dialogue;
+        private Integer dialogueCount;
+        private String emptyNumberDetectionText;
+        private Boolean hangup;
+        private String hangupCause;
+        private String id;
+        private String ivrDtmfDigits;
+        private Long manualAnsweredTime;
+        private Long manualAnsweredTimeLen;
+        private String recordServerUrl;
+        private TaskInfo taskInfo;
+        private String telephone;
+        private Long timeLen;
+        private Boolean transferred;
+        private String ttsText;
+        private String uuid;
+        private Long validTimeLen;
+        private String wavfile;
+    }
+
+    @Data
+    public static class Dialogue {
+        private String $ref;
+    }
+
+    @Data
+    public static class TaskInfo {
+        private String aiTransferData;
+        private String aiTransferType;
+        private String asrProvider;
+        private String authUsername;
+        private Integer autoStop;
+        private Long avgCallEndProcessTimeLen;
+        private Long avgCallTalkTimeLen;
+        private Long avgRingTimeLen;
+        private Long batchId;
+        private String batchName;
+        private String callNodeNo;
+        private String calleePrefix;
+        private String caller;
+        private String codec;
+        private Long createtime;
+        private Integer executing;
+        private Long gatewayId;
+        private String groupId;
+        private String gwAddr;
+        private String gwName;
+        private Integer ifcall;
+        private String ivrId;
+        private Long llmAccountId;
+        private Integer playTimes;
+        private String profileName;
+        private Integer rate;
+        private Integer register;
+        private Long stopTime;
+        private Integer taskType;
+        private Integer threadNum;
+        private String userid;
+        private String voiceCode;
+        private String voiceSource;
+    }
+}

+ 19 - 0
fs-service/src/main/java/com/fs/company/vo/CdrDetailVo.java

@@ -0,0 +1,19 @@
+package com.fs.company.vo;
+
+import lombok.Data;
+
+@Data
+public class CdrDetailVo {
+
+    private String uuid;
+
+    /**
+     *  话单类型: inbound、outbound
+     */
+    private String cdrType;
+
+    /**
+     * 话单消息体;
+     */
+    private String cdrBody;
+}

+ 19 - 6
fs-wx-task/src/main/java/com/fs/app/controller/CommonController.java

@@ -2,21 +2,18 @@ package com.fs.app.controller;
 
 
 import com.fs.app.service.WxTaskService;
-import com.fs.common.core.domain.R;
 import com.fs.company.service.ICompanyWxAccountService;
 import com.fs.company.service.impl.CompanyWxServiceImpl;
+import com.fs.company.vo.CdrDetailVo;
 import com.fs.wxcid.dto.message.SendImageMessageParam;
+import com.fs.wxcid.dto.message.SendVideoMessageParam;
 import com.fs.wxcid.service.MessageService;
 import io.swagger.annotations.Api;
 import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
-import java.util.Arrays;
 import java.util.Collections;
 
 @Slf4j
@@ -89,5 +86,21 @@ public class CommonController {
         messageService.sendImageMessage(param);
     }
 
+    @GetMapping("sendVideo")
+    public void sendVideo(Long accountId, String thumbUrl, String videoUrl, String toUser) {
+        SendVideoMessageParam param = new SendVideoMessageParam();
+        param.setAccountId(accountId);
+        param.setThumbUrl(thumbUrl);
+        param.setVideoUrl(videoUrl);
+        param.setToUser(toUser);
+        messageService.sendVideoMessage(param);
+    }
+
+    @PostMapping("/saveCdrTest")
+    public String saveCdrTest(@RequestBody CdrDetailVo cdr) throws InstantiationException, IllegalAccessException {
+        log.info("cdr=" + cdr);
+        return  "success";
+    }
+
 
 }