1
This commit is contained in:
@@ -120,6 +120,19 @@ func (a *API) StoreSuspend(param *shop_storeSuspend_request.ShopStoreSuspendPara
|
||||
return response.Data, nil
|
||||
}
|
||||
|
||||
func (a *API) StoreSuspend2(storeID int64) (*shop_storeSuspend_response.ShopStoreSuspendData, error) {
|
||||
request := shop_storeSuspend_request.New()
|
||||
request.Param.StoreId = storeID
|
||||
response, err := request.Execute(a.accessTokenObj)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if response.Code != RequestSuccessCode {
|
||||
return nil, errors.New(response.SubMsg)
|
||||
}
|
||||
return response.Data, nil
|
||||
}
|
||||
|
||||
//门店恢复营业
|
||||
func (a *API) UnsuspendStore(param *shop_unsuspendStore_request.ShopUnsuspendStoreParam) (*shop_unsuspendStore_response.ShopUnsuspendStoreData, error) {
|
||||
request := shop_unsuspendStore_request.New()
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -83,8 +83,13 @@ func TestAddOrder(t *testing.T) {
|
||||
|
||||
//获取订单详情
|
||||
func TestGetOrderDetail(t *testing.T) {
|
||||
detail, err := api.GetOrderDetail("23022111551032700006604805")
|
||||
detail, err := api.GetOrderDetail("23022310041019000003804258")
|
||||
fmt.Println(utils.Format4Output(detail, false))
|
||||
orderPrice := utils.Str2Float64(detail.OrderPrice)
|
||||
priceOff := utils.Str2Float64(detail.PriceOff)
|
||||
price := orderPrice - priceOff
|
||||
temp := int64(price * 100)
|
||||
fmt.Println(temp)
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user