From 71ba2e13db272631bd5d28c795316ea0479671b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 6 Jan 2020 11:27:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=AD=E4=BD=8D=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store_sku.go | 3 ++- business/model/dao/store_sku.go | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 34546a13b..ebf34ea1f 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -114,6 +114,7 @@ type tGetStoresSkusInfo struct { model.SkuName PayPercentage int `json:"-"` dao.StoreSkuExt + RealMidUnitPrice int `json:"realMidUnitPrice"` //真实的该商品的全国中位价 } type SheetParam struct { @@ -261,7 +262,7 @@ func getGetStoresSkusBaseSQL(db *dao.DaoDB, storeIDs, skuIDs []int, isFocus bool sql += ` JOIN store_sku_bind t4 ON t4.store_id = t3.id AND t4.sku_id = t2.id AND t4.deleted_at = ? LEFT JOIN sku_name_place_bind t5 ON t1.id = t5.name_id AND t3.city_code = t5.place_code - LEFT JOIN price_refer_snapshot t6 ON t6.city_code = t3.city_code AND t6.name_id = t1.id AND t6.snapshot_at = ? + JOIN price_refer_snapshot t6 ON t6.city_code = t3.city_code AND t6.sku_id = t2.id AND t6.snapshot_at = ? WHERE t1.deleted_at = ? AND (t1.is_global = 1 OR t5.id IS NOT NULL OR 1 = ?)/* AND t1.status = ?*/ ` sqlParams = append(sqlParams, []interface{}{ diff --git a/business/model/dao/store_sku.go b/business/model/dao/store_sku.go index c8614986d..aae0c28bf 100644 --- a/business/model/dao/store_sku.go +++ b/business/model/dao/store_sku.go @@ -158,9 +158,8 @@ type StoreSkuExt struct { BindLastOperator string `orm:"size(32)" json:"lastOperator"` // 最后操作员 BindDeletedAt time.Time `orm:"type(datetime)" json:"deletedAt"` SubStoreID int `orm:"column(sub_store_id)" json:"subStoreID"` - BindPrice int `json:"price"` // 单位为分,不用int64的原因是这里不需要累加 - UnitPrice int `json:"unitPrice"` // 这个是一斤的门店商品价,放在这里的原因是避免额外增加一张store sku_name表,逻辑上要保证同一SKU NAME中的所有SKU这个字段的数据一致 - RealMidUnitPrice int `json:"realMidUnitPrice"` //真实的该商品的全国中位价 + BindPrice int `json:"price"` // 单位为分,不用int64的原因是这里不需要累加 + UnitPrice int `json:"unitPrice"` // 这个是一斤的门店商品价,放在这里的原因是避免额外增加一张store sku_name表,逻辑上要保证同一SKU NAME中的所有SKU这个字段的数据一致 StoreSkuStatus int `json:"storeSkuStatus"` EbaiID string `orm:"column(ebai_id);index" json:"ebaiID"`