Exemplo n.º 1
0
 public function test_send_notification($uid, $couponId)
 {
     $user = $this->user->get($uid);
     $completeTitle = $this->coupon->get_complete_title($couponId);
     //		var_dump($user);
     $mobile = $user['username'];
     $device = $user['device'];
     if ($device == 'iOS') {
         //			echo 'iOS';
         $sms = new Kqsms();
         $response = $sms->send_coupon_accepted_sms($mobile, $completeTitle);
         echo $response;
     } else {
         //			echo 'Android';
         $umengpush = new UmengPush();
         $title = '优惠券承兑完成';
         $text = "您的" . $completeTitle . "快券已使用,更多优惠在等着你哦!";
         $umengpush->send_customized_notification($uid, $title, $text);
     }
 }
Exemplo n.º 2
0
 public function sleep_dcoupon_get()
 {
     sleep(5);
     $this->coupon->dcount_increment(36);
     return $this->output_results('10s后的返回');
 }
Exemplo n.º 3
0
 function test_coupon()
 {
     $this->coupon->dcount_increment(38);
 }