Commit 5c0362e1 authored by luhongguang's avatar luhongguang

update:详情增加参数验证

parent abbccd6d
<?php
namespace Validate;
/**
* Class MarketingInfoValidate
*
* @package Validate
*/
class MarketingInfoValidate extends BaseValidate
{
protected $rule = [
'marketing_id' => 'require',
];
protected $message = [
"marketing_id" => "marketing_id 不能为空",
];
}
\ No newline at end of file
...@@ -6,6 +6,7 @@ use App\Exception\custom\MarketingException; ...@@ -6,6 +6,7 @@ use App\Exception\custom\MarketingException;
use App\Services\marketing\MarketingGoodsService; use App\Services\marketing\MarketingGoodsService;
use \Validate\MarketingGoodsRateValidate; use \Validate\MarketingGoodsRateValidate;
use \Validate\MarketingOnlineStatusValidate; use \Validate\MarketingOnlineStatusValidate;
use \Validate\MarketingInfoValidate;
class MarketingController extends Base class MarketingController extends Base
{ {
...@@ -121,6 +122,8 @@ class MarketingController extends Base ...@@ -121,6 +122,8 @@ class MarketingController extends Base
*/ */
public function marketing_infoAction() public function marketing_infoAction()
{ {
(new MarketingInfoValidate())->validate();
$params = $this->params; $params = $this->params;
$marketingInfo = MarketingService::marketingInfo($params); $marketingInfo = MarketingService::marketingInfo($params);
$this->success(['result' => $marketingInfo]); $this->success(['result' => $marketingInfo]);
......
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