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:
周有松
2019-03-14 17:44:48 +08:00
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
package skus
package models
import (
"reflect"
+2 -2
View File
@@ -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
}