- 重要修改相关的函数新增trackInfo参数,追踪修改人.接口类型改变
This commit is contained in:
@@ -95,7 +95,7 @@ func TestSkuCreate(t *testing.T) {
|
||||
func TestSkuUpdate(t *testing.T) {
|
||||
// 15579787500720732 高级
|
||||
|
||||
result, err := api.SkuUpdate("2", 1557043939079105, map[string]interface{}{
|
||||
result, err := api.SkuUpdate(utils.GetUUID(), "2", 1557043939079105, map[string]interface{}{
|
||||
// "name": "高级商品2015a333约1100g/份",
|
||||
// "rtf": "http://www.rosy.net.cn/rtf.html",
|
||||
"shelf_number": 12,
|
||||
@@ -119,7 +119,7 @@ func TestSkuDelete(t *testing.T) {
|
||||
notExistSkuID = 12345678
|
||||
existSkuID = 156406677407848
|
||||
)
|
||||
opResult, err := api.SkuDelete(testShopID, []int64{notExistSkuID}, nil)
|
||||
opResult, err := api.SkuDelete(utils.GetUUID(), testShopID, []int64{notExistSkuID}, nil)
|
||||
t.Log(utils.Format4Output(opResult, false))
|
||||
if err == nil {
|
||||
t.Log("应该要报错")
|
||||
@@ -127,7 +127,7 @@ func TestSkuDelete(t *testing.T) {
|
||||
if opResult == nil || len(opResult.FailedList) != 1 || opResult.FailedList[0].SkuID != notExistSkuID {
|
||||
t.Logf("错误结果中应该要包含:%d", notExistSkuID)
|
||||
}
|
||||
opResult, err = api.SkuDelete(testShopID, []int64{existSkuID}, nil)
|
||||
opResult, err = api.SkuDelete(utils.GetUUID(), testShopID, []int64{existSkuID}, nil)
|
||||
t.Log(utils.Format4Output(opResult, false))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -143,8 +143,9 @@ func TestSkuOnline(t *testing.T) {
|
||||
existSkuID = 156406688807623
|
||||
)
|
||||
|
||||
opResult, err := api.SkuOnline(testShopID, []int64{notExistSkuID, existSkuID}, nil, nil)
|
||||
opResult, err := api.SkuOnline(utils.GetUUID(), testShopID, []int64{notExistSkuID, existSkuID}, nil, nil)
|
||||
t.Log(utils.Format4Output(opResult, false))
|
||||
t.Log(err.Error())
|
||||
if err == nil {
|
||||
t.Log("应该要报错")
|
||||
}
|
||||
@@ -157,14 +158,14 @@ func TestSkuOnline(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSkuOnlineOne(t *testing.T) {
|
||||
err := api.SkuOnlineOne(testShopID, 13211, "", "")
|
||||
err := api.SkuOnlineOne(utils.GetUUID(), testShopID, 13211, "", "")
|
||||
if err == nil {
|
||||
t.Fatal("应该要报错才对")
|
||||
}
|
||||
}
|
||||
|
||||
func TestSkuOffline(t *testing.T) {
|
||||
opResult, err := api.SkuOffline(testShopID, []int64{1564049914071288, 156389470507185}, nil, nil)
|
||||
opResult, err := api.SkuOffline(utils.GetUUID(), testShopID, []int64{1564049914071288, 156389470507185}, nil, nil)
|
||||
t.Log(utils.Format4Output(opResult, false))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -172,7 +173,7 @@ func TestSkuOffline(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSkuPriceUpdateBatch(t *testing.T) {
|
||||
opResult, err := api.SkuPriceUpdateBatch(testShopID, ShopSkuInfoList{
|
||||
opResult, err := api.SkuPriceUpdateBatch(utils.GetUUID(), testShopID, ShopSkuInfoList{
|
||||
&ShopSkuInfo{
|
||||
SkuID: 156369111807787,
|
||||
SalePrice: 100,
|
||||
@@ -203,7 +204,7 @@ func TestSkuStockUpdateBatch(t *testing.T) {
|
||||
leftNum = 123
|
||||
)
|
||||
|
||||
opResult, err := api.SkuStockUpdateBatch(testShopID, ShopSkuInfoList{
|
||||
opResult, err := api.SkuStockUpdateBatch(utils.GetUUID(), testShopID, ShopSkuInfoList{
|
||||
&ShopSkuInfo{
|
||||
SkuID: notExistSkuID,
|
||||
Stock: leftNum,
|
||||
@@ -239,7 +240,7 @@ func TestSkuStockUpdateOne(t *testing.T) {
|
||||
|
||||
leftNum = 234
|
||||
)
|
||||
err := api.SkuStockUpdateOne(testShopID, &ShopSkuInfo{
|
||||
err := api.SkuStockUpdateOne(utils.GetUUID(), testShopID, &ShopSkuInfo{
|
||||
SkuID: existSkuID,
|
||||
Stock: leftNum,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user