1
This commit is contained in:
@@ -32,22 +32,20 @@ func TestLogin(t *testing.T) {
|
|||||||
// 获取所有的快递费接口
|
// 获取所有的快递费接口
|
||||||
func TestGatAllFee(t *testing.T) {
|
func TestGatAllFee(t *testing.T) {
|
||||||
api := NewQBiDa("18048531223", "18080188338")
|
api := NewQBiDa("18048531223", "18080188338")
|
||||||
for i := 1; i <= 14; i++ {
|
result, err := api.GetExpressPrice(&GetExpressPriceReq{
|
||||||
result, err := api.GetExpressPrice(&GetExpressPriceReq{
|
PromiseTimeType: 0,
|
||||||
PromiseTimeType: 0,
|
DeliveryType: 0,
|
||||||
DeliveryType: 0,
|
GoodsValue: 1000,
|
||||||
GoodsValue: 1000,
|
SendAddress: "四川省成都市金牛区二环北路一段10号万科加州湾V派616",
|
||||||
SendAddress: "四川省成都市金牛区二环北路一段10号万科加州湾V派616",
|
ReceiveAddress: "北京市北京市朝阳区来广营地区中铁国际城乐享汇大厦3号楼1132",
|
||||||
ReceiveAddress: "北京市北京市朝阳区来广营地区中铁国际城乐享汇大厦3号楼1132",
|
Type: 0,
|
||||||
Type: i,
|
Weight: 1,
|
||||||
Weight: 1,
|
Length: 100,
|
||||||
Length: 100,
|
Height: 100,
|
||||||
Height: 100,
|
Width: 100,
|
||||||
Width: 100,
|
SendPhone: "18981810340",
|
||||||
SendPhone: "18981810340",
|
})
|
||||||
})
|
globals.SugarLogger.Debug("err===", err)
|
||||||
globals.SugarLogger.Debug("err==="+fmt.Sprintf("%d", i), err)
|
globals.SugarLogger.Debug("data===", &result)
|
||||||
globals.SugarLogger.Debug("data===", &result)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import (
|
|||||||
"git.rosy.net.cn/baseapi"
|
"git.rosy.net.cn/baseapi"
|
||||||
"git.rosy.net.cn/baseapi/platformapi"
|
"git.rosy.net.cn/baseapi/platformapi"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
"net/http"
|
"net/http"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
@@ -94,6 +95,7 @@ func (a *Api) AccessInfo(baseUrl, url, requestMethods string, param map[string]i
|
|||||||
request, _ = http.NewRequest(http.MethodGet, utils.GenerateGetURL(baseUrl, url, param), nil)
|
request, _ = http.NewRequest(http.MethodGet, utils.GenerateGetURL(baseUrl, url, param), nil)
|
||||||
}
|
}
|
||||||
if url != LogInUrl {
|
if url != LogInUrl {
|
||||||
|
globals.SugarLogger.Debug("token=======", a.token)
|
||||||
request.Header.Set("token", a.token)
|
request.Header.Set("token", a.token)
|
||||||
}
|
}
|
||||||
return request
|
return request
|
||||||
|
|||||||
@@ -41,11 +41,26 @@ type GetExpressPriceRes struct {
|
|||||||
|
|
||||||
// GetExpressPriceData 获取正儿八经返回值
|
// GetExpressPriceData 获取正儿八经返回值
|
||||||
type GetExpressPriceData struct {
|
type GetExpressPriceData struct {
|
||||||
ChannelFee float64 `json:"channel_fee"` // 渠道价
|
BillWeight int `json:"billWeight"`
|
||||||
Bulk int64 `json:"bulk"` // 体积抛比系数
|
Bulk int `json:"bulk"` // 体积抛比系数
|
||||||
ServiceCharge float64 `json:"service_charge"` // 服务费
|
ChannelFee float64 `json:"channelFee"` // 渠道价
|
||||||
GuarantFee float64 `json:"guarant_fee"` // 保价费用
|
ChannelName string `json:"channelName"`
|
||||||
OriginalFee float64 `json:"original_fee"` // 原价
|
Discount float64 `json:"discount"`
|
||||||
|
Genre int `json:"genre"`
|
||||||
|
GuarantFee float64 `json:"guarantFee"` // 保价费用
|
||||||
|
IncrementFee float64 `json:"incrementFee"`
|
||||||
|
InsuredMsg string `json:"insuredMsg"`
|
||||||
|
IsInsured bool `json:"isInsured"`
|
||||||
|
LimitWeight int `json:"limitWeight"`
|
||||||
|
OriginalFee int `json:"originalFee"` // 原价
|
||||||
|
PriceA float64 `json:"priceA"` // 价格a
|
||||||
|
PriceB float64 `json:"priceB"` // 价格b
|
||||||
|
Remark string `json:"remark"` // 备注
|
||||||
|
ServiceCharge float64 `json:"serviceCharge"` // 服务费
|
||||||
|
Type int `json:"type"` // 快递公司type
|
||||||
|
TypeName string `json:"typeName"` // 快递公司名称
|
||||||
|
Volume int `json:"volume"`
|
||||||
|
VolumeWeight int `json:"volumeWeight"`
|
||||||
}
|
}
|
||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user