Commit bc798f50 authored by hangjun83's avatar hangjun83

openapi 1.1

parent 9f8fa640
...@@ -48,8 +48,8 @@ class CustomerAuthController extends Controller ...@@ -48,8 +48,8 @@ class CustomerAuthController extends Controller
* @Schema( * @Schema(
* required={"customerToken"}, * required={"customerToken"},
* @Property(property="customerToken", @Schema(type="string"),description="用户私有key"), * @Property(property="customerToken", @Schema(type="string"),description="用户私有key"),
* example={"customerToken":"cKCXPza6y23l_c0z"}
* ), * ),
* @OA\Examples(example="customerToken", value="cKCXPza6y23l_c0z",summary=""),
* ) * )
* ), * ),
* @AnnotationResponse( * @AnnotationResponse(
......
...@@ -18,6 +18,7 @@ use App\Rhawn\Repositories\Eloquent\RhawnCustomerRepositoryEloquent; ...@@ -18,6 +18,7 @@ use App\Rhawn\Repositories\Eloquent\RhawnCustomerRepositoryEloquent;
use App\Rhawn\Services\RhawnCustomerService; use App\Rhawn\Services\RhawnCustomerService;
use App\Support\Facades\SimpleLogs; use App\Support\Facades\SimpleLogs;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use mysql_xdevapi\Exception;
class RhawnOrdersService class RhawnOrdersService
{ {
...@@ -231,14 +232,15 @@ class RhawnOrdersService ...@@ -231,14 +232,15 @@ class RhawnOrdersService
if(!$order){ if(!$order){
throw new \Exception('订单编号不存在',500); throw new \Exception('订单编号不存在',500);
} }
if($order['cus_id'] != $customer['cus_id']){
throw new Exception('该订单你无权操作',500);
}
$dpdetail = $this->rhawnOrdersService->getOrderDispatchDetail($order['so_no']); $dpdetail = $this->rhawnOrdersService->getOrderDispatchDetail($order['so_no']);
if($dpdetail){ if($dpdetail){
$dpdetail = app(OrdersDispatchTransformer::class)->transform($dpdetail); $dpdetail = app(OrdersDispatchTransformer::class)->transform($dpdetail);
} }
return $dpdetail; return $dpdetail;
}catch(\Throwable $exception){ }catch(\Throwable $exception){
var_dump($exception->getMessage());
exit;
SimpleLogs::writeLog($exception->getMessage(),__CLASS__.':getOrderDispatchByOrderNumber','error'); SimpleLogs::writeLog($exception->getMessage(),__CLASS__.':getOrderDispatchByOrderNumber','error');
throw $exception; throw $exception;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment