|
|
@ -4,8 +4,10 @@ declare (strict_types=1); |
|
|
|
namespace app\store\controller; |
|
|
|
namespace app\store\controller; |
|
|
|
|
|
|
|
|
|
|
|
use app\common\enum\RecoveryStatusEnum; |
|
|
|
use app\common\enum\RecoveryStatusEnum; |
|
|
|
|
|
|
|
use app\common\model\RecoveryOrder; |
|
|
|
use app\store\model\server\RecoveryCategory; |
|
|
|
use app\store\model\server\RecoveryCategory; |
|
|
|
use app\store\model\server\ServerRecovery; |
|
|
|
use app\store\model\server\ServerRecovery; |
|
|
|
|
|
|
|
use cores\Request; |
|
|
|
use think\db\exception\DataNotFoundException; |
|
|
|
use think\db\exception\DataNotFoundException; |
|
|
|
use think\db\exception\DbException; |
|
|
|
use think\db\exception\DbException; |
|
|
|
use think\db\exception\ModelNotFoundException; |
|
|
|
use think\db\exception\ModelNotFoundException; |
|
|
@ -195,4 +197,27 @@ class Recovery extends Controller |
|
|
|
} |
|
|
|
} |
|
|
|
return $this->renderSuccess('操作成功'); |
|
|
|
return $this->renderSuccess('操作成功'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 回收订单列表 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function orderList(Request $request): Json |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$params = $request->param(); |
|
|
|
|
|
|
|
$filter = []; |
|
|
|
|
|
|
|
if(!empty($params['order_no'])) { |
|
|
|
|
|
|
|
$filter[] = ['order_no', 'like', "%{$params['order_no']}%"]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!empty($params['order_status']) && $params['order_status'] != 'all') { |
|
|
|
|
|
|
|
$filter[] = ['order_status', '=', $params['order_status']]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$model = new RecoveryOrder(); |
|
|
|
|
|
|
|
$list = $model->where($filter) |
|
|
|
|
|
|
|
->where('store_id', $this->storeId) |
|
|
|
|
|
|
|
->order('create_time', 'desc') |
|
|
|
|
|
|
|
->paginate(10); |
|
|
|
|
|
|
|
return $this->renderSuccess(compact('list')); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |