From be408ba6f961f6b77ac5f827a94abc4fd900a842 Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Tue, 9 Apr 2024 17:44:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E4=BD=A3=E9=87=91?= =?UTF-8?q?=E6=8F=90=E7=8E=B0=E7=94=B3=E8=AF=B7=E8=AE=B0=E5=BD=95=20=20?= =?UTF-8?q?=E6=8F=90=E7=8E=B0=E9=87=91=E9=A2=9D=E5=BA=94=E8=AF=A5=E4=B8=BA?= =?UTF-8?q?=E5=AE=9E=E9=99=85=E5=88=B0=E8=B4=A6=E9=87=91=E9=A2=9D+?= =?UTF-8?q?=E6=89=8B=E7=BB=AD=E8=B4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/user/UserExtract.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/controller/api/user/UserExtract.php b/app/controller/api/user/UserExtract.php index 2f7d6c8..60429f3 100644 --- a/app/controller/api/user/UserExtract.php +++ b/app/controller/api/user/UserExtract.php @@ -35,7 +35,14 @@ class UserExtract extends BaseController [$start,$stop]= $this->request->params(['start','stop'],true); $where['date'] = $start&&$stop ? date('Y/m/d',$start).'-'.date('Y/m/d',$stop) : ''; $where['uid'] = $this->request->uid(); - return app('json')->success($this->repository->getList($where,$page,$limit)); + $data = $this->repository->getList($where,$page,$limit); + $data['list']->each(function($item){ + $item['extract_price'] = bcadd((float)$item['extract_price'], (float)$item['withdraw_commission'], 2); + + return $item; + }); + + return app('json')->success($data); } public function create(validate $validate)