...
|
...
|
@@ -400,6 +400,14 @@ class Cart extends Api |
|
|
(new Goods)->allowField(true)->isUpdate()->saveAll($goodsSave);
|
|
|
// 更新商品规格库存
|
|
|
(new GoodsSpec)->allowField(true)->isUpdate()->saveAll($goodsSpecSave);
|
|
|
// 订单支付-赠送积分
|
|
|
if($order['order_price'] > 0){
|
|
|
$sendscore = config('site.sendscore'); // 消费多少元赠送1积分
|
|
|
$score = bcdiv($order['order_price'],$sendscore); // 赠送积分
|
|
|
if($score >= 1){
|
|
|
\app\common\model\User::score($score,$order['user_id'],'订单支付-赠送积分');
|
|
|
}
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|