39 lines
1.0 KiB
Go
39 lines
1.0 KiB
Go
package dao
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"git.rosy.net.cn/baseapi/utils"
|
|
"git.rosy.net.cn/jx-callback/business/model"
|
|
"git.rosy.net.cn/jx-callback/globals"
|
|
)
|
|
|
|
func TestGetFullStoreSkus(t *testing.T) {
|
|
skuList, err := GetFullStoreSkus(GetDB(), model.VendorIDJD, 100118)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
globals.SugarLogger.Debug(utils.Format4Output(skuList, false))
|
|
}
|
|
|
|
func TestGetStoreSkus(t *testing.T) {
|
|
skuList, err := GetStoreSkus(GetDB(), model.VendorIDMTWM, 800165, []int{30969})
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
globals.SugarLogger.Debug(utils.Format4Output(skuList, false))
|
|
}
|
|
|
|
func TestGetDeletedStoreSkuBind(t *testing.T) {
|
|
storeSkuBind := GetDeletedStoreSkuBind(GetDB(), 100123, 30648)
|
|
globals.SugarLogger.Debug(utils.Format4Output(storeSkuBind, false))
|
|
}
|
|
|
|
func TestGetStoreSkuPriceAndWeight(t *testing.T) {
|
|
storeSkuBind, err := GetStoreSkuPriceAndWeight(GetDB(), "11863739", model.VendorIDJD, []string{"2023508979"})
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
globals.SugarLogger.Debug(utils.Format4Output(storeSkuBind, false))
|
|
}
|