/** * * 给动态的at列表发送短信推送 */ public function at_sms() { $post = $this->get_data(); $statuses_id = $post['statuses_id']; $at2mo = array(); if (empty($statuses_id)) { $this->send_response(400, NULL, '402001:动态不存在'); } $feed = $this->feedModel->findMoFeed($statuses_id); if (empty($feed)) { $this->send_response(400, NULL, '402002:动态不存在'); } //if ((int)$feed['owner_uid'] != (int)$this->uid) { // $this->send_response ( 400, NULL, '402004:不能给非自己的动态推MO短信' ); //} if ($feed['kind'] == 1) { $at2mo = array(0 => array('id' => $feed['feed_uid'], 'name' => $feed['feed_name'])); } else { if (empty($feed['comment_at'])) { $this->send_response(400, NULL, '402005:动态无可推送的好友'); } $at2mo = $feed['comment_at']; } if ($feed['kind'] == 3 || $feed['kind'] == 6) { $type = 'comment'; } else { $type = 'feed'; } if ($this->feedModel->mo_sms($type, $feed['feed_id'], $feed['comment_id'], $at2mo, $feed['_id'], $feed['uid'])) { $this->send_response(200); } $this->send_response(400, NULL, '402006:短信发送失败'); }