|
@@ -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"
|
|
|
}
|