41 lines
956 B
Go
41 lines
956 B
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 TestGetStoreDetail(t *testing.T) {
|
|
storeDetail, err := GetStoreDetailByVendorStoreID(GetDB(), "11733077", 0)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
globals.SugarLogger.Debug(utils.Format4Output(storeDetail, false))
|
|
}
|
|
|
|
func TestGetStoreCourierList(t *testing.T) {
|
|
storeCourierList, err := GetStoreCourierList(GetDB(), 100119, model.StoreStatusOpened)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
globals.SugarLogger.Debug(utils.Format4Output(storeCourierList, false))
|
|
}
|
|
|
|
func TestFormalizeStoreStatus(t *testing.T) {
|
|
err := FormalizeStoreStatus(GetDB(), 100119, model.StoreStatusOpened)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
}
|
|
|
|
func TestGetStoreList4Role(t *testing.T) {
|
|
storeList, err := GetStoreList4Role(GetDB(), "NiuBi")
|
|
t.Log(utils.Format4Output(storeList, false))
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
}
|