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
75674c8f
Commit
75674c8f
authored
Aug 11, 2021
by
luhongguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:营销活动状态
parent
3831d2f5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
1 deletion
+35
-1
MarketingException.php
application/exception/custom/MarketingException.php
+1
-1
Marketing.php
application/modules/Marketing/controllers/Marketing.php
+10
-0
MarketingService.php
application/services/marketing/MarketingService.php
+24
-0
No files found.
application/exception/custom/MarketingException.php
View file @
75674c8f
...
@@ -36,7 +36,7 @@ class MarketingException extends BaseException
...
@@ -36,7 +36,7 @@ class MarketingException extends BaseException
18
=>
'当前填写的拼单活动名称已经存在'
,
18
=>
'当前填写的拼单活动名称已经存在'
,
19
=>
'当前活动不存在'
,
19
=>
'当前活动不存在'
,
self
::
TAKE_PLACE_NOT_EXIST
=>
'自提点不存在'
,
self
::
TAKE_PLACE_NOT_EXIST
=>
'自提点不存在'
,
21
=>
"活动开始时间不能大于或者等
雨
结束时间"
,
21
=>
"活动开始时间不能大于或者等
于
结束时间"
,
22
=>
"自提点不能为空"
,
22
=>
"自提点不能为空"
,
];
];
}
}
\ No newline at end of file
application/modules/Marketing/controllers/Marketing.php
View file @
75674c8f
...
@@ -139,4 +139,14 @@ class MarketingController extends Base
...
@@ -139,4 +139,14 @@ class MarketingController extends Base
$this
->
success
([
'result'
=>
$marketingInfo
]);
$this
->
success
([
'result'
=>
$marketingInfo
]);
}
}
/**
* 拼单活动修改活动状态
* @throws Exception
*/
public
function
update_marketing_online_statusAction
()
{
MarketingService
::
updateMarketingOnlineStatus
(
$this
->
params
);
$this
->
success
();
}
}
}
\ No newline at end of file
application/services/marketing/MarketingService.php
View file @
75674c8f
...
@@ -761,6 +761,30 @@ class MarketingService
...
@@ -761,6 +761,30 @@ class MarketingService
return
true
;
return
true
;
}
}
/**
* 修改活动的状态
* @param $params
* @return \Api\PhpUtils\Mysql\MysqlBase
*/
public
static
function
updateMarketingOnlineStatus
(
$params
)
{
$marketingId
=
$params
[
"marketing_id"
];
$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
=
[
'online_status'
=>
$onlineStatus
,
'end_time'
=>
$endTime
,
];
Marketing
::
updateRecord
(
$marketingParams
,
[
"marketing_id"
=>
$marketingId
]);
}
/**
/**
* 分销活动详情
* 分销活动详情
* @param $params
* @param $params
...
...
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