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
b9844c31
Commit
b9844c31
authored
Aug 11, 2021
by
luhongguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:营销活动状态
parent
75674c8f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
10 deletions
+29
-10
MarketingOnlineStatusValidate.php
...cation/library/Validate/MarketingOnlineStatusValidate.php
+25
-0
Marketing.php
application/modules/Marketing/controllers/Marketing.php
+3
-0
MarketingService.php
application/services/marketing/MarketingService.php
+1
-10
No files found.
application/library/Validate/MarketingOnlineStatusValidate.php
0 → 100644
View file @
b9844c31
<?php
namespace
Validate
;
/**
* Class MarketingOnlineStatusValidate
*
* @package Validate
*/
class
MarketingOnlineStatusValidate
extends
BaseValidate
{
protected
$rule
=
[
'marketing_id'
=>
'require'
,
'marketing_type'
=>
'require'
,
'online_status'
=>
'require'
,
];
protected
$message
=
[
"marketing_id"
=>
"marketing_id 不能为空"
,
"marketing_type"
=>
"marketing_type 不能为空"
,
"online_status"
=>
"online_status 不能为空"
,
];
}
\ No newline at end of file
application/modules/Marketing/controllers/Marketing.php
View file @
b9844c31
...
@@ -5,6 +5,7 @@ use App\Services\marketing\MarketingService;
...
@@ -5,6 +5,7 @@ use App\Services\marketing\MarketingService;
use
App\Exception\custom\MarketingException
;
use
App\Exception\custom\MarketingException
;
use
App\Services\marketing\MarketingGoodsService
;
use
App\Services\marketing\MarketingGoodsService
;
use
\Validate\MarketingGoodsRateValidate
;
use
\Validate\MarketingGoodsRateValidate
;
use
\Validate\MarketingOnlineStatusValidate
;
class
MarketingController
extends
Base
class
MarketingController
extends
Base
{
{
...
@@ -145,6 +146,8 @@ class MarketingController extends Base
...
@@ -145,6 +146,8 @@ class MarketingController extends Base
*/
*/
public
function
update_marketing_online_statusAction
()
public
function
update_marketing_online_statusAction
()
{
{
(
new
MarketingOnlineStatusValidate
())
->
validate
();
MarketingService
::
updateMarketingOnlineStatus
(
$this
->
params
);
MarketingService
::
updateMarketingOnlineStatus
(
$this
->
params
);
$this
->
success
();
$this
->
success
();
}
}
...
...
application/services/marketing/MarketingService.php
View file @
b9844c31
...
@@ -681,20 +681,11 @@ class MarketingService
...
@@ -681,20 +681,11 @@ class MarketingService
$maxPrice
=
end
(
$uniquePriceList
);
$maxPrice
=
end
(
$uniquePriceList
);
Marketing
::
beginTransaction
();
Marketing
::
beginTransaction
();
$onlineStatus
=
Marketing
::
ONLINE_STATUS_DAOQI
;
if
(
$params
[
"online_status"
]
==
Marketing
::
ONLINE_STATUS_QIDONG
)
{
$onlineStatus
=
Marketing
::
ONLINE_STATUS_QIDONG
;
$endTime
=
date
(
"Y-m-d H:i:s"
,
strtotime
(
"+7 day"
));
}
if
(
$params
[
"online_status"
]
==
Marketing
::
ONLINE_STATUS_GUANBI
)
{
$onlineStatus
=
Marketing
::
ONLINE_STATUS_GUANBI
;
$endTime
=
date
(
"Y-m-d H:i:s"
);
}
$marketingParams
=
[
$marketingParams
=
[
'marketing_name'
=>
$marketingName
,
'marketing_name'
=>
$marketingName
,
'start_time'
=>
$startTime
,
'start_time'
=>
$startTime
,
'end_time'
=>
$endTime
,
'end_time'
=>
$endTime
,
'online_status'
=>
$onlineStatus
,
'online_status'
=>
Marketing
::
ONLINE_STATUS_QIDONG
,
'marketing_type'
=>
$type
,
'marketing_type'
=>
$type
,
'good_count'
=>
count
(
$goodsSkuId
),
'good_count'
=>
count
(
$goodsSkuId
),
'update_user_email'
=>
$createUserEmail
,
'update_user_email'
=>
$createUserEmail
,
...
...
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