From df86becb41411cb171f7c6a85001245d6c0a8c9c Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Mon, 11 Dec 2023 10:09:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BE=9B=E5=BA=94=E9=93=BE?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/dao/store/product/SpuDao.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/common/dao/store/product/SpuDao.php b/app/common/dao/store/product/SpuDao.php index d8cb201d..a07990af 100644 --- a/app/common/dao/store/product/SpuDao.php +++ b/app/common/dao/store/product/SpuDao.php @@ -29,11 +29,15 @@ class SpuDao extends BaseDao { $order = 'P.sort DESC'; if(isset($where['order'])){ - if(in_array($where['order'], ['is_new', 'price_asc', 'price_desc', 'rate', 'sales'])){ + if(in_array($where['order'], ['is_new', 'price_asc', 'price_desc', 'rate', 'sales','procure_price_asc','procure_price_desc'])){ if ($where['order'] == 'price_asc') { $order = 'S.price ASC'; } else if ($where['order'] == 'price_desc') { $order = 'S.price DESC'; + } else if ($where['order'] == 'procure_price_asc') { + $order = 'S.procure_price ASC'; + } else if ($where['order'] == 'procure_price_desc') { + $order = 'S.procure_price DESC'; } else { $order = 'P.'.$where['order'] . ' DESC'; }