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
bfd6511e
Commit
bfd6511e
authored
Sep 03, 2021
by
pengfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 团长分销-增加获取活动时间范围方法
parent
35ac8468
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
PindanActivityColonelConfigService.php
...services/marketing/PindanActivityColonelConfigService.php
+25
-0
No files found.
application/services/marketing/PindanActivityColonelConfigService.php
View file @
bfd6511e
...
...
@@ -10,6 +10,9 @@ use App\Models\marketing\mysql\ColonelDistributorConfig;
class
PindanActivityColonelConfigService
{
// 活动默认时间范围点
const
ACTIVITY_DEFAULT_HOUR
=
12
;
/**
* 编辑团长分销活动配置
* @param array $params
...
...
@@ -127,4 +130,26 @@ class PindanActivityColonelConfigService
}
return
[
"number"
=>
$num
,
'list'
=>
$configList
];
}
/**
* Notes: 获取活动时间范围
* User: pengfei@yidian-inc.com
* Date: 2021/9/3 2:50 下午
* @return string[]
*/
public
static
function
getActivityTimeRange
()
:
array
{
// 获取活动时间范围 例如活动时间(2021-09-03) --- 2021-09-03:12:00:00 - 2021-09-04:12:00:00
$hour
=
' '
.
self
::
ACTIVITY_DEFAULT_HOUR
.
":00:00"
;
if
(
date
(
"H"
)
>=
12
)
{
$startTime
=
date
(
"Y-m-d"
)
.
$hour
;
$endTime
=
date
(
"Y-m-d"
,
strtotime
(
"+1 day"
))
.
$hour
;
}
else
{
$startTime
=
date
(
"Y-m-d"
,
strtotime
(
"-1 day"
))
.
$hour
;
$endTime
=
date
(
"Y-m-d"
)
.
$hour
;
}
return
[
'start_time'
=>
$startTime
,
'end_time'
=>
$endTime
];
}
}
\ No newline at end of file
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