diff --git a/business/partner/purchase/tiktok_store/store.go b/business/partner/purchase/tiktok_store/store.go index d94ea40b5..a58c09337 100644 --- a/business/partner/purchase/tiktok_store/store.go +++ b/business/partner/purchase/tiktok_store/store.go @@ -292,7 +292,9 @@ func (p *PurchaseHandler) UpdateStoreStatus(ctx *jxcontext.Context, vendorOrgCod unsuspendStoreID := &shop_unsuspendStore_request.ShopUnsuspendStoreParam{ StoreId: utils.Str2Int64(vendorStoreID), } - _, err = api.UnsuspendStore(unsuspendStoreID) + if _, err = api.UnsuspendStore(unsuspendStoreID); err != nil { + return err + } } else { //恢复营业 suspendStoreID := &shop_storeSuspend_request.ShopStoreSuspendParam{ StoreId: utils.Str2Int64(vendorStoreID), @@ -308,7 +310,9 @@ func (p *PurchaseHandler) UpdateStoreStatus(ctx *jxcontext.Context, vendorOrgCod if remoteStoreInfo.StoreDetail.Store.SuspendType == tiktok_api.SuspendTypePlatformPenalty { err = errors.New("门店因平台处罚暂停营业,不可主动修改营业状态") } else { - _, err = api.StoreSuspend(suspendStoreID) + if _, err = api.StoreSuspend(suspendStoreID); err != nil { + return err + } } } } @@ -627,15 +631,15 @@ func (P *PurchaseHandler) GetAllStoresVendorID(ctx *jxcontext.Context, vendorOrg func (P *PurchaseHandler) UpdateStoreLineStatus(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, lineStatus int) (err error) { api := getAPI(vendorOrgCode, storeID, vendorStoreID) if lineStatus == model.StoreStatusOpened { - param := &shop_storeSuspend_request.ShopStoreSuspendParam{ - StoreId: utils.Str2Int64(vendorStoreID), - } - _, err = api.StoreSuspend(param) - } else { param := &shop_unsuspendStore_request.ShopUnsuspendStoreParam{ StoreId: utils.Str2Int64(vendorStoreID), } _, err = api.UnsuspendStore(param) + } else { + param := &shop_storeSuspend_request.ShopStoreSuspendParam{ + StoreId: utils.Str2Int64(vendorStoreID), + } + _, err = api.StoreSuspend(param) } return err }