用戶退款完成刪除訂單,后臺(tái)刪除之后還顯示在售后訂單里面的問題
1 修改app/services/order/StoreOrderServices.php文件,處理每個(gè)狀態(tài)數(shù)量問題
增加查詢系統(tǒng)未刪除數(shù)量
$data['num'] = [
0 => ['name' => '全部', 'num' => $this->dao->count(['refund_type' => 0, 'is_system_del' => 0])],
1 => ['name' => '僅退款', 'num' => $this->dao->count(['refund_type' => 1, 'is_system_del' => 0])],
2 => ['name' => '退貨退款', 'num' => $this->dao->count(['refund_type' => 2, 'is_system_del' => 0])],
3 => ['name' => '拒絕退款', 'num' => $this->dao->count(['refund_type' => 3, 'is_system_del' => 0])],
4 => ['name' => '商品待退貨', 'num' => $this->dao->count(['refund_type' => 4, 'is_system_del' => 0])],
5 => ['name' => '退貨待收貨', 'num' => $this->dao->count(['refund_type' => 5, 'is_system_del' => 0])],
6 => ['name' => '已退款', 'num' => $this->dao->count(['refund_type' => 6, 'is_system_del' => 0])]
];
2 修改app/dao/order/StoreOrderDao.php文件查詢時(shí)過濾系統(tǒng)刪除的訂單
->where('paid', 1)->where('is_system_del',0)
修改完成

