This commit is contained in:
richboo111
2023-02-06 17:46:54 +08:00
parent 190fbfa941
commit d16c2ebbb3
3 changed files with 18 additions and 19 deletions

View File

@@ -6,12 +6,6 @@ import (
"encoding/json"
"errors"
"fmt"
warehouse_getFences_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_getFences/response"
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
"git.rosy.net.cn/baseapi/platformapi/tiktok_shop/tiktok_api"
"git.rosy.net.cn/jx-callback/business/jxstore/common"
"git.rosy.net.cn/jx-callback/business/jxstore/event"
"git.rosy.net.cn/jx-callback/business/partner/purchase/tiktok_store"
"io"
"math"
"mime/multipart"
@@ -20,6 +14,13 @@ import (
"strings"
"time"
warehouse_getFences_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_getFences/response"
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
"git.rosy.net.cn/baseapi/platformapi/tiktok_shop/tiktok_api"
"git.rosy.net.cn/jx-callback/business/jxstore/common"
"git.rosy.net.cn/jx-callback/business/jxstore/event"
"git.rosy.net.cn/jx-callback/business/partner/purchase/tiktok_store"
"git.rosy.net.cn/jx-callback/business/auth2"
"git.rosy.net.cn/jx-callback/business/auth2/authprovider/weixin"
"git.rosy.net.cn/jx-callback/business/jxstore/permission"
@@ -1704,9 +1705,6 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
if (valid["deliveryFeeDeductionSill"] != nil || valid["deliveryFeeDeductionFee"] != nil || valid["ybStorePrefix"] != nil) && vendorID == model.VendorIDDD {
DDFlag = true
} //特殊处理抖店运费模板、打包费
if (storeMap.DeliveryFeeDeductionFee > 0 || utils.Str2Int(storeMap.YbStorePrefix) > 0) && vendorID == model.VendorIDDD {
DDFlag = true
}
if DDFlag {
globals.SugarLogger.Debug("进入DDFlag 特殊处理运费模板、起送价、打包费")
if err := tiktok_store.SpecialTreat(storeMap.VendorOrgCode, utils.Str2Int64(storeMap.VendorStoreID), int64(storeMap.StoreID), int64(storeMap.DeliveryFeeDeductionFee), utils.Str2Int64(storeMap.YbStorePrefix)); err != nil {
@@ -1753,7 +1751,6 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
}
}()
if isStoreMapNeedSync(vendorID, valid) { // 对于store vendor map只有Status改变才需要同步到厂商
globals.SugarLogger.Debug("进入UpdateEntityLogicallyAndUpdateSyncStatus")
num, err = dao.UpdateEntityLogicallyAndUpdateSyncStatus(db, storeMap, valid, userName, map[string]interface{}{
model.FieldStoreID: storeID,
model.FieldVendorID: vendorID,