From 8f9ba883a20fb7695e26d32c0c1e52f85c86cd95 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Fri, 26 Jul 2024 11:55:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat(StoreOrderCartInfoLists):=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=95=86=E5=93=81=E4=BF=A1=E6=81=AF=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lists/store_order_cart_info/StoreOrderCartInfoLists.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/admin/lists/store_order_cart_info/StoreOrderCartInfoLists.php b/app/admin/lists/store_order_cart_info/StoreOrderCartInfoLists.php index 959b68f0..a8a9aa90 100644 --- a/app/admin/lists/store_order_cart_info/StoreOrderCartInfoLists.php +++ b/app/admin/lists/store_order_cart_info/StoreOrderCartInfoLists.php @@ -47,7 +47,7 @@ class StoreOrderCartInfoLists extends BaseAdminDataLists implements ListsSearchI return StoreOrderCartInfo::where($this->searchWhere) ->field('cart_info,product_id,store_id')->limit($this->limitOffset, $this->limitLength) ->select()->each(function ($item) { - $find=StoreBranchProduct::where('product_id',$item['product_id'])->where('store_id',$item['store_id'])->field('image,store_name,store_info')->find(); + $find=StoreProduct::where('id',$item['product_id'])->field('image,store_name,store_info')->find(); if($find){ $item['image']=$find['image'];//商品图片 $item['store_name']=$find['store_name'];//商品名称 From 7e99a8afa96a7a228a4e396bc996ea73ea373360 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Sat, 27 Jul 2024 09:24:44 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat(CapitalFlowLogic):=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=B5=84=E9=87=91=E6=B5=81=E6=B0=B4=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=94=AF=E4=BB=98=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/logic/CapitalFlowLogic.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/common/logic/CapitalFlowLogic.php b/app/common/logic/CapitalFlowLogic.php index e65ce0f1..22a4a2f5 100644 --- a/app/common/logic/CapitalFlowLogic.php +++ b/app/common/logic/CapitalFlowLogic.php @@ -3,6 +3,7 @@ namespace app\common\logic; use app\common\enum\OrderEnum; +use app\common\enum\PayEnum; use app\common\model\finance\CapitalFlow; class CapitalFlowLogic extends BaseLogic @@ -72,12 +73,12 @@ class CapitalFlowLogic extends BaseLogic $model->link_type = $linkType; $model->link_id = $linkId; $model->amount = $amount; - if ($payType == OrderEnum::BALANCE_PAYMEN_NO) { - $model->before_balance = $this->user['purchase_funds']; - $model->balance = bcsub($this->user['purchase_funds'], $amount, 2); - } else { - $model->before_balance = $this->user['now_money']; - $model->balance = bcsub($this->user['now_money'], $amount, 2); + if ($payType == PayEnum::PURCHASE_FUNDS) { + $model->before_balance = bcadd($this->user['purchase_funds'],$amount,2); + $model->balance = $this->user['purchase_funds']; + } elseif ($payType == PayEnum::BALANCE_PAY){ + $model->before_balance = bcadd($this->user['now_money'],$amount,2); + $model->balance = $this->user['now_money']; } $model->create_time = date('Y-m-d H:i:s'); $model->type = 'out';