-partner.ReadSku

修改partner.GetSkus原型,添加vendorOrgCode,去除skuName
This commit is contained in:
gazebo
2019-12-11 15:44:42 +08:00
parent ccba718569
commit 95a669476e
11 changed files with 241 additions and 249 deletions

View File

@@ -45,17 +45,17 @@ func TestGetAllCategories(t *testing.T) {
t.Log(utils.Format4Output(result, false))
}
func TestReadSku(t *testing.T) {
skuName, err := CurPurchaseHandler.ReadSku(jxcontext.AdminCtx, "", "2005582952")
t.Log(utils.Format4Output(skuName, false))
if err != nil {
t.Fatal(err.Error())
}
if skuName.Name != "味事达酱香鲜特级酿造酱油" || skuName.Skus[0].SpecUnit != "ml" {
t.Fatal("ReadSku return data wrong")
t.Log(string(utils.MustMarshal(skuName)))
}
}
// func TestReadSku(t *testing.T) {
// skuName, err := CurPurchaseHandler.ReadSku(jxcontext.AdminCtx, "", "2005582952")
// t.Log(utils.Format4Output(skuName, false))
// if err != nil {
// t.Fatal(err.Error())
// }
// if skuName.Name != "味事达酱香鲜特级酿造酱油" || skuName.Skus[0].SpecUnit != "ml" {
// t.Fatal("ReadSku return data wrong")
// t.Log(string(utils.MustMarshal(skuName)))
// }
// }
func TestGetVendorCategories(t *testing.T) {
catList, err := CurPurchaseHandler.GetVendorCategories(jxcontext.AdminCtx)
@@ -66,7 +66,7 @@ func TestGetVendorCategories(t *testing.T) {
}
func TestGetSkus(t *testing.T) {
skuNameList, err := CurPurchaseHandler.GetSkus(jxcontext.AdminCtx, 0, "2023747677", "")
skuNameList, err := CurPurchaseHandler.GetSkus(jxcontext.AdminCtx, "", 0, "2023747677")
t.Log(utils.Format4Output(skuNameList, false))
t.Log(len(skuNameList))
if err != nil {