43 lines
857 B
Go
43 lines
857 B
Go
package gome_live_show
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
// 获取商品尺寸列表
|
|
func TestQueryGoodsList(t *testing.T) {
|
|
paramter := &QueryGoodsSpecSizeReq{
|
|
Cat3Code: "",
|
|
SpecName: "",
|
|
Page: Page{
|
|
PageNumber: PageNumber,
|
|
PageSize: PageSize,
|
|
},
|
|
}
|
|
data, err := api.QueryGoodsSizeList(paramter)
|
|
fmt.Println("err=", err)
|
|
fmt.Println("err=", data)
|
|
// fmt.Println("data", data.Records[0].Cat3Code)
|
|
}
|
|
|
|
// 获取尺寸详情
|
|
func TestQuerSpecListDetail(t *testing.T) {
|
|
api.QueryGoodsDetails("11111")
|
|
}
|
|
|
|
// 新增商品规格
|
|
func TestAddGoods(t *testing.T) {
|
|
data, err := api.CreateGoodsSpceList(&CreateSpecDetailParam{
|
|
SpecName: "测试分类",
|
|
SpecValues: []*SpecValueName{
|
|
{SpecValueName: "1111"},
|
|
{SpecValueName: "2222"},
|
|
},
|
|
Cat3Code: "100001",
|
|
Remark: "测试用力添加",
|
|
})
|
|
fmt.Println(data)
|
|
fmt.Println(err)
|
|
}
|