1
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"strconv"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
@@ -224,3 +225,12 @@ func TestQueryBillList(t *testing.T) {
|
||||
|
||||
globals.SugarLogger.Debugf("data:= %s", utils.Format4Output(data, false))
|
||||
}
|
||||
|
||||
func TestName2(t *testing.T) {
|
||||
emoji := `【右上角关注点亮⭐️】`
|
||||
a := replaceContentOther(emoji)
|
||||
fmt.Println(a)
|
||||
}
|
||||
func replaceContentOther(content string) string {
|
||||
return strings.ReplaceAll(strings.ReplaceAll(content, "⃣️", " "), "•", "-")
|
||||
}
|
||||
|
||||
@@ -169,8 +169,8 @@ func TestStoreSkuStock(t *testing.T) {
|
||||
|
||||
func TestGetSkuDetaul(t *testing.T) {
|
||||
result, err := apiTao.QueryStoreSKu(&request585.AlibabaWdkSkuQueryRequest{Param: &domain585.AlibabaWdkSkuQuerySkuQueryDo{
|
||||
SkuCodes: &[]string{"84671"},
|
||||
OuCode: utils.String2Pointer("JX668998"),
|
||||
SkuCodes: &[]string{"39083"},
|
||||
OuCode: utils.String2Pointer("JX666678"),
|
||||
}})
|
||||
globals.SugarLogger.Debugf("err := %s ", utils.Format4Output(err, false))
|
||||
globals.SugarLogger.Debugf("result := %s ", utils.Format4Output(result, false))
|
||||
@@ -189,6 +189,9 @@ func uploadImg(api *API, imgs []string) *string {
|
||||
continue
|
||||
}
|
||||
body, _ := ioutil.ReadAll(resp.Body)
|
||||
if strings.Contains(string(body), "Document not found") {
|
||||
continue
|
||||
}
|
||||
if newImg, _ := api.UploadImg(&request1475.AlibabaWdkPictureUploadRequest{
|
||||
PictureCategoryId: utils.Int64ToPointer(0),
|
||||
Img: &body,
|
||||
|
||||
@@ -46,9 +46,16 @@ func TestGetStoreCategory(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetStoreAllCategory(t *testing.T) {
|
||||
data, err := apiTao.GetStoreAllCategory()
|
||||
globals.SugarLogger.Debugf("data := %s", utils.Format4Output(data, false))
|
||||
globals.SugarLogger.Debugf("err := %s", utils.Format4Output(err, false))
|
||||
data, _ := apiTao.GetStoreAllCategory()
|
||||
for _, v := range data {
|
||||
if v.ChildCategorys != nil {
|
||||
for _, v2 := range v.ChildCategorys {
|
||||
globals.SugarLogger.Debugf("%s", utils.Format4Output(v2, false))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func TestAddCategory(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user