处理红包使用的错误

This commit is contained in:
lewis 2024-01-22 00:01:07 +08:00
parent 3e28caaecc
commit 1318f48558

View File

@ -39,7 +39,7 @@ class StoreActivityOrderDao extends BaseDao
->find();
if (!empty($consumptionDetail['amount'])) {
// 当前订单使用现金抵扣红包 或 使用通用红包后实付金额不足红包金额的1.5倍,视为无效订单
$redPackType = StoreConsumptionUser::where('coupon_id', $consumptionDetail['coupon_user_id'])->value('type');
$redPackType = StoreConsumptionUser::where('coupon_user_id', $consumptionDetail['coupon_user_id'])->value('type');
if ($redPackType == StoreConsumptionUser::TYPE_TWO || $consumptionDetail['pay_price'] < $consumptionDetail['amount'] * 1.5) {
$model->status = StoreActivityOrder::STATUS_INVALID;
}