查询高价格商品修改
This commit is contained in:
@@ -485,13 +485,7 @@ func GetStoresSkusNew(ctx *jxcontext.Context, storeIDs, skuIDs []int, isFocus bo
|
|||||||
t3.id store_id, t1.id name_id
|
t3.id store_id, t1.id name_id
|
||||||
` + sql + `
|
` + sql + `
|
||||||
GROUP BY 1, 2
|
GROUP BY 1, 2
|
||||||
`
|
ORDER BY 1, 2
|
||||||
if isHighPrice {
|
|
||||||
sql2 += " ORDER BY t4.unit_price DESC"
|
|
||||||
} else {
|
|
||||||
sql2 += " ORDER BY 1, 2"
|
|
||||||
}
|
|
||||||
sql2 += `
|
|
||||||
LIMIT ? OFFSET ?
|
LIMIT ? OFFSET ?
|
||||||
`
|
`
|
||||||
sqlParams2 := append([]interface{}{}, sqlParams...)
|
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,
|
t4.status_sale_begin, t4.status_sale_end,
|
||||||
t6.mid_unit_price real_mid_unit_price
|
t6.mid_unit_price real_mid_unit_price
|
||||||
` + sql
|
` + sql
|
||||||
|
if isHighPrice {
|
||||||
|
sql += " , t4.unit_price DESC"
|
||||||
|
}
|
||||||
var tmpList []*tGetStoresSkusInfo
|
var tmpList []*tGetStoresSkusInfo
|
||||||
beginTime := time.Now()
|
beginTime := time.Now()
|
||||||
if err = dao.GetRows(db, &tmpList, sql, sqlParams...); err != nil {
|
if err = dao.GetRows(db, &tmpList, sql, sqlParams...); err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user