Commit 1dddd8f0 authored by hujun's avatar hujun

//

..
parent fd00fe14
...@@ -32,11 +32,11 @@ class Coupon extends Basic{ ...@@ -32,11 +32,11 @@ class Coupon extends Basic{
public function getHomeCoupon() public function getHomeCoupon()
{ {
if (empty($this->userId)) { if (empty($this->userId)) {
// return $this->response(101, '请登录'); return $this->response(101, '请登录');
} }
$data = []; $data = [];
$where['user_id'] = $this->userId; $where['user_id'] = $this->userId;
$where['user_id'] = 1; // $where['user_id'] = 1;
$where['first_show'] = 0; $where['first_show'] = 0;
$coupon_data = $this->m_coupon->getCouponColumn('id,activity_id', $where); $coupon_data = $this->m_coupon->getCouponColumn('id,activity_id', $where);
if (!empty($coupon_data)) { if (!empty($coupon_data)) {
...@@ -61,7 +61,7 @@ class Coupon extends Basic{ ...@@ -61,7 +61,7 @@ class Coupon extends Basic{
$data[$k]['content'] = '返现红包'; $data[$k]['content'] = '返现红包';
$data[$k]['money'] = (int)$v['money'] . ''; $data[$k]['money'] = (int)$v['money'] . '';
} }
// $this->m_coupon->updateData(['first_show'=>1], ['id'=>['in',$coupon_id]]); $this->m_coupon->updateData(['first_show'=>1], ['id'=>['in',$coupon_id]]);
} }
return $this->response(200, '', $data); return $this->response(200, '', $data);
} }
......
...@@ -126,7 +126,7 @@ class RegisterService ...@@ -126,7 +126,7 @@ class RegisterService
$coupon_service = new CouponService(); $coupon_service = new CouponService();
$service = new PushClientService(); $service = new PushClientService();
if (!empty($first_login_time)) { if (!empty($first_login_time)) {
$coupon_service->sendCoupon((int)$id, 0, 0, 1); $coupon_service->sendCoupon((int)$id, 0, 0);
$content = '恭喜您您获得500元的新人专享返现红包,成交后可兑现'; $content = '恭喜您您获得500元的新人专享返现红包,成交后可兑现';
$service->record(0,0,1, $content, 0, $id); $service->record(0,0,1, $content, 0, $id);
} }
......
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