Exemplo n.º 1
0
 public function handle_request_internal()
 {
     $now = $_SERVER['REQUEST_TIME'];
     $title = $this->_params['title'];
     $content = $this->_params['content'];
     $brokerId = $this->_params['brokerId'] ? $this->_params['brokerId'] : 0;
     $showType = $this->_params['show_type'] ? $this->_params['show_type'] : 0;
     //消息发布类型0-全部 1-公告 2-推送
     if (empty($title) || empty($content)) {
         return Util_MobileAPI::error(Const_APIStatus::E_PARAM_INVALID);
     }
     $arr = array($title, $content, $now, $now, $brokerId, 0, $showType, 0);
     $r = Dao_Msgpush_Announce::insert($arr);
     if ($r) {
         $ret = array('status' => 'ok', 'data' => 'success');
     } else {
         $ret = Util_MobileAPI::error(Const_APIStatus::E_PARAM_INVALID);
     }
     return $ret;
 }