新增订单为会员等级1标识
This commit is contained in:
parent
8ac8d073f6
commit
14d0f838fd
@ -84,12 +84,13 @@ class OrderLogic extends BaseLogic
|
||||
$cart_select[$k]['cost'] = $find['cost'];
|
||||
$cart_select[$k]['total_price'] = bcmul($v['cart_num'], $find['price'], 2); //订单总价
|
||||
$cart_select[$k]['deduction_price'] =self::$activity_price;//抵扣金额
|
||||
|
||||
$cart_select[$k]['vip'] = 0;
|
||||
if ($user && $user['user_ship'] == 1) {
|
||||
//更新 会员为1的时候原价减去会员价
|
||||
$deduction_price_count=bcmul(bcsub($find['price'], $find['vip_price'], 2),$v['cart_num'],2);
|
||||
$cart_select[$k]['deduction_price'] =$deduction_price_count;
|
||||
self::$activity_price = bcadd(self::$activity_price, $deduction_price_count, 2);
|
||||
$cart_select[$k]['vip'] =1;
|
||||
}
|
||||
if ($user && $user['user_ship'] == 4) {
|
||||
//更新 为4商户的时候减去商户价格
|
||||
|
@ -61,12 +61,13 @@ class StoreOrderLogic extends BaseLogic
|
||||
$cart_select[$k]['cost'] = $find['cost'];
|
||||
$cart_select[$k]['total_price'] = bcmul($v['cart_num'], $find['price'], 2); //订单总价
|
||||
$cart_select[$k]['deduction_price'] =self::$activity_price;//抵扣金额
|
||||
|
||||
$cart_select[$k]['vip'] = 0;
|
||||
if ($user && $user['user_ship'] == 1) {
|
||||
//更新 会员为1的时候原价减去会员价
|
||||
$deduction_price_count=bcmul(bcsub($find['price'], $find['vip_price'], 2),$v['cart_num'],2);
|
||||
$cart_select[$k]['deduction_price'] =$deduction_price_count;
|
||||
self::$activity_price = bcadd(self::$activity_price, $deduction_price_count, 2);
|
||||
$cart_select[$k]['vip'] =1;
|
||||
}
|
||||
|
||||
if ($user && $user['user_ship'] == 4) {
|
||||
@ -223,6 +224,12 @@ class StoreOrderLogic extends BaseLogic
|
||||
$order['refund_type_name'] = OrderEnum::refundType($order['refund_type']) ?? '';
|
||||
$order['pay_type_name'] =PayEnum::getPaySceneDesc($order['pay_type']) ?? '';
|
||||
|
||||
$detail =StoreOrderCartInfo::where('oid',$order['id'])->find()->toArray();
|
||||
$vip =0;
|
||||
if(isset($detail['cart_info']['vip']) && $detail['cart_info']['vip'] == 1){
|
||||
$vip = 1;
|
||||
}
|
||||
$order['vip'] = $vip;
|
||||
return $order->toArray();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user