- 重构dao.store_sku中的命名
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/business/partner"
|
||||
)
|
||||
|
||||
@@ -186,7 +187,7 @@ func (c *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
SalePrice: jxutils.StandardPrice2Int(utils.MustInterface2Float64(product["price"])),
|
||||
Weight: int(math.Round(utils.Interface2Float64WithDefault(product["weight"], 0.0))),
|
||||
}
|
||||
if sku.VendorSkuID == "0" {
|
||||
if dao.IsVendorThingIDEmpty(sku.VendorSkuID) {
|
||||
sku.VendorSkuID = utils.Int64ToStr(utils.MustInterface2Int64(product["id"])) // 2018-09-28日,饿了么迁移到饿百后,这个字段发生了变化
|
||||
}
|
||||
order.Skus = append(order.Skus, sku)
|
||||
|
||||
@@ -175,7 +175,7 @@ func (p *PurchaseHandler) SyncLocalStoreCategory(ctx *jxcontext.Context, db *dao
|
||||
return "", err
|
||||
}
|
||||
} else {
|
||||
if v.VendorCatID == "" || v.VendorCatID == "0" {
|
||||
if dao.IsVendorThingIDEmpty(v.VendorCatID) {
|
||||
num++
|
||||
}
|
||||
if isCheckRemote {
|
||||
|
||||
@@ -129,7 +129,7 @@ func (p *PurchaseHandler) SyncLocalStoreCategory(ctx *jxcontext.Context, db *dao
|
||||
return "", err
|
||||
}
|
||||
} else {
|
||||
if (v.VendorCatID == "0" || v.VendorCatID == "") && ((v.CatSyncStatus & model.SyncFlagNewMask) == 0) {
|
||||
if dao.IsVendorThingIDEmpty(v.VendorCatID) && ((v.StoreCatSyncStatus & model.SyncFlagNewMask) == 0) {
|
||||
catMap := &model.StoreSkuCategoryMap{}
|
||||
catMap.ID = v.MapID
|
||||
if _, err = dao.UpdateEntityLogically(db, catMap, map[string]interface{}{
|
||||
|
||||
Reference in New Issue
Block a user