|
@@ -2,6 +2,7 @@ package svr |
|
@@ -2,6 +2,7 @@ package svr |
2
|
|
2
|
|
3
|
import (
|
3
|
import (
|
4
|
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/constant"
|
4
|
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/constant"
|
|
|
5
|
+ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/log"
|
5
|
"strings"
|
6
|
"strings"
|
6
|
"time"
|
7
|
"time"
|
7
|
)
|
8
|
)
|
|
@@ -17,7 +18,11 @@ func (serviceGateway *HttplibMmmSmsApiServiceGateway) SendSms(phone string) (map |
|
@@ -17,7 +18,11 @@ func (serviceGateway *HttplibMmmSmsApiServiceGateway) SendSms(phone string) (map |
17
|
options["phone"] = strings.TrimSpace(phone)
|
18
|
options["phone"] = strings.TrimSpace(phone)
|
18
|
request.JSONBody(options)
|
19
|
request.JSONBody(options)
|
19
|
response := make(map[string]interface{})
|
20
|
response := make(map[string]interface{})
|
20
|
- request.ToJSON(&response)
|
21
|
+ err := request.ToJSON(&response)
|
|
|
22
|
+ if err != nil {
|
|
|
23
|
+ log.Error("Service Gateway Fail:", err)
|
|
|
24
|
+ return nil, err
|
|
|
25
|
+ }
|
21
|
data, err := serviceGateway.responseHandle(response)
|
26
|
data, err := serviceGateway.responseHandle(response)
|
22
|
return data, err
|
27
|
return data, err
|
23
|
}
|
28
|
}
|