From 6b29891e8021598ec57ccc28c843559a161eba5b Mon Sep 17 00:00:00 2001 From: xucong <850806214@qq.com> Date: Mon, 2 Sep 2024 16:31:38 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=8E=92=E9=98=9F=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/Billions.php | 5 +++-- app/api/logic/BillionsLogic.php | 1 - app/common/logic/PayNotifyLogic.php | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/api/controller/Billions.php b/app/api/controller/Billions.php index bc2619dc..1cc5f68c 100755 --- a/app/api/controller/Billions.php +++ b/app/api/controller/Billions.php @@ -5,6 +5,7 @@ namespace app\api\controller; use app\api\validate\BillionsWithdrawValidate; use app\common\basics\Api; use app\api\logic\BillionsLogic; +use app\common\logic\PayNotifyLogic; use app\common\server\JsonServer; use app\common\server\WeChatServer; use EasyWeChat\Factory; @@ -75,10 +76,10 @@ class Billions extends Api */ public function rechargeBalance() { + $result = PayNotifyLogic::recharge(11,22); // $post = $this->request->post(); - $post['money'] = 100; // $result = BillionsLogic::applyBillionsBalance($this->user_id, $post); - $result = BillionsLogic::applyBillionsBalance(196, $post); + if ($result['code'] == -1) { return JsonServer::error($result['msg']); } diff --git a/app/api/logic/BillionsLogic.php b/app/api/logic/BillionsLogic.php index 5df1f4b9..8fc4e98e 100755 --- a/app/api/logic/BillionsLogic.php +++ b/app/api/logic/BillionsLogic.php @@ -337,7 +337,6 @@ class BillionsLogic extends Logic // var_dump($first_billions_msg);die; if(count($first_billions_msg) > 0){ foreach($first_billions_msg as $k=>$v){ - var_dump($ufl); if($ufl > 0){ if($v['order_price'] <= $ufl+$v['subsidy_price']){ // 查询用户总余额账户 diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index edce4c23..a993ae89 100755 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -372,8 +372,10 @@ class PayNotifyLogic * @author suny * @date 2021/7/13 6:33 下午 */ - private static function recharge($order_sn, $extra = []) + public function recharge($order_sn, $extra = []) { + $order['order_amount'] = 100; + self::recharge_billions($order, 196); Log::write('微信支付异步回调: ' . $order_sn); $new = time(); $recharge_order = new RechargeOrder(); @@ -437,6 +439,7 @@ class PayNotifyLogic $first_billions_msg = Db::name("user_billions")->where("user_id",$user['first_leader'])->where("state",0)->select()->toArray(); if(count($first_billions_msg) > 0){ foreach($first_billions_msg as $k=>$v){ + var_dump($ufl); if($ufl > 0){ if($v['order_price'] <= $ufl+$v['subsidy_price']){ // 查询用户总余额账户