修正取消问诊订单退款问题
This commit is contained in:
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Command;
|
||||
|
||||
use App\Model\Order;
|
||||
use App\Model\OrderPrescription;
|
||||
use App\Model\OrderProduct;
|
||||
use App\Model\UserPatient;
|
||||
@@ -277,8 +278,19 @@ class getPrescriptionOrderStatusCommand extends HyperfCommand
|
||||
* @param array|object $order_product
|
||||
* @param string $cancel_remarks
|
||||
*/
|
||||
protected function savePreFailedOrderStatus(array|object $order_product,string $cancel_remarks)
|
||||
protected function savePreFailedOrderStatus(array|object $order_product,string $cancel_remarks): void
|
||||
{
|
||||
// 取消订单
|
||||
$order_data = array();
|
||||
$order_data['cancel_status'] = 1;
|
||||
$order_data['cancel_time'] = date("Y-m-d H:i:s", time());
|
||||
$order_data['cancel_remarks'] = $cancel_remarks;
|
||||
$order_data['updated_at'] = date("Y-m-d H:i:s", time());
|
||||
|
||||
$params = array();
|
||||
$params['order_id'] = $order_product['order_id'];
|
||||
Order::edit($params, $order_data);
|
||||
|
||||
// 订单状态(1:待支付 2:待发货 3:已发货 4:已签收 5:已取消)
|
||||
$params = array();
|
||||
$params['order_product_id'] = $order_product['order_product_id'];
|
||||
|
||||
Reference in New Issue
Block a user