Przeglądaj źródła

外呼系统开发

anderx 1 rok temu
rodzic
commit
b801e82022

+ 18 - 0
src/main/java/com/goafanti/common/bo/InputCallCompleter.java

@@ -1,10 +1,21 @@
 package com.goafanti.common.bo;
 
+import java.util.Map;
+
 public class InputCallCompleter {
 
     private authenticationBo authentication;
 
+    private Map<String, Object> notify;
+
+
+    public Map<String, Object> getNotify() {
+        return notify;
+    }
 
+    public void setNotify(Map<String, Object> notify) {
+        this.notify = notify;
+    }
 
     public authenticationBo getAuthentication() {
         return authentication;
@@ -14,4 +25,11 @@ public class InputCallCompleter {
         this.authentication = authentication;
     }
 
+    @Override
+    public String toString() {
+        return "InputCallCompleter{" +
+                "authentication=" + authentication +
+                ", notify=" + notify +
+                '}';
+    }
 }

+ 1 - 1
src/main/java/com/goafanti/common/controller/PublicController.java

@@ -984,7 +984,7 @@ public class PublicController extends CertifyApiController {
 	 */
 	@PostMapping("/callCompleted")
 	@ResponseBody
-	public Result callCompleted( InputCallCompleter in) {
+	public Result callCompleted(@RequestBody InputCallCompleter in) {
 		System.out.println(in);
 		return new Result<>().data(userOutboundService.callCompleted(in));
 	}

+ 3 - 3
src/main/java/com/goafanti/customer/service/impl/UserOutboundServiceImpl.java

@@ -13,13 +13,11 @@ import com.goafanti.common.model.User;
 import com.goafanti.common.utils.HttpUtils;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
-import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.core.websocket.SystemWebSocketHandler;
 import com.goafanti.customer.bo.InputCallNumber;
 import com.goafanti.customer.service.UserOutboundService;
 import org.apache.shiro.crypto.hash.SimpleHash;
 import org.springframework.stereotype.Service;
-import org.springframework.web.socket.TextMessage;
 
 import javax.annotation.Resource;
 import java.util.HashMap;
@@ -132,8 +130,10 @@ public class UserOutboundServiceImpl extends BaseMybatisDao<UserArchivesMapper>
 
     @Override
     public Object callCompleted(InputCallCompleter in) {
+        Map<String, Object> notify = in.getNotify();
+
         //需要关闭客户呼叫中
-        systemWebSocketHandler.sendMessageToUser(TokenManager.getAdminId(), new TextMessage("callCompleted"));
+//        systemWebSocketHandler.sendMessageToUser(TokenManager.getAdminId(), new TextMessage("callCompleted"));
         return 1;
     }