- 找到app/common/repositories/store/order/StoreOrderCreateRepository.php文件的352行
- 替換原內容為一下內容, 具體參考下圖
usort($merchantCart['coupon'], function ($a, $b) use ($sortIds) {
return array_search($a['coupon_user_id'], $sortIds) > array_search($b['coupon_user_id'], $sortIds) ? 1 : -1;
});
- 找到文件415行, 替換原內容為一下內容, 具體參考下圖
$coupon['disabled'] = $pay_price <= 0;
- 修改完畢后重啟 swoole 服務即可