Commit 50bdfe0f authored by hangjun83's avatar hangjun83

接口安全认证

parent 36c0a8fc
......@@ -115,6 +115,7 @@ class OrdersController extends Controller
if(!$customerCode){
return Response::ok('客户编号不存在!');
}
$this->checkCustomerType($customerCode,$this->controllerType);
$message = [
'soCusPo.required' => "客户订单号必传",
......@@ -131,9 +132,6 @@ class OrdersController extends Controller
$requestParams = $this->formatKeysfromArray($request->all(),'toUnderScore');
$requestParams = array_merge($requestParams,['customer_code' => $customerCode]);
try{
$this->checkCustomerType($customerCode,$this->controllerType);
$orderDetail = $this->bhuaOrdersService->createNewCustomerOrders($requestParams);
if($orderDetail){
$orderDetail = $this->formatKeysfromArray($orderDetail,'toCamelCase');
......
......@@ -79,14 +79,12 @@ class ProductsController extends Controller
if(!$customerCode){
return Response::ok('客户编号不存在!');
}
$this->checkCustomerType($customerCode,$this->controllerType);
$requestParams = $this->formatKeysfromArray($request->all(),'toUnderScore');
$requestParams = array_merge($requestParams,['customer_code' => $customerCode]);
try{
$this->checkCustomerType($customerCode,$this->controllerType);
$brandsList = $this->bhuaProdcutService->getAllBrands($requestParams);
if($brandsList){
$brandsList = $this->formatKeysfromArray($brandsList,'toCamelCase');
......
......@@ -33,6 +33,7 @@ class OrdersController extends Controller
public function __construct(RhawnOrdersService $rhawnOrdersService)
{
$this->rhawnOrdersService= $rhawnOrdersService;
$this->controllerType = 'rhawn';
}
/**
......@@ -89,6 +90,7 @@ class OrdersController extends Controller
if(!$customerCode){
return Response::ok('客户编号不存在!');
}
$this->checkCustomerType($customerCode,$this->controllerType);
$requestParams = $this->formatKeysfromArray($request->all(),'toUnderScore');
$requestParams = array_merge($requestParams,['customer_code' => $customerCode]);
......@@ -155,6 +157,7 @@ class OrdersController extends Controller
if(!$customerCode){
return Response::ok('客户编号不存在!');
}
$this->checkCustomerType($customerCode,$this->controllerType);
$requestParams = $this->formatKeysfromArray($request->all(),'toUnderScore');
$requestParams = array_merge($requestParams,['customer_code' => $customerCode]);
......@@ -246,6 +249,7 @@ class OrdersController extends Controller
if(!$customerCode){
return Response::ok('客户编号不存在!');
}
$this->checkCustomerType($customerCode,$this->controllerType);
$message = [
'soCusPo.required' => "客户订单号必传",
......@@ -279,6 +283,7 @@ class OrdersController extends Controller
if(!$customerCode){
return Response::ok('客户编号不存在!');
}
$this->checkCustomerType($customerCode,$this->controllerType);
$requestParams = $this->formatKeysfromArray($request->all(),'toUnderScore');
$requestParams = array_merge($requestParams,['customer_code' => $customerCode]);
......@@ -345,6 +350,7 @@ class OrdersController extends Controller
if(!$customerCode){
return Response::ok('客户编号不存在!');
}
$this->checkCustomerType($customerCode,$this->controllerType);
$requestParams = $this->formatKeysfromArray($request->all(),'toUnderScore');
$requestParams = array_merge($requestParams,['customer_code' => $customerCode]);
......
......@@ -24,6 +24,7 @@ class ProductsController extends Controller
public function __construct(RhawnProductsService $rhawnProductsService)
{
$this->rhawnProductsService = $rhawnProductsService;
$this->controllerType = 'rhawn';
}
/**
......@@ -78,6 +79,7 @@ class ProductsController extends Controller
if(!$customerCode){
return Response::ok('客户编号不存在!');
}
$this->checkCustomerType($customerCode,$this->controllerType);
$requestParams = $this->formatKeysfromArray($request->all(),'toUnderScore');
$requestParams = array_merge($requestParams,['customer_code' => $customerCode]);
......@@ -144,6 +146,7 @@ class ProductsController extends Controller
if(!$customerCode){
return Response::ok('客户编号不存在!');
}
$this->checkCustomerType($customerCode,$this->controllerType);
$requestParams = $this->formatKeysfromArray($request->all(),'toUnderScore');
$requestParams = array_merge($requestParams,['customer_code' => $customerCode]);
......@@ -209,6 +212,7 @@ class ProductsController extends Controller
if(!$customerCode){
return Response::ok('客户编号不存在!');
}
$this->checkCustomerType($customerCode,$this->controllerType);
$requestParams = $this->formatKeysfromArray($request->all(),'toUnderScore');
$requestParams = array_merge($requestParams,['customer_code' => $customerCode]);
......
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