作者 yangfu

1.增加日志

... ... @@ -81,7 +81,7 @@ func SmsCode(request *protocol.SmsCodeRequest) (rsp *protocol.SmsCodeResponse, e
if msg, ok := data["msg"]; ok {
err = protocol.NewCustomMessage(1, msg.(string))
}
log.Error(err, data)
log.Error(err, data, request.Phone)
return
}
return
... ...
... ... @@ -2,6 +2,7 @@ package svr
import (
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/constant"
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/log"
"strings"
"time"
)
... ... @@ -17,7 +18,11 @@ func (serviceGateway *HttplibMmmSmsApiServiceGateway) SendSms(phone string) (map
options["phone"] = strings.TrimSpace(phone)
request.JSONBody(options)
response := make(map[string]interface{})
request.ToJSON(&response)
err := request.ToJSON(&response)
if err != nil {
log.Error("Service Gateway Fail:", err)
return nil, err
}
data, err := serviceGateway.responseHandle(response)
return data, err
}
... ...