diff --git a/app/api/controller/order/OrderController.php b/app/api/controller/order/OrderController.php index 4073951c..935a9f6d 100644 --- a/app/api/controller/order/OrderController.php +++ b/app/api/controller/order/OrderController.php @@ -9,7 +9,6 @@ use app\api\validate\OrderValidate; use app\common\enum\PayEnum; use app\common\logic\PaymentLogic; use app\common\logic\PayNotifyLogic; -use app\common\model\retail\Cashierclass; use app\common\model\store_order\StoreOrder; use app\common\model\system_store\SystemStoreStaff; use app\common\model\user\UserAddress; @@ -475,6 +474,20 @@ class OrderController extends BaseApiController $res = StoreOrder::where($where)->whereDay('create_time', $date)->count(); return $this->success('ok', ['order_count' => $res]); } + + + //订单退款申请 + public function apply_refund() + { + $params = (new OrderValidate())->post()->goCheck('add'); + $uid = $this->userId; +// OrderLogic::dealRefund($uid,$params); + + + + } + + } diff --git a/app/api/lists/order/OrderList.php b/app/api/lists/order/OrderList.php index 8c9eadd3..2d1857f9 100644 --- a/app/api/lists/order/OrderList.php +++ b/app/api/lists/order/OrderList.php @@ -44,12 +44,14 @@ class OrderList extends BaseAdminDataLists implements ListsSearchInterface { $userId=$this->request->userId; if(!$userId) return []; - return StoreOrder::with(['store'])->where($this->searchWhere)->where('uid',$userId) + return StoreOrder::with(['store'])->where($this->searchWhere)->where('uid',$userId) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select() ->each(function($item){ - $item['goods_list']=StoreOrderCartInfo::where('oid',$item['id'])->with('goodsName')->field('product_id,cart_num,verify_code,is_writeoff,writeoff_time')->limit(3)->select(); + $item['goods_list']=StoreOrderCartInfo::where('oid',$item['id'])->with(['goodsName'=> function ($query) { + $query->withTrashed(); + }])->field('product_id,cart_num,verify_code,is_writeoff,writeoff_time')->limit(3)->select(); $item['goods_count']=count(explode(',',$item['cart_id'])); }) ->toArray();