Commit 38408be3 authored by luhongguang's avatar luhongguang

update:获取指定商品分销活动的分成比例

parent 36e6eda8
<?php
namespace Validate;
/**
* Class MarketingGoodsRateValidate
*
* @package Validate
*/
class MarketingGoodsRateValidate extends BaseValidate
{
protected $rule = [
'goods_sku_ids' => 'require',
];
protected $message = [
"goods_sku_ids" => "商品id不能为空",
];
}
\ No newline at end of file
......@@ -4,6 +4,7 @@ use App\Base\Base;
use App\Services\marketing\MarketingService;
use App\Exception\custom\MarketingException;
use App\Services\marketing\MarketingGoodsService;
use \Validate\MarketingGoodsRateValidate;
class MarketingController extends Base
{
......@@ -99,8 +100,10 @@ class MarketingController extends Base
* 获取指定商品分销活动的分成比例(第一分销人的分成比例)
* @throws Exception
*/
public function marketing_goods_infoAction()
public function marketing_goods_rateAction()
{
(new MarketingGoodsRateValidate())->validate();
$params = $this->params;
$goodsSkuIds = explode(",", $params["goods_sku_ids"]);
$marketingInfo = MarketingGoodsService::getRunningMarketing($goodsSkuIds);
......
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