Commit 5afba1ab authored by hujun's avatar hujun

修改

parent 122b3c1c
...@@ -43,20 +43,17 @@ class Coupon extends Basic{ ...@@ -43,20 +43,17 @@ class Coupon extends Basic{
$activity_id = array_unique(array_values($coupon_data)); $activity_id = array_unique(array_values($coupon_data));
$coupon_id = array_keys($coupon_data); $coupon_id = array_keys($coupon_data);
$activity_where['id'] = ['in', $activity_id]; $activity_where['id'] = ['in', $activity_id];
$data = $this->m_activity->getActivity('money,return_type,return_action', $activity_where); $data = $this->m_activity->getActivity('title,money,return_type,return_action', $activity_where);
foreach ($data as $k=>$v) { foreach ($data as $k=>$v) {
switch ($v['return_action']) { switch ($v['return_action']) {
case 1: case 1:
$title = '邀请用户';
$subheading = '成功注册并登陆的奖励'; $subheading = '成功注册并登陆的奖励';
break; break;
case 2: case 2:
$title = '邀请用户成交';
$subheading = '在同联商业成交的奖励'; $subheading = '在同联商业成交的奖励';
break; break;
default : default :
$subheading = 'APP - 我的现金红包中查看'; $subheading = 'APP - 我的现金红包中查看';
$title = '新用户专享';
} }
if ($v['return_type'] == 0) { if ($v['return_type'] == 0) {
$content = '现金(可提现)'; $content = '现金(可提现)';
...@@ -64,7 +61,7 @@ class Coupon extends Basic{ ...@@ -64,7 +61,7 @@ class Coupon extends Basic{
$content = '返现红包'; $content = '返现红包';
} }
$data[$k]['title'] = $title; $data[$k]['title'] = $v['title'];
$data[$k]['subheading'] = $subheading; $data[$k]['subheading'] = $subheading;
$data[$k]['content'] = $content; $data[$k]['content'] = $content;
} }
......
...@@ -121,7 +121,6 @@ class CouponService{ ...@@ -121,7 +121,6 @@ class CouponService{
default : default :
$return_action = 0; $return_action = 0;
} }
$where['available'] = ['>', 0];
$where['total'] = ['>', 0]; $where['total'] = ['>', 0];
$where['return_action'] = $return_action; $where['return_action'] = $return_action;
$where['status'] = 0; //0正常 1手动停止 2数量为空 3时间过期 4删除 5未开始 $where['status'] = 0; //0正常 1手动停止 2数量为空 3时间过期 4删除 5未开始
...@@ -153,11 +152,7 @@ class CouponService{ ...@@ -153,11 +152,7 @@ class CouponService{
} }
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) {
$count_where['activity_id'] = $v['id']; $return_activity[] = $v;
$num = $this->m_coupon->getCount($count_where);
if ($num < $v['available']) {
$return_activity[] = $v;
}
} }
} }
return $return_activity; return $return_activity;
......
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