From 0776d3d3b6d567c0406c041cf4cbd280d9a608cd Mon Sep 17 00:00:00 2001 From: xucong <850806214@qq.com> Date: Sat, 7 Dec 2024 15:20:20 +0800 Subject: [PATCH] 0.88 --- app/api/logic/GoodsLogic.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/api/logic/GoodsLogic.php b/app/api/logic/GoodsLogic.php index 60740a58..076a2150 100755 --- a/app/api/logic/GoodsLogic.php +++ b/app/api/logic/GoodsLogic.php @@ -1046,7 +1046,9 @@ class GoodsLogic extends Logic ->limit(4) ->select() ->toArray(); - + foreach ($list as &$v) { + $v['min_price'] = round(0.88*$v['min_price'],2); + } $count = count($list); if ($count < 4) { @@ -1080,7 +1082,9 @@ class GoodsLogic extends Logic ->field('ng.id as ng_id, g.id as id, g.name, g.image, g.issuing_price, g.market_price, g.min_price, g.purchase_price, g.wholesale_price, g.subsidy_id') ->select() ->toArray(); - + foreach ($list as &$v) { + $v['min_price'] = round(0.88*$v['min_price'],2); + } $goods = Db::name('goods') ->where($onSaleWhere) ->where($shopWhere)