Commit fe94bf41 authored by hujun's avatar hujun

-1

parent 4cbd99e2
......@@ -141,9 +141,11 @@ class CouponService{
$count_where['user_id'] = $user_id;
foreach ($activity_data as $k=>$v) {
if ($v['total'] != -1) {
if ($v['total'] - $v['get_number'] <= 0 ) {
continue;
}
}
if ($type == 0) {
$count_where['invitee_id'] = $invitee_id;
......@@ -153,6 +155,7 @@ class CouponService{
}
}
if ($v['available'] != -1) {
$where['user_id'] = $user_id;
$where['activity_id'] = $v['id'];
$where['status'] = ['<>',2];
......@@ -160,6 +163,8 @@ class CouponService{
if ($num > $v['available']) {
continue;
}
}
if (strtotime($v['activity_start_time']) < $time && strtotime($v['activity_end_time']) > $time) {
$return_activity[] = $v;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment