From 209cc825ecef8440a85c5fa3fba8099f63903c13 Mon Sep 17 00:00:00 2001 From: xucong <850806214@qq.com> Date: Mon, 9 Dec 2024 09:36:09 +0800 Subject: [PATCH] 0.88 --- app/api/controller/Gh.php | 1 + app/api/controller/Goods.php | 2 ++ app/api/controller/Gtpay.php | 3 ++- app/api/logic/GoodsLogic.php | 4 ++++ app/api/logic/IndexLogic.php | 5 +++++ 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/api/controller/Gh.php b/app/api/controller/Gh.php index 0cd61349..97c9e19c 100644 --- a/app/api/controller/Gh.php +++ b/app/api/controller/Gh.php @@ -190,6 +190,7 @@ class Gh extends Api $da['order_status'] = 1; $da['pay_status'] = 1; $da['pay_way'] = 1; + $da['pay_time'] = time(); if($abutment['from'] == "trade"){ Db::name("order") ->where("trade_id",$abutment['order_id']) diff --git a/app/api/controller/Goods.php b/app/api/controller/Goods.php index 5fc6f72f..0b6fa1b3 100755 --- a/app/api/controller/Goods.php +++ b/app/api/controller/Goods.php @@ -131,8 +131,10 @@ class Goods extends Api return JsonServer::error($error); } if($act_id!=1){ + $goodsDetail['market_price'] = round($goodsDetail['min_price'],2); $goodsDetail['min_price'] = round(0.88*$goodsDetail['min_price'],2); foreach ($goodsDetail['goods_item'] as $k => $v) { + $goodsDetail['goods_item'][$k]['market_price'] = round($v['price'], 2); $goodsDetail['goods_item'][$k]['price'] = round($v['price'] * 0.88, 2); } } diff --git a/app/api/controller/Gtpay.php b/app/api/controller/Gtpay.php index 05e7f9d4..de2a5865 100644 --- a/app/api/controller/Gtpay.php +++ b/app/api/controller/Gtpay.php @@ -60,7 +60,8 @@ MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlu5coHWBbtrz8DyX0VbPWiJZlAsofwZ99pZq return JsonServer::success('开始支付',$r); } public function checkOrder($post){ - $user_id = $this->user_id; + // $user_id = $this->user_id; + $user_id = $post['user_id']; $gtpay_msg = Db::name("gt_pay")->where("id",$post['id'])->find(); $data = [ 'agetId'=>$this->agetId, diff --git a/app/api/logic/GoodsLogic.php b/app/api/logic/GoodsLogic.php index b9d66aaf..0a60ea34 100755 --- a/app/api/logic/GoodsLogic.php +++ b/app/api/logic/GoodsLogic.php @@ -526,6 +526,7 @@ class GoodsLogic extends Logic ->page($get['page_no'], $get['page_size']) ->select(); foreach ($list as &$v) { + $v['market_price'] = round($v['min_price'],2); $v['min_price'] = round(0.88*$v['min_price'],2); } $set_price_type = 0; @@ -661,6 +662,7 @@ class GoodsLogic extends Logic ->page($page_no, $page_size) ->select(); foreach ($list as &$v) { + $v['market_price'] = round($v['min_price'],2); $v['min_price'] = round(0.88*$v['min_price'],2); } $set_price_type = 0; @@ -1062,6 +1064,7 @@ class GoodsLogic extends Logic $result = array_merge($list, $goods); foreach ($result as $k => &$v) { + $v['market_price'] = round($v['min_price'],2); $v['min_price'] = round(0.88*$v['min_price'],2); if (isset($v['image'])) { $v['image'] = UrlServer::getFileUrl($v['image']); @@ -1097,6 +1100,7 @@ class GoodsLogic extends Logic $result = array_merge($list, $goods); foreach ($result as $k => &$v) { + $result[$k]['market_price'] = round($v['min_price'],2); $result[$k]['min_price'] = round(0.88*$v['min_price'],2); if (isset($v['image'])) { $v['image'] = UrlServer::getFileUrl($v['image']); diff --git a/app/api/logic/IndexLogic.php b/app/api/logic/IndexLogic.php index 41211838..9ebe856b 100755 --- a/app/api/logic/IndexLogic.php +++ b/app/api/logic/IndexLogic.php @@ -329,6 +329,7 @@ class IndexLogic extends Logic ->select() ->toArray(); foreach ($hots as &$v) { + $v['market_price'] = round($v['min_price'],2); $v['min_price'] = round(0.88*$v['min_price'],2); } return $hots; @@ -367,6 +368,7 @@ class IndexLogic extends Logic ->select() ->toArray(); foreach ($news as &$v) { + $v['market_price'] = round($v['min_price'],2); $v['min_price'] = round(0.88*$v['min_price'],2); } return $news; @@ -664,6 +666,7 @@ class IndexLogic extends Logic ->select() ->toArray(); foreach ($lists as &$v) { + $v['market_price'] = round($v['min_price'],2); $v['min_price'] = round(0.88*$v['min_price'],2); } $set_price_type = 0; @@ -769,6 +772,7 @@ class IndexLogic extends Logic ->select() ->toArray(); foreach ($lists as &$v) { + $v['market_price'] = round($v['min_price'],2); $v['min_price'] = round(0.88*$v['min_price'],2); } $set_price_type = 0; @@ -1105,6 +1109,7 @@ class IndexLogic extends Logic } $result = array_merge($hot_list, $order_goods); foreach ($result as &$v) { + $v['market_price'] = round($v['min_price'],2); $v['min_price'] = round(0.88*$v['min_price'],2); if (isset($v['image'])) { $v['image'] = UrlServer::getFileUrl($v['image']);