Commit 517fdd1c authored by jianghaiming's avatar jianghaiming

update:set

parent 89306b3c
......@@ -22,7 +22,7 @@ class GoodsAddValidate extends BaseValidate
'sub_shop_ids' => 'require',
'rule_refund' => 'require',
'introduce' => 'length:0,200',
'inventory_add' => 'require',
'inventory' => 'require',
];
protected $message = [
......@@ -36,6 +36,6 @@ class GoodsAddValidate extends BaseValidate
'sub_shop_ids' => '门店id不能为空',
'rule_refund' => '请选择退款规则',
'introduce' => '商品介绍内容不能过长',
'inventory_add' => '请填写库存',
'inventory' => '请填写库存',
];
}
\ No newline at end of file
......@@ -9,6 +9,14 @@ use \Validate\CheckIsDistributorValidate;
class DistributorController extends Base
{
public function get_distributorAction()
{
$params = $this->params;
$distributionList = DistributorService::getDistributorList($params);
$this->success(['result' => $distributionList]);
}
public function importAction()
{
$distributionList = DistributorService::import();
......
......@@ -9,6 +9,13 @@ use \Validate\MarketingGoodsRateValidate;
class MarketingController extends Base
{
public function get_marketing_listAction()
{
$params = $this->params;
$list = MarketingService::getMarketingList($params);
$distributionList['result'] = $list;
$this->success($distributionList);
}
/**
* 营销列表
* 后台管理
......
......@@ -428,6 +428,17 @@ class DistributorService
return $info;
}
public static function getDistributorList($params)
{
$where['user_id'] = !empty($params['user_id']) ? $params['user_id'] : '';
$info = Distributor::getRecords($where);
return $info;
}
/**
* 更新数据
*
......
......@@ -379,6 +379,14 @@ class MarketingService
}
public static function getMarketingList($params)
{
$where['marketing_id'] = !empty($params['marketing_id']) ? $params['marketing_id'] : '';
$marketing_list = Marketing::getMarketingList($where);
return $marketing_list;
}
/**
......
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