查询高价格商品修改

This commit is contained in:
苏尹岚
2020-02-25 10:41:19 +08:00
parent d8e7ae1773
commit d492a2301c

View File

@@ -485,13 +485,7 @@ func GetStoresSkusNew(ctx *jxcontext.Context, storeIDs, skuIDs []int, isFocus bo
t3.id store_id, t1.id name_id
` + sql + `
GROUP BY 1, 2
`
if isHighPrice {
sql2 += " ORDER BY t4.unit_price DESC"
} else {
sql2 += " ORDER BY 1, 2"
}
sql2 += `
ORDER BY 1, 2
LIMIT ? OFFSET ?
`
sqlParams2 := append([]interface{}{}, sqlParams...)
@@ -536,6 +530,9 @@ func GetStoresSkusNew(ctx *jxcontext.Context, storeIDs, skuIDs []int, isFocus bo
t4.status_sale_begin, t4.status_sale_end,
t6.mid_unit_price real_mid_unit_price
` + sql
if isHighPrice {
sql += " , t4.unit_price DESC"
}
var tmpList []*tGetStoresSkusInfo
beginTime := time.Now()
if err = dao.GetRows(db, &tmpList, sql, sqlParams...); err != nil {