fix(admin): 修复预售订单创建逻辑
- 修改了 VIP 价格的计算逻辑,移除了条件判断 - 更新了用户角色验证的错误提示信息 - 优化了订单创建流程中的异常处理
This commit is contained in:
parent
8ec78fe7d0
commit
95334b874a
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user