Pārlūkot izejas kodu

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

xuzhiheng 2 gadi atpakaļ
vecāks
revīzija
8679f0c3f8
1 mainītis faili ar 11 papildinājumiem un 4 dzēšanām
  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"
 }