diff --git a/business/partner/purchase/tiktok_store/order.go b/business/partner/purchase/tiktok_store/order.go index f0cabbabe..8b648a016 100644 --- a/business/partner/purchase/tiktok_store/order.go +++ b/business/partner/purchase/tiktok_store/order.go @@ -214,8 +214,8 @@ func (p *PurchaseHandler) getOrder(vendorOrgCode, vendorOrderID, vendorStoreID s // GetOrderRider 商家自配送同步配送信息 func (p *PurchaseHandler) GetOrderRider(vendorOrgCode, vendorStoreID string, param map[string]interface{}) (err error) { - appKey := `7152420904331429407` // 暂时定死 - appSecret := `cc7ba367-2394-4cbb-81c6-26f0e929d1c6` //暂时定死 + appKey := `7153997323561879075` // 暂时定死 + appSecret := `3517d3ea-b96b-4379-a7a4-2d9389e8ffeb` //暂时定死 return tiktokShop.NewExpress(appKey, appSecret, "").OrderStatusAndPsInfo(param) } diff --git a/business/partner/purchase/tiktok_store/store_sku2_utils.go b/business/partner/purchase/tiktok_store/store_sku2_utils.go index bbf971cf2..079bc4fa5 100644 --- a/business/partner/purchase/tiktok_store/store_sku2_utils.go +++ b/business/partner/purchase/tiktok_store/store_sku2_utils.go @@ -61,14 +61,24 @@ func GetProductFormatNew(categoryLeftId int64, vendorOrgCode string) (string, er } format := make(map[string][]*tiktokShop.ProductFormatNewList, 0) for _, v := range category.Data.Data { - for _, d := range v.Options { + if len(v.Options) == 0 { formateNew := &tiktokShop.ProductFormatNewList{ - Value: utils.Str2Int64(d.Value), - Name: d.Name, - DiyType: v.DiyType, + Value: 0, + Name: "暂不支持", + DiyType: 1, } format[utils.Int64ToStr(v.PropertyId)] = append(format[utils.Int64ToStr(v.CategoryId)], formateNew) + } else { + for _, d := range v.Options { + formateNew := &tiktokShop.ProductFormatNewList{ + Value: utils.Str2Int64(d.Value), + Name: d.Name, + DiyType: v.DiyType, + } + format[utils.Int64ToStr(v.PropertyId)] = append(format[utils.Int64ToStr(v.CategoryId)], formateNew) + } } + } productFormatNew, err := json.Marshal(format) if err != nil { diff --git a/routers/router.go b/routers/router.go index 56c3830ba..634015cfe 100644 --- a/routers/router.go +++ b/routers/router.go @@ -186,6 +186,7 @@ func init() { web.AutoRouter(&controllers.TiktokController{}) // 订单 web.AutoRouter(&controllers.TiktokShopController{}) // 门店授权 + web.AutoRouter(&controllers.LogisticsController{}) // 抖音快递信息同步 // 如下都是用于检测存活的空接口 web.Any("/", func(ctx *beecontext.Context) { ctx.WriteString("pong\n")