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
4bdef15d
Commit
4bdef15d
authored
Aug 03, 2021
by
luhongguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:拼单活动活动状态
parent
d4930521
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
MarketingPindan.php
application/models/marketing/mysql/MarketingPindan.php
+4
-0
MarketingService.php
application/services/marketing/MarketingService.php
+11
-0
No files found.
application/models/marketing/mysql/MarketingPindan.php
View file @
4bdef15d
...
@@ -10,6 +10,10 @@ class MarketingPindan extends MysqlBase
...
@@ -10,6 +10,10 @@ class MarketingPindan extends MysqlBase
const
CONFIG_INDEX
=
'marketing'
;
const
CONFIG_INDEX
=
'marketing'
;
const
PRIMARY_KEY
=
'marketing_pindan_id'
;
const
PRIMARY_KEY
=
'marketing_pindan_id'
;
const
ACTIVITY_STATUS_NO_START
=
1
;
const
ACTIVITY_STATUS_IN_PROGRESS
=
2
;
const
ACTIVITY_STATUS_FINISHED
=
3
;
public
static
function
getRecord
(
$where
,
$colums
=
[])
public
static
function
getRecord
(
$where
,
$colums
=
[])
{
{
if
(
empty
(
$colums
))
{
if
(
empty
(
$colums
))
{
...
...
application/services/marketing/MarketingService.php
View file @
4bdef15d
...
@@ -205,6 +205,7 @@ class MarketingService
...
@@ -205,6 +205,7 @@ class MarketingService
*/
*/
private
static
function
pindanMarketingList
(
$params
)
private
static
function
pindanMarketingList
(
$params
)
{
{
$params
[
'activity_status'
]
=
!
empty
(
$params
[
'activity_status'
])
?
$params
[
'activity_status'
]
:
0
;
$params
[
'page'
]
=
!
empty
(
$params
[
'page'
])
?
$params
[
'page'
]
:
1
;
$params
[
'page'
]
=
!
empty
(
$params
[
'page'
])
?
$params
[
'page'
]
:
1
;
$limit
=
!
empty
(
$params
[
'page_size'
])
?
$params
[
'page_size'
]
:
20
;
$limit
=
!
empty
(
$params
[
'page_size'
])
?
$params
[
'page_size'
]
:
20
;
$page
=
(
$params
[
'page'
]
-
1
)
*
$limit
;
$page
=
(
$params
[
'page'
]
-
1
)
*
$limit
;
...
@@ -217,6 +218,16 @@ class MarketingService
...
@@ -217,6 +218,16 @@ class MarketingService
$where
[
'online_status'
]
=
$params
[
'online_status'
];
$where
[
'online_status'
]
=
$params
[
'online_status'
];
}
}
$now
=
date
(
"Y-m-d H:i:s"
);
if
(
$params
[
"activity_status"
]
==
MarketingPindan
::
ACTIVITY_STATUS_NO_START
)
{
$where
[
"start_time[>]"
]
=
$now
;
}
elseif
(
$params
[
"activity_status"
]
==
MarketingPindan
::
ACTIVITY_STATUS_IN_PROGRESS
)
{
$where
[
"start_time[<=]"
]
=
$now
;
$where
[
"end_time[>=]"
]
=
$now
;
}
elseif
(
$params
[
"activity_status"
]
==
MarketingPindan
::
ACTIVITY_STATUS_FINISHED
)
{
$where
[
"end_time[<]"
]
=
$now
;
}
$where
[
'ORDER'
]
=
[
"update_time"
=>
"DESC"
];
$where
[
'ORDER'
]
=
[
"update_time"
=>
"DESC"
];
$where
[
'LIMIT'
]
=
[
$page
,
$limit
];
$where
[
'LIMIT'
]
=
[
$page
,
$limit
];
$list
=
Marketing
::
select
([
"marketing_id"
,
"marketing_name"
,
"start_time"
,
"end_time"
,
$list
=
Marketing
::
select
([
"marketing_id"
,
"marketing_name"
,
"start_time"
,
"end_time"
,
...
...
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