Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
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
hujun
tl_estate
Commits
fe94bf41
Commit
fe94bf41
authored
Mar 16, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-1
parent
4cbd99e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
CouponService.php
application/api/service/CouponService.php
+13
-8
No files found.
application/api/service/CouponService.php
View file @
fe94bf41
...
@@ -141,8 +141,10 @@ class CouponService{
...
@@ -141,8 +141,10 @@ class CouponService{
$count_where
[
'user_id'
]
=
$user_id
;
$count_where
[
'user_id'
]
=
$user_id
;
foreach
(
$activity_data
as
$k
=>
$v
)
{
foreach
(
$activity_data
as
$k
=>
$v
)
{
if
(
$v
[
'total'
]
-
$v
[
'get_number'
]
<=
0
)
{
if
(
$v
[
'total'
]
!=
-
1
)
{
continue
;
if
(
$v
[
'total'
]
-
$v
[
'get_number'
]
<=
0
)
{
continue
;
}
}
}
if
(
$type
==
0
)
{
if
(
$type
==
0
)
{
...
@@ -153,14 +155,17 @@ class CouponService{
...
@@ -153,14 +155,17 @@ class CouponService{
}
}
}
}
$where
[
'user_id'
]
=
$user_id
;
if
(
$v
[
'available'
]
!=
-
1
)
{
$where
[
'activity_id'
]
=
$v
[
'id'
];
$where
[
'user_id'
]
=
$user_id
;
$where
[
'status'
]
=
[
'<>'
,
2
];
$where
[
'activity_id'
]
=
$v
[
'id'
];
$num
=
$this
->
m_coupon
->
getCount
(
$where
);
$where
[
'status'
]
=
[
'<>'
,
2
];
if
(
$num
>
$v
[
'available'
])
{
$num
=
$this
->
m_coupon
->
getCount
(
$where
);
continue
;
if
(
$num
>
$v
[
'available'
])
{
continue
;
}
}
}
if
(
strtotime
(
$v
[
'activity_start_time'
])
<
$time
&&
strtotime
(
$v
[
'activity_end_time'
])
>
$time
)
{
if
(
strtotime
(
$v
[
'activity_start_time'
])
<
$time
&&
strtotime
(
$v
[
'activity_end_time'
])
>
$time
)
{
$return_activity
[]
=
$v
;
$return_activity
[]
=
$v
;
}
}
...
...
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