query
This commit is contained in:
@@ -42,10 +42,15 @@ func (a *Api) GetToken() error {
|
||||
|
||||
// GetExpressPrice 获取快递费用
|
||||
func (a *Api) GetExpressPrice(param *GetExpressPriceReq) (*GetExpressPriceRes, error) {
|
||||
globals.SugarLogger.Debug("进入GetExpressPrice")
|
||||
if err := a.CheckTokenExpiration(); err != nil {
|
||||
globals.SugarLogger.Debug("打印err1===================", err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
result, err := a.AccessInfo(BaseQBiDaUrl, GetWayBailMoneyUrl, http.MethodPost, utils.Struct2FlatMap(param))
|
||||
globals.SugarLogger.Debug("打印result===================", result)
|
||||
globals.SugarLogger.Debug("打印err2===================", err)
|
||||
if err != nil && !strings.Contains(err.Error(), "成功") {
|
||||
return nil, err
|
||||
}
|
||||
@@ -57,6 +62,7 @@ func (a *Api) GetExpressPrice(param *GetExpressPriceReq) (*GetExpressPriceRes, e
|
||||
if resultData.Code != 0 {
|
||||
return nil, errors.New(resultData.Msg)
|
||||
}
|
||||
globals.SugarLogger.Debug("返回前打印resultData===================", resultData)
|
||||
return resultData, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user