From 95334b874ad4fd1d2569947db4b1a647403fac6c Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Sat, 4 Jan 2025 11:43:27 +0800 Subject: [PATCH] =?UTF-8?q?fix(admin):=20=E4=BF=AE=E5=A4=8D=E9=A2=84?= =?UTF-8?q?=E5=94=AE=E8=AE=A2=E5=8D=95=E5=88=9B=E5=BB=BA=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改了 VIP 价格的计算逻辑,移除了条件判断 - 更新了用户角色验证的错误提示信息 - 优化了订单创建流程中的异常处理 --- app/admin/logic/beforehand_order/BeforehandOrderLogic.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php index d9bef6369..e707297b9 100644 --- a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php +++ b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php @@ -411,7 +411,7 @@ class BeforehandOrderLogic extends BaseLogic 'admin_id' => $admin_id, 'total_price' => $arr['total_price'], 'price' => $arr['price'], - 'vip_price' => $price==0?$arr['price']:$price, + 'vip_price' => $price, 'purchase' => $arr['purchase'], 'oid' => $res['id'], 'code' => $res['code'], @@ -870,10 +870,10 @@ class BeforehandOrderLogic extends BaseLogic if($order['uid']>0){ $user_ship = User::where('id', $order['uid'])->value('user_ship'); if($user_ship==0){ - throw new BusinessException('用户id不能为0'); + throw new BusinessException('用户角色id不能为0'); } }else{ - throw new BusinessException('用户id不能为0'); + throw new BusinessException('该订单没选择会员用户'); } $total_price = 0; $pay_price = 0;