1
This commit is contained in:
@@ -24,7 +24,7 @@ import (
|
||||
// 该函数主要用于对比京西平台商品和各个平台门店商品的差异
|
||||
// 对比上下架状态以及商品价格差异,相同的不做修改,不同的以京西系统商品为主
|
||||
|
||||
func CompareJxVendorSku(jxStoreId int) error {
|
||||
func CompareJxVendorSku(jxStoreId int, vendorIds []int) error {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
errListToStr = new(strings.Builder)
|
||||
@@ -44,7 +44,7 @@ func CompareJxVendorSku(jxStoreId int) error {
|
||||
}
|
||||
|
||||
// 有效的三方平台
|
||||
storeMap, err := dao.GetStoresMapList(db, nil, []int{jxStoreId}, []int{model.StoreStatusOpened, model.StoreStatusClosed, model.StoreStatusHaveRest}, model.StoreStatusDisabled, 1, "", "", "")
|
||||
storeMap, err := dao.GetStoresMapList(db, vendorIds, []int{jxStoreId}, []int{model.StoreStatusOpened, model.StoreStatusClosed, model.StoreStatusHaveRest}, model.StoreStatusDisabled, 1, "", "", "")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -63,6 +63,10 @@ func CompareJxVendorSku(jxStoreId int) error {
|
||||
}
|
||||
continue
|
||||
case model.VendorIDDD:
|
||||
if errs := TiktokSyncSkuPriceAndStatus(db, sm, skuMap); errs != nil {
|
||||
errListToStr.WriteString(errs.Error())
|
||||
}
|
||||
continue
|
||||
case model.VendorIDTaoVegetable:
|
||||
if errs := TaoSyncSkuPriceAndStatus(db, sm, skuMap, skuIdList); errs != nil {
|
||||
errListToStr.WriteString(errs.Error())
|
||||
|
||||
Reference in New Issue
Block a user