This commit is contained in:
邹宗楠
2022-12-26 18:38:11 +08:00
parent 884aae371f
commit 2b2cab3413
3 changed files with 14 additions and 12 deletions

View File

@@ -28,18 +28,18 @@ func TestShopQuery(t *testing.T) {
func TestShopCreate(t *testing.T) { func TestShopCreate(t *testing.T) {
shopInfo := &ShopInfo{ shopInfo := &ShopInfo{
ShopID: "667553", ShopID: "668752",
ShopName: "三里家园店", ShopName: "创新百货超市(江津玉观店)",
Category: ShopCategoryFruit, Category: ShopCategoryFruit,
SecondCategory: ShopCategoryFruitFruit, SecondCategory: ShopCategoryFruitFruit,
ContactName: "高朋朋", ContactName: "店主",
ContactPhone: "15869188805", ContactPhone: "15019883393",
ShopAddress: "浙江省杭州市下城区文晖街道三里家园一小区25幢杭州新三里家园农贸市场一层36号", ShopAddress: "重庆市江津区龙珠街31号附14号",
ShopLng: 120190237, ShopLng: 106463489,
ShopLat: 30301060, ShopLat: 29316689,
CoordinateType: CoordinateTypeMars, CoordinateType: CoordinateTypeMars,
DeliveryServiceCodes: utils.Int2Str(DeliveryServiceCodeRapid), DeliveryServiceCodes: utils.Int2Str(DeliveryServiceCodeRapid),
BusinessHours: "[{\"beginTime\":\"07:00\",\"endTime\":\"19:30\"}]", BusinessHours: "[{\"beginTime\":\"08:00\",\"endTime\":\"22:0\"}]",
} }
_, err := api.ShopCreate(shopInfo) _, err := api.ShopCreate(shopInfo)
if err != nil { if err != nil {

View File

@@ -33,6 +33,7 @@ import (
superm_product_launchProduct_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_product_launchProduct/request" superm_product_launchProduct_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_product_launchProduct/request"
"git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/globals" "git.rosy.net.cn/jx-callback/globals"
"strings"
) )
// UpdateSkuStock // UpdateSkuStock
@@ -504,12 +505,12 @@ func (a *API) CreateSubProduct(mainProductId int64, storeId int64) (int64, error
result, err := request.Execute(a.accessTokenObj) result, err := request.Execute(a.accessTokenObj)
if err != nil { if err != nil {
globals.SugarLogger.Debugf("基于店铺主品创建门店子品:err =%s ,%s", utils.Format4Output(err, false), result.LogId)
return 0, err return 0, err
} }
if result.Code != RequestSuccessCode { if result.Code != RequestSuccessCode && strings.Contains(err.Error(), "重复创建渠道商品") {
globals.SugarLogger.Debugf("基于店铺主品创建门店子品:err =%s ,%s", result.SubMsg, result.LogId)
} else {
return 0, errors.New(result.SubMsg) return 0, errors.New(result.SubMsg)
} }

View File

@@ -155,7 +155,7 @@ func TestGetSkuList(t *testing.T) {
for i := 1; i < 100; i++ { for i := 1; i < 100; i++ {
result, err := a.GetSkuDetailList(&product_listV2_request.ProductListV2Param{ result, err := a.GetSkuDetailList(&product_listV2_request.ProductListV2Param{
Status: 0, Status: 0,
CheckStatus: 5, CheckStatus: 4,
ProductType: 0, ProductType: 0,
StartTime: 0, StartTime: 0,
EndTime: 0, EndTime: 0,
@@ -163,6 +163,7 @@ func TestGetSkuList(t *testing.T) {
Size: 100, Size: 100,
UpdateStartTime: 0, UpdateStartTime: 0,
UpdateEndTime: 0, UpdateEndTime: 0,
StoreId: 65402632,
}) })
if err != nil { if err != nil {
globals.SugarLogger.Debugf("=index := %d ,err := %s", i, utils.Format4Output(err, false)) globals.SugarLogger.Debugf("=index := %d ,err := %s", i, utils.Format4Output(err, false))