// +---------------------------------------------------------------------- namespace app\controller\api\store\order; use app\common\repositories\store\order\StoreOrderRepository; use app\common\repositories\store\service\StoreServiceRepository; use crmeb\basic\BaseController; use think\App; use think\exception\HttpResponseException; class StoreOrderVerify extends BaseController { protected $user; protected $service; public function __construct(App $app) { parent::__construct($app); } public function detail($merId, $id, StoreOrderRepository $repository) { $order = $repository->codeByDetail($id); if (!$order) return app('json')->fail('订单不存在'); if ($order->mer_id != $merId) return app('json')->fail('没有权限查询该订单'); return app('json')->success($order); } public function verify($merId, $id, StoreOrderRepository $repository) { $data = $this->request->params(['data','verify_code']); $repository->verifyOrder($id, $merId, $data,$this->request->serviceInfo()->service_id); return app('json')->success('订单核销成功'); } }