|
|
@@ -423,7 +423,18 @@ class StoreOrder extends BaseModel
|
|
|
// $usedIntegral = 0;
|
|
|
// }
|
|
|
// if (!$res2) return self::setErrorInfo('使用积分抵扣失败!', true);
|
|
|
- $SurplusIntegral = $userInfo['integral'];
|
|
|
+
|
|
|
+ $res2 = true;
|
|
|
+ $SurplusIntegral = $userInfo['brokerage_price'];
|
|
|
+// if ($payIntegral > 0) {
|
|
|
+// if ($userInfo['integral'] < $payIntegral) {
|
|
|
+// return self::setErrorInfo('积分不足', true);
|
|
|
+// } else {
|
|
|
+// $res2 = false !== User::bcDec($userInfo['uid'], 'integral', $payIntegral, 'uid');
|
|
|
+// }
|
|
|
+// $SurplusIntegral = bcsub($userInfo['integral'], $payIntegral, 2);
|
|
|
+// $res2 = $res2 && false != UserBill::expend('积分商品', $uid, 'integral', 'integral_product', $payIntegral, $key, $SurplusIntegral, '购买积分商品使用' . $payIntegral . '积分');
|
|
|
+// }
|
|
|
//奖金抵扣
|
|
|
if ($useIntegral && $SurplusIntegral > 0) {
|
|
|
$deductionPrice = (float)bcmul($SurplusIntegral, $other['integralRatio'], 2);
|