瀏覽代碼

Merge branch 'dev/v1.0.1_zxl' of BaseService/biService into feature/v1.0.1

xuzhiheng 2 年之前
父節點
當前提交
8679f0c3f8
共有 1 個文件被更改,包括 11 次插入4 次删除
  1. 11 4
      service/hlyj.go

+ 11 - 4
service/hlyj.go

@@ -63,10 +63,17 @@ func Get(url string, param map[string]interface{}) (str string) {
 func (this *HlyjStruct) Call(phone string, positionId int64) bool {
 	//获取token
 	token := this.GetAccessToken()
-
-	//TODO 获取坐席id
-
+	if token == "" {
+		log.Println("未获取到token")
+		return false
+	}
+	//获取坐席id
+	integratedid, _ := getSeatNumber(positionId)
+	if integratedid == "" {
+		log.Println("未获取到坐席id")
+		return false
+	}
 	//打电话接口
-	ret := Get(this.CallUrl, g.Map{"flag": this.CallFlag, "account": this.Account, "integratedid": this.Integratedid, "accessToken": token, "phonenum": phone})
+	ret := Get(this.CallUrl, g.Map{"flag": this.CallFlag, "account": this.Account, "integratedid": integratedid, "accessToken": token, "phonenum": phone})
 	return ret == "200"
 }