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) {
shopInfo := &ShopInfo{
ShopID: "667553",
ShopName: "三里家园店",
ShopID: "668752",
ShopName: "创新百货超市(江津玉观店)",
Category: ShopCategoryFruit,
SecondCategory: ShopCategoryFruitFruit,
ContactName: "高朋朋",
ContactPhone: "15869188805",
ShopAddress: "浙江省杭州市下城区文晖街道三里家园一小区25幢杭州新三里家园农贸市场一层36号",
ShopLng: 120190237,
ShopLat: 30301060,
ContactName: "店主",
ContactPhone: "15019883393",
ShopAddress: "重庆市江津区龙珠街31号附14号",
ShopLng: 106463489,
ShopLat: 29316689,
CoordinateType: CoordinateTypeMars,
DeliveryServiceCodes: utils.Int2Str(DeliveryServiceCodeRapid),
BusinessHours: "[{\"beginTime\":\"07:00\",\"endTime\":\"19:30\"}]",
BusinessHours: "[{\"beginTime\":\"08:00\",\"endTime\":\"22:0\"}]",
}
_, err := api.ShopCreate(shopInfo)
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"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/globals"
"strings"
)
// UpdateSkuStock
@@ -504,12 +505,12 @@ func (a *API) CreateSubProduct(mainProductId int64, storeId int64) (int64, error
result, err := request.Execute(a.accessTokenObj)
if err != nil {
globals.SugarLogger.Debugf("基于店铺主品创建门店子品:err =%s ,%s", utils.Format4Output(err, false), result.LogId)
return 0, err
}
if result.Code != RequestSuccessCode {
globals.SugarLogger.Debugf("基于店铺主品创建门店子品:err =%s ,%s", result.SubMsg, result.LogId)
if result.Code != RequestSuccessCode && strings.Contains(err.Error(), "重复创建渠道商品") {
} else {
return 0, errors.New(result.SubMsg)
}

View File

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