mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Automatic merge from release/2.7.0 -> release/2.8.0
* commit 'dc45d8a30aaf0b469c004e9d085450bd5fe396c1': fix: issues due to move of skustools to models at 2.7.0
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package skus
|
||||
package models
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
@@ -176,7 +176,7 @@ func (self *SkusZone) doUpdate(odata *SServerSku, sku jsonutils.JSONObject) erro
|
||||
func (self *SkusZone) SyncToLocalDB() error {
|
||||
log.Debugf("SkusZone %s start sync.", self.ExternalZoneId)
|
||||
// 更新已经soldout的sku
|
||||
localIds, err := models.ServerSkuManager.FetchAllAvailableSkuIdByZoneId(self.ZoneId)
|
||||
localIds, err := ServerSkuManager.FetchAllAvailableSkuIdByZoneId(self.ZoneId)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -216,7 +216,7 @@ func (self *SkusZone) SyncToLocalDB() error {
|
||||
// 处理已经下架的sku: 将本次未更新且处于available状态的sku置为soldout状态
|
||||
abandonIds := diff(localIds, updatedIds)
|
||||
log.Debugf("SyncToLocalDB abandon sku %s", abandonIds)
|
||||
err = models.ServerSkuManager.MarkAllAsSoldout(abandonIds)
|
||||
err = ServerSkuManager.MarkAllAsSoldout(abandonIds)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user