Merge branch 'jdshop' of https://e.coding.net/rosydev/jx-callback into jdshop
This commit is contained in:
@@ -3,6 +3,7 @@ package tiktok_store
|
||||
import (
|
||||
"fmt"
|
||||
tiktokShop "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/tiktok_api"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/partner"
|
||||
@@ -112,9 +113,9 @@ var (
|
||||
func (c *PurchaseHandler) AgreeOrRefuseRefund(ctx *jxcontext.Context, order *model.AfsOrder, approveType int, reason string) (err error) {
|
||||
if globals.EnableDdStoreWrite {
|
||||
if approveType == partner.AfsApproveTypeRefused { // 拒绝退货
|
||||
err = getAPI(order.VendorOrgCode, order.JxStoreID, "").ReturnGoodsToWareHouseSuccess(order.AfsOrderID)
|
||||
err = getAPI(order.VendorOrgCode, order.JxStoreID, "").AfterSaleOperate(tiktokShop.AfterSaleEmuRefuseOnlyRefundApply, order.AfsOrderID, "拒绝退货", utils.Str2Int64(order.VendorStoreID))
|
||||
} else {
|
||||
err = getAPI(order.VendorOrgCode, order.JxStoreID, "").ReturnGoodsToWareHouseSuccess(order.AfsOrderID)
|
||||
err = getAPI(order.VendorOrgCode, order.JxStoreID, "").AfterSaleOperate(tiktokShop.AfterSaleEmuAgreeOnlyRefundApply, order.AfsOrderID, "同意仅退款", utils.Str2Int64(order.VendorStoreID))
|
||||
}
|
||||
}
|
||||
return err
|
||||
|
||||
@@ -266,7 +266,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
Weight: utils.Int2Float64(storeSku.Weight),
|
||||
DeliveryDelayDay: tiktokShop.DeliveryDelayDayToDay,
|
||||
PresellType: tiktokShop.SendGoodsTypeNow,
|
||||
Supply7dayReturn: 0,
|
||||
Supply7dayReturn: 2, // 是否支持7天无理由,0不支持,1支持,2支持(拆封后不支持)
|
||||
Mobile: storeDetail.Tel1,
|
||||
Commit: true,
|
||||
Specs: "净重|" + utils.Float64ToStr(float64(storeSku.SpecQuality)) + storeSku.SpecUnit,
|
||||
@@ -307,15 +307,16 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
param.ProductFormatNew = storeSku.TiktokAttribute
|
||||
|
||||
// 获取品牌
|
||||
param.StandardBrandId, err = api.GetSkuBrand(param.CategoryLeafId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
//param.StandardBrandId, err = api.GetSkuBrand(param.CategoryLeafId)
|
||||
//if err != nil {
|
||||
// return nil, err
|
||||
//}
|
||||
param.StandardBrandId = 596120136
|
||||
|
||||
// 根据本地商品id获取线上商品是否存在,存在则只创建子商品
|
||||
var tiktokResultProductId int64 = 0
|
||||
skuMain, err := api.GetSkuDetailLocalID("", param.OuterProductId)
|
||||
if err != nil { // 线上不存在创建
|
||||
skuMain, err2 := api.GetSkuDetailLocalID("", param.OuterProductId)
|
||||
if err2 != nil { // 线上不存在创建
|
||||
tiktokResult, err := api.CreateStoreCommodity(param) // 创建主商品
|
||||
if err != nil {
|
||||
failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType)
|
||||
@@ -394,7 +395,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
Weight: utils.Int2Float64(storeSku.Weight),
|
||||
DeliveryDelayDay: tiktokShop.DeliveryDelayDayToDay,
|
||||
PresellType: tiktokShop.SendGoodsTypeNow,
|
||||
Supply7dayReturn: 0,
|
||||
Supply7dayReturn: 2,
|
||||
Mobile: storeDetail.Tel1,
|
||||
Commit: true,
|
||||
Specs: "净重|" + fmt.Sprintf("%f", storeSku.SpecQuality) + storeSku.SpecUnit,
|
||||
|
||||
Reference in New Issue
Block a user