显示中位价
This commit is contained in:
@@ -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{}{
|
||||
|
||||
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user