|
|
@@ -561,4 +561,28 @@ class OrderIssueService
|
|
|
{
|
|
|
return $this->getConditionQuery($params)->get();
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ public function getRecycleBinOrderIssue($params)
|
|
|
+ {
|
|
|
+ return OrderIssue::query()->with(['order'=>function($query){
|
|
|
+ $query->with(['logistic','shop'.'owner','packages']);
|
|
|
+ },'rejectedBill','issueType','secondOrder'])->onlyTrashed();
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getRecycleBinPaginate($params){
|
|
|
+ return $this->getDeleteOrderIssue($params)->paginate($params['paginate'] ?? 50);
|
|
|
+ }
|
|
|
+
|
|
|
+ public function recoverOrderIssue($ids)
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ $bool = OrderIssue::query()->withTrashed()->whereIn('id', $ids)->restore();
|
|
|
+ app('LogService')->log(__METHOD__, __FUNCTION__, '恢复问题件 ids = ' . json_encode($ids));
|
|
|
+ return ['success'=>$bool];
|
|
|
+ } catch (\Exception $e) {
|
|
|
+ app('LogService')->log(__METHOD__, 'ERROR '.__FUNCTION__, '恢复问题件 Error' . json_encode($ids).' || '.json_encode($e->getMessage()).' || '.json_encode($e->getTraceAsString()));
|
|
|
+ return ['success'=>false,'error'=>$e->getMessage()];
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|