From 73d0976038e6a653db7769f5788726b959ea83ac Mon Sep 17 00:00:00 2001 From: gazebo Date: Tue, 23 Jul 2019 23:52:34 +0800 Subject: [PATCH] - up --- business/jxstore/cms/sync_store_sku.go | 6 ++---- business/model/dao/store_sku.go | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/business/jxstore/cms/sync_store_sku.go b/business/jxstore/cms/sync_store_sku.go index fb2a37f75..34c41112a 100644 --- a/business/jxstore/cms/sync_store_sku.go +++ b/business/jxstore/cms/sync_store_sku.go @@ -288,10 +288,8 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, isFull bo } } } else if !dao.IsVendorThingIDEmpty(sku.VendorSkuID) { - if model.IsSyncStatusUpdate(sku.StoreSkuSyncStatus) { - if singleStoreHandler != nil { - updateList = append(updateList, calVendorPrice4StoreSku(sku, storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage))) - } + if model.IsSyncStatusUpdate(sku.StoreSkuSyncStatus) && singleStoreHandler != nil { + updateList = append(updateList, calVendorPrice4StoreSku(sku, storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage))) } else { if model.IsSyncStatusPrice(sku.StoreSkuSyncStatus) { bareSku = storeSkuSyncInfo2Bare(calVendorPrice4StoreSku(sku, storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage))) diff --git a/business/model/dao/store_sku.go b/business/model/dao/store_sku.go index 777a9b5f1..c513b9481 100644 --- a/business/model/dao/store_sku.go +++ b/business/model/dao/store_sku.go @@ -274,7 +274,7 @@ func GetFullStoreSkus(db *DaoDB, vendorID, storeID int) (skus []*StoreSkuSyncInf JOIN sku_category t4 ON t3.category_id = t4.id AND t4.deleted_at = ? LEFT JOIN sku_category t5sku ON t2.category_id = t5sku.id WHERE t2.deleted_at = ? AND t2.status = ? AND t2.%s_id <> 0 - ` + ORDER BY t1.price DESC` sqlParams := []interface{}{ storeID, utils.DefaultTimeValue,