This commit is contained in:
richboo111
2024-01-02 10:55:36 +08:00
parent f9b47e41d1
commit 29d2402d9f
3 changed files with 20 additions and 6 deletions

View File

@@ -230,3 +230,15 @@ type StoreSkuInfo struct {
VendorSkuAttrId string `json:"vendorSkuAttrId"` //主商品sku_id
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)
}

View File

@@ -5,6 +5,7 @@ import (
"crypto/md5"
"fmt"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/globals"
"mime/multipart"
"net/http"
"net/url"
@@ -145,6 +146,7 @@ func (a *API) AccessAPI2(cmd string, isGet bool, bizParams map[string]interface{
}
signURL := a.genURL(cmd) + "?"
params[signKey] = a.signParams(signURL, params)
globals.SugarLogger.Debugf("test mtCancelAct cmd=%s sig=%s", cmd, params[signKey])
err = platformapi.AccessPlatformAPIWithRetry(a.client,
func() *http.Request {
var request *http.Request

View File

@@ -20,17 +20,17 @@ func init() {
baseapi.Init(sugarLogger)
// 菜市
//api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
// 果园
//api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
//商超
api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_u368I2OxTY4ys4wWuVVMOQ") //token_n4TwqCntWWuvQwAawzxC0w
cookieStr := `
acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1;
`
api.SetCookieWithStr(cookieStr)
//api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_u368I2OxTY4ys4wWuVVMOQ") //token_n4TwqCntWWuvQwAawzxC0w
//cookieStr := `
// acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1;
//`
//api.SetCookieWithStr(cookieStr)
}
func TestAccessAPI(t *testing.T) {