更新
This commit is contained in:
parent
699f8c2e12
commit
bd7326e35f
@ -484,16 +484,22 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
||||
$StoreCouponUser = app()->make(StoreCouponUserRepository::class);
|
||||
$platformCoupon = $StoreCouponUser->validUserPlatformCoupon($uid);
|
||||
$platformConsumption=[];
|
||||
$consumption=[];
|
||||
//消费金
|
||||
if ($source == 103) {
|
||||
$ConsumptionWhere = [
|
||||
'uid' => $uid,
|
||||
'start_time' => date('Y-m-d H:i:s'),
|
||||
'status' => 0,
|
||||
'is_fail' => 0
|
||||
];
|
||||
$platformConsumption = Db::name('store_consumption_user')->where($ConsumptionWhere)->limit(100)->order('create_time', 'desc')->select();
|
||||
}
|
||||
// if ($source == 103) {
|
||||
// $ConsumptionWhere = [
|
||||
// 'uid' => $uid,
|
||||
// 'start_time' => date('Y-m-d H:i:s'),
|
||||
// 'status' => 0,
|
||||
// 'is_fail' => 0
|
||||
// ];
|
||||
// $platformConsumption = Db::name('store_consumption_user')->where($ConsumptionWhere)->limit(100)->order('create_time', 'desc')
|
||||
// ->filed('uid,coupon_title,coupon_price')
|
||||
// ->select();
|
||||
// if($platformConsumption){
|
||||
// $consumption=$platformConsumption[0];
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
$usePlatformCouponId = 0;
|
||||
@ -552,6 +558,10 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
||||
$pay_price = $org_price;
|
||||
}
|
||||
|
||||
if($consumption){
|
||||
$pay_price = bcsub($pay_price, $consumption['coupon_price'], 2);
|
||||
}
|
||||
|
||||
$giveIntegralFlag = $sysIntegralConfig['integral_status'] && $sysIntegralConfig['integral_order_rate'] > 0;
|
||||
$total_give_integral = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user