|
|
@@ -441,6 +441,16 @@ class OrderController extends BaseController
|
|
|
if ($modifyPrice < $hb->minConsume) {
|
|
|
util::fail("不满足最低消费金额{$hb->minConsume}元");
|
|
|
}
|
|
|
+ if ($this->shop->rechargeWeal == 3) {
|
|
|
+ // 判断支付方式是否是余额支付
|
|
|
+ if($hasPay != dict::getDict('hasPay', 'balance')) {
|
|
|
+ util::fail('此红包非余额支付不可用');
|
|
|
+ } else {
|
|
|
+ if($custom->balance < $post['modifyPrice']) {
|
|
|
+ util::fail('此红包非余额支付不可用(您的余额不足)');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
$modifyPrice = bcsub($modifyPrice, $hb->amount, 2);//扣减红包
|
|
|
} else {
|
|
|
Yii::error('没有找到红包,hbId', $hbId . ' ' . __METHOD__);
|
|
|
@@ -763,6 +773,11 @@ class OrderController extends BaseController
|
|
|
if ($modifyPrice < $hb->minConsume) {
|
|
|
util::fail("不满足最低消费金额{$hb->minConsume}元");
|
|
|
}
|
|
|
+ if ($this->shop->rechargeWeal == 3) {
|
|
|
+ if($custom->balance < $modifyPrice) {
|
|
|
+ util::fail('此红包非余额支付不可用(您的余额不足)');
|
|
|
+ }
|
|
|
+ }
|
|
|
$modifyPrice = bcsub($modifyPrice, $hb->amount, 2);//扣减红包
|
|
|
} else {
|
|
|
Yii::error('没有找到红包,hbId', $hbId . ' ' . __METHOD__);
|
|
|
@@ -1237,6 +1252,7 @@ class OrderController extends BaseController
|
|
|
$showYePay = $balance >= $actPrice && $actPrice > 0 ? 1 : 0;
|
|
|
$detail['showYePay'] = $showYePay;
|
|
|
|
|
|
+ $detail['rechargeWeal'] = $this->shop->rechargeWeal; //是否开启余额支付
|
|
|
util::success($detail);
|
|
|
}
|
|
|
|