This commit is contained in:
邹宗楠
2022-09-30 17:16:22 +08:00
parent e2b41bf9db
commit 97c092cd26
36 changed files with 1753 additions and 1895 deletions

View File

@@ -1,43 +0,0 @@
package tiktok_store
import (
"testing"
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
"git.rosy.net.cn/baseapi/utils"
// _ "git.rosy.net.cn/jx-callback/business/jxcallback/orderman"
)
//func TestReadStore(t *testing.T) {
// store, err := CurPurchaseHandler.ReadStore(jxcontext.AdminCtx, "", "4351018")
// if err != nil {
// t.Fatal(err)
// }
// t.Log(utils.Format4Output(store, false))
//}
func TestUpdateStore(t *testing.T) {
err := CurPurchaseHandler.UpdateStore(nil, 100002, "test")
if err != nil {
t.Fatal(err)
}
}
func TestConstrainOpTimeList(t *testing.T) {
timeList := constrainOpTimeList([]int16{830, 1800}, []int16{
0,
200,
930,
1700,
})
t.Log(utils.Format4Output(timeList, false))
if timeList[0] != 930 || timeList[1] != 1700 {
t.Fatal("constrainOpTimeList failed")
}
}
func TestGetOpTimeListFromErr(t *testing.T) {
err := utils.NewErrorIntCode("当前配送营业时间为:07:00~24:00", mtwmapi.ErrCodeOpFailed)
list := getOpTimeListFromErr(err)
t.Log(list)
}