This commit is contained in:
邹宗楠
2022-12-22 10:44:56 +08:00
parent 35ddeed751
commit ba661932bf
3 changed files with 35 additions and 2 deletions

View File

@@ -0,0 +1,32 @@
package tiktok_api
import (
"fmt"
"git.rosy.net.cn/baseapi/utils"
"testing"
)
func TestDeleteSku(t *testing.T) {
var tiktokId = []int64{
3589392977455372474,
}
for _, v := range tiktokId {
if err := a.DeleteStoreCommodity(v); err != nil {
fmt.Println(err)
}
}
}
func TestTryCatName2Code(t *testing.T) {
code := tryCatName2Code("3039")
fmt.Println(code)
}
func tryCatName2Code(originName string) (catCodeStr string) {
if intValue := utils.Str2Int64WithDefault(originName, 0); intValue > 0 {
catCodeStr = utils.Int64ToStr(intValue)
if catCodeStr != originName {
catCodeStr = ""
}
}
return catCodeStr
}