From 37f0de8c376bb877ea74cb313c7d7cd3d61240f5 Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Fri, 5 Jul 2024 11:14:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=BB=E7=BB=93=E7=9B=B8=E5=85=B3=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/user/UserLogic.php | 35 +++++++++++++++++++++++++++++ app/common/logic/PayNotifyLogic.php | 1 + 2 files changed, 36 insertions(+) diff --git a/app/api/logic/user/UserLogic.php b/app/api/logic/user/UserLogic.php index 67b4ee755..c1aed62f2 100644 --- a/app/api/logic/user/UserLogic.php +++ b/app/api/logic/user/UserLogic.php @@ -330,6 +330,15 @@ class UserLogic extends BaseLogic ->page($params['page_no'],$params['page_size']) ->order('id','desc') ->select()->toArray(); + foreach ($data as &$value){ + if($value['status'] == 0){ + $value['title'] = "购买商品".$value['all']."元获得".$value['number']."元返还金"; + }else{ + //退回到余额、微信、采购款 + $back = self::dealTitleCate($value['pay_type']); + $value['title'] = "返还金解冻".$value['number']."元退回到".$back; + } + } break; default: $data = []; @@ -344,5 +353,31 @@ class UserLogic extends BaseLogic } + public static function dealTitleCate($pay_type) + { + switch ($pay_type){ + case 18: + $title = "采购款"; + break; + case 17: + $title = "现金"; + break; + case 3: + $title ="余额"; + break; + case 7: + case 9: + $title ="微信"; + break; + case 13: + $title ="支付宝"; + break; + default: + $title ="默认"; + } + return $title; + } + + } \ No newline at end of file diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index 0461ff546..c227a730a 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -872,6 +872,7 @@ class PayNotifyLogic extends BaseLogic 'order_sn' => $order['order_id'], 'user_id' => $order['uid'], 'number' => $total_vip, + 'all' => $order['pay_price'], 'pay_type' => $pay_type ?? 1, 'status' => 0, 'store_id' => $order['store_id'],