1
This commit is contained in:
@@ -230,3 +230,15 @@ type StoreSkuInfo struct {
|
|||||||
VendorSkuAttrId string `json:"vendorSkuAttrId"` //主商品sku_id
|
VendorSkuAttrId string `json:"vendorSkuAttrId"` //主商品sku_id
|
||||||
VendorSonSkuID string `json:"vendorSonSkuID"` // 子商品skuid
|
VendorSonSkuID string `json:"vendorSonSkuID"` // 子商品skuid
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//42597433459
|
||||||
|
func TestDeleteActSku(t *testing.T) {
|
||||||
|
failedList2, err2 := api.RetailDiscountDelete2("6794526", 1001, []string{"42597433459"})
|
||||||
|
fmt.Println(utils.Format4Output(failedList2, false))
|
||||||
|
fmt.Println(err2)
|
||||||
|
|
||||||
|
}
|
||||||
|
func TestSync(t *testing.T) {
|
||||||
|
ans := 1 & 4
|
||||||
|
fmt.Println(ans)
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import (
|
|||||||
"crypto/md5"
|
"crypto/md5"
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
"mime/multipart"
|
"mime/multipart"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
@@ -145,6 +146,7 @@ func (a *API) AccessAPI2(cmd string, isGet bool, bizParams map[string]interface{
|
|||||||
}
|
}
|
||||||
signURL := a.genURL(cmd) + "?"
|
signURL := a.genURL(cmd) + "?"
|
||||||
params[signKey] = a.signParams(signURL, params)
|
params[signKey] = a.signParams(signURL, params)
|
||||||
|
globals.SugarLogger.Debugf("test mtCancelAct cmd=%s sig=%s", cmd, params[signKey])
|
||||||
err = platformapi.AccessPlatformAPIWithRetry(a.client,
|
err = platformapi.AccessPlatformAPIWithRetry(a.client,
|
||||||
func() *http.Request {
|
func() *http.Request {
|
||||||
var request *http.Request
|
var request *http.Request
|
||||||
|
|||||||
@@ -20,17 +20,17 @@ func init() {
|
|||||||
baseapi.Init(sugarLogger)
|
baseapi.Init(sugarLogger)
|
||||||
|
|
||||||
// 菜市
|
// 菜市
|
||||||
//api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
|
api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
|
||||||
|
|
||||||
// 果园
|
// 果园
|
||||||
//api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
|
//api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
|
||||||
|
|
||||||
//商超
|
//商超
|
||||||
api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_u368I2OxTY4ys4wWuVVMOQ") //token_n4TwqCntWWuvQwAawzxC0w
|
//api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_u368I2OxTY4ys4wWuVVMOQ") //token_n4TwqCntWWuvQwAawzxC0w
|
||||||
cookieStr := `
|
//cookieStr := `
|
||||||
acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1;
|
// acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1;
|
||||||
`
|
//`
|
||||||
api.SetCookieWithStr(cookieStr)
|
//api.SetCookieWithStr(cookieStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestAccessAPI(t *testing.T) {
|
func TestAccessAPI(t *testing.T) {
|
||||||
|
|||||||
Reference in New Issue
Block a user