1
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package mtwmapi
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"testing"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
@@ -115,6 +117,30 @@ func TestRetailDelete(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRetailDat(t *testing.T) {
|
||||
err := api.RetailInitData("F71D0F0881A211ED9D81525400E86DC0", "16185779", "31173", map[string]interface{}{
|
||||
"app_spu_code": "31173",
|
||||
"category_code": "3039",
|
||||
"common_attr_value": "[{\"attrId\":1200000088,\"attrName\":\"品牌\",\"valueList\":[{\"valueId\":1000001,\"value\":\"其他品牌\"}]},{\"attrId\":1200000094,\"attrName\":\"产地\",\"valueList\":[{\"valueId\":100000050,\"value\":\"中国\"}]},{\"attrId\":1200000132,\"attrName\":\"国产/进口\",\"valueList\":[{\"valueId\":1300000003,\"value\":\"国产\"}]},{\"attrId\":1200000210,\"attrName\":\"商品类别\",\"valueList\":[{\"valueId\":1300002991,\"value\":\"水果混合切片\"}]},{\"attrId\":1200000286,\"attrName\":\"果品品牌\",\"valueList\":[{\"valueId\":1300000249,\"value\":\"其他\"}]},{\"attrId\":1200004449,\"attrName\":\"拼数\",\"valueList\":[{\"valueId\":1300015654,\"value\":\"单拼\"}]}]",
|
||||
"description": "",
|
||||
"is_sold_out": 0,
|
||||
"min_order_count": 1,
|
||||
"name": "【果切】香甜芒果果切1盒约250g",
|
||||
"picture": "https://image.jxc4.com/image/4fd5cd77a6fce23ee26f8d40392d83b1.jpg,https://image.jxc4.com/image/4fd5cd77a6fce23ee26f8d40392d83b1.jpg,https://image.jxc4.com/image/4fd5cd77a6fce23ee26f8d40392d83b1.jpg,https://image.jxc4.com/image/4fd5cd77a6fce23ee26f8d40392d83b1.jpg,https://image.jxc4.com/image/4fd5cd77a6fce23ee26f8d40392d83b1.jpg",
|
||||
"price": 13.9,
|
||||
"sequence": 494,
|
||||
"skus": "[{\"ladder_box_num\":1,\"ladder_box_price\":0.5,\"price\":13.9,\"sku_id\":\"31173\",\"spec\":\"250g\",\"stock\":\"9999\",\"weight\":250}]",
|
||||
"tag_id": "200002727",
|
||||
"unit": "盒",
|
||||
})
|
||||
globals.SugarLogger.Debugf("err %s", utils.Format4Output(err, false))
|
||||
}
|
||||
|
||||
func TestErrList(t *testing.T) {
|
||||
data := utils.IsErrMatch(errors.New("无需切自配送 level:0, code:1"), "301251", nil)
|
||||
fmt.Println(data)
|
||||
}
|
||||
|
||||
func TestRetailBatchInitData(t *testing.T) {
|
||||
failedFoods, err := api.RetailBatchInitData(utils.GetUUID(), testPoiCode, []map[string]interface{}{
|
||||
map[string]interface{}{
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
func TestDeleteSku(t *testing.T) {
|
||||
var tiktokId = []int64{
|
||||
3589392977455372474,
|
||||
3589769384094230209, 3589769377601445974, 3589769369011535109, 3589769362569082490, 3589769356176924873, 3589769349700974178, 3589769343367513386, 3589769336857954569, 3589769330407171417, 3589769326112169868, 3589769319745241854, 3589769315458657623, 3589769308999402290, 3589769302498234033, 3589769296047435643, 3589769287423924815, 3589769283170882202, 3589769278934648627, 3589769272374741593, 3589769268163694345, 3589769263801616633, 3589769257459793891, 3589769250899910180, 3589769246621730609, 3589769242444192129, 3589769233778794558, 3589769227336301304, 3589769222982616784, 3589769216540210156, 3589769210181586407, 3589769205861485317, 3589769197271574277, 3589769190820705474, 3589769184403431292, 3589769180116874672, 3589769173649256029, 3589769167265522281, 3589769158558115051, 3589703235222517211, 3589519483519277987, 3589519479350128828, 3589519266682156409, 3589518317485973067, 3589518311043529009, 3589518306832452351, 3589518302520712159, 3589518296078231131, 3589518291724585651, 3589518285223402598, 3589518278780942598, 3589518274569886006, 3589518270316809096, 3589518263865984968, 3589518259512329363, 3589518253061472809, 3589518246618994678, 3589518242357597732, 3589518235906795957, 3589518231653769027, 3589518225144197044, 3589518218651390785, 3589518214373223180, 3589518207989490474, 3589518199324019536, 3589518195029084033, 3589518186514638632, 3589518182261609362, 3589518175760438689, 3589518169309625222, 3589518164964306280, 3589518160795152807, 3589518156458290569, 3589518149990625958, 3589518145754407397, 3589518139194488721, 3589518132802403434, 3589518128591338481, 3589518119925851965, 3589518109180056344, 3589518102737595241, 3589518098518154506, 3589518092033754444, 3589518085566122666, 3589518081271201649, 3589518074820344232, 3589518068327522892, 3589393007469841906, 3589393000943511630, 3589392996791099881, 3589392990348655878, 3589392983847533170, 3588651949567949395,
|
||||
}
|
||||
for _, v := range tiktokId {
|
||||
if err := a.DeleteStoreCommodity(v); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user