From e225b291a5ee2693c1c92ac7c207a2aa6a62843f Mon Sep 17 00:00:00 2001 From: wangxiaowei Date: Sat, 7 Dec 2024 21:42:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E7=94=9F=E6=B4=BB88=E6=8A=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/LocalStoreGoodsCartLogic.php | 6 +++--- app/api/logic/LocalStoreGoodsLogic.php | 20 ++++++++++---------- app/api/logic/LocalStoreLogic.php | 16 ++++++++-------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/app/api/logic/LocalStoreGoodsCartLogic.php b/app/api/logic/LocalStoreGoodsCartLogic.php index 0b7c7113..70093094 100644 --- a/app/api/logic/LocalStoreGoodsCartLogic.php +++ b/app/api/logic/LocalStoreGoodsCartLogic.php @@ -181,12 +181,12 @@ class LocalStoreGoodsCartLogic extends Logic $goods_num += $v['goods_num']; } - if ($lstore_id == Config::get('localstore.dlh_lstore_id')) { +// if ($lstore_id == Config::get('localstore.dlh_lstore_id')) { foreach ($cart as $k => &$v) { -// $cart[$k]['original_price'] = $v['price']; + $cart[$k]['original_price'] = $v['price']; $v['price'] = number_format($v['price'] * LocalStoreGoodsLogic::$sale, 2, '.', ''); } - } +// } return [ 'cart' => $cart, diff --git a/app/api/logic/LocalStoreGoodsLogic.php b/app/api/logic/LocalStoreGoodsLogic.php index 2097ca5a..b3349b0c 100644 --- a/app/api/logic/LocalStoreGoodsLogic.php +++ b/app/api/logic/LocalStoreGoodsLogic.php @@ -17,7 +17,7 @@ use app\common\model\goods\GoodsSubsidy; class LocalStoreGoodsLogic extends Logic { // 折扣控制 - public static $sale = 1; + public static $sale = 88 / 100; // 88折商家ID public static $lstore_id = 138; @@ -71,12 +71,12 @@ class LocalStoreGoodsLogic extends Logic $list[$k]['subsidy_txt'] = '最高返' . $list[$k]['subsidy']['subsidy']; } - if ($get['lstore_id'] == Config::get('localstore.dlh_lstore_id')) { +// if ($get['lstore_id'] == Config::get('localstore.dlh_lstore_id')) { foreach ($list as $k => &$v) { -// $list[$k]['original_price'] = $v['price']; + $list[$k]['original_price'] = $v['price']; $v['price'] = number_format($v['price'] * self::$sale, 2, '.', ''); } - } +// } $count = LocalStoreGoods::where($where)->where($m_where)->count(); @@ -273,10 +273,10 @@ class LocalStoreGoodsLogic extends Logic $data['subsidy_txt'] = '最高返' . $data['subsidy']['subsidy']; // 东龙汇超时价格 *88折 - if ($get['lstore_id'] == Config::get('localstore.dlh_lstore_id')) { - // $data['original_price'] = $data['price']; +// if ($get['lstore_id'] == Config::get('localstore.dlh_lstore_id')) { + $data['original_price'] = $data['price']; $data['price'] = number_format($data['price'] * self::$sale, 2, '.', ''); - } +// } if ($get['lstore_id'] != Config::get('localstore.dlh_lstore_id')) { $data['close'] = array( @@ -295,10 +295,10 @@ class LocalStoreGoodsLogic extends Logic $v['image'] = Config::get('aliyunoss.domain') . $v['image']; // 东龙汇超时价格 *88折 - if ($get['lstore_id'] == Config::get('localstore.dlh_lstore_id')) { - // $v['original_price'] = $v['price']; +// if ($get['lstore_id'] == Config::get('localstore.dlh_lstore_id')) { + $v['original_price'] = $v['price']; $v['price'] = number_format($v['price'] * self::$sale, 2, '.', ''); - } +// } } } diff --git a/app/api/logic/LocalStoreLogic.php b/app/api/logic/LocalStoreLogic.php index 28529bb9..5d28a78c 100644 --- a/app/api/logic/LocalStoreLogic.php +++ b/app/api/logic/LocalStoreLogic.php @@ -164,10 +164,10 @@ class LocalStoreLogic extends Logic $lists[$key]['subsidy_txt'] = '最高返' . $lists[$key]['subsidy']['subsidy']; // 东龙汇超时价格 *88折 - if ($value['lstore_id'] == Config::get('localstore.dlh_lstore_id')) { -// $lists[$key]['original_price'] = $value['price']; +// if ($value['lstore_id'] == Config::get('localstore.dlh_lstore_id')) { + $lists[$key]['original_price'] = $value['price']; $lists[$key]['price'] = round($value['price'] * LocalStoreGoodsLogic::$sale, 2); - } +// } $pic = LocalStoreGoodsPic::where('lsg_id', $value['id'])->field('url')->find(); $lists[$key]['url'] = $pic['url']; @@ -248,12 +248,12 @@ class LocalStoreLogic extends Logic } // 东龙汇超时价格 *88折 - if ($value['lstore_id'] == Config::get('localstore.dlh_lstore_id')) { +// if ($value['lstore_id'] == Config::get('localstore.dlh_lstore_id')) { foreach ($value['street_goods'] as $k1 => &$v1) { - // $value['street_goods'][$k1]['original_price'] = $v1['price']; + $value['street_goods'][$k1]['original_price'] = $v1['price']; $v1['price'] = round($v1['price'] * LocalStoreGoodsLogic::$sale, 2); } - } +// } // 店铺下面的商品数量 $lists[$key]['goods_count'] = LocalStoreGoods::where(['lstore_id' => $value['ls_id'], 'state' => 1, 'audit_status' => 1, 'delete_time' => 0])->count(); @@ -394,9 +394,9 @@ class LocalStoreLogic extends Logic $data['goods_total_price'] = round($goods_msg['price'] * $post['goods_num'], 2); } - if ($post['lstore_id'] == Config::get('localstore.dlh_lstore_id')) { +// if ($post['lstore_id'] == Config::get('localstore.dlh_lstore_id')) { $data['goods_total_price'] = number_format($data['goods_total_price'] * LocalStoreGoodsLogic::$sale, 2, '.', ''); - } +// } $data['order_no'] = createSn('local_goods_order', 'order_no'); $data['lstore_id'] = $post['lstore_id'];