You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
912 B
39 lines
912 B
<?php
|
|
|
|
namespace App\Service\v3\Implementations;
|
|
|
|
use App\Model\v3\Order;
|
|
use App\Model\v3\OrderMain;
|
|
use Hyperf\Di\Annotation\Inject;
|
|
use App\Service\v3\Interfaces\OrderOnlineServiceInterface;
|
|
class OrderOnlineService implements OrderOnlineServiceInterface
|
|
{
|
|
public function do($params){
|
|
return [];
|
|
}
|
|
|
|
public function check()
|
|
{
|
|
// TODO: Implement check() method.
|
|
}
|
|
|
|
public function undo()
|
|
{
|
|
// TODO: Implement undo() method.
|
|
}
|
|
|
|
public function detailByUser($orderMainId, $userId)
|
|
{
|
|
|
|
$orderMain = OrderMain::with(['market'])->find($orderMainId);
|
|
$orders = Order::query()
|
|
->where(['order_main_id' => $orderMainId, 'user_id' => $userId])
|
|
->with([
|
|
'orderGoods',
|
|
'store'
|
|
])
|
|
->get()->toArray();
|
|
|
|
return ['order_main' => $orderMain, 'orders' => $orders];
|
|
}
|
|
}
|