Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
goods
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
goods
Commits
38408be3
Commit
38408be3
authored
Jun 29, 2021
by
luhongguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:获取指定商品分销活动的分成比例
parent
36e6eda8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
MarketingGoodsRateValidate.php
application/library/Validate/MarketingGoodsRateValidate.php
+21
-0
Marketing.php
application/modules/Marketing/controllers/Marketing.php
+4
-1
No files found.
application/library/Validate/MarketingGoodsRateValidate.php
0 → 100644
View file @
38408be3
<?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
application/modules/Marketing/controllers/Marketing.php
View file @
38408be3
...
...
@@ -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_
info
Action
()
public
function
marketing_goods_
rate
Action
()
{
(
new
MarketingGoodsRateValidate
())
->
validate
();
$params
=
$this
->
params
;
$goodsSkuIds
=
explode
(
","
,
$params
[
"goods_sku_ids"
]);
$marketingInfo
=
MarketingGoodsService
::
getRunningMarketing
(
$goodsSkuIds
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment