public function addAction()
 {
     list($userId, $baiduUserId, $baiduChannelId, $tagId, $schoolId) = $this->getInput(array('userid', 'baiduuserid', 'baiduchannelid', 'tagid', 'schoolid'), 'get');
     $dm = new App_Baidupush_Dm();
     $dm->setUserId($userId)->setBaiduUserId($baiduUserId)->setBaiduChannelId($baiduChannelId)->setTagId($tagId)->setSchoolId($schoolId);
     $result = $this->_getBaidupushDs()->add($dm);
     if ($result > 0) {
         $this->output(1);
     } else {
         $this->output(0);
     }
 }
示例#2
0
 public function add(App_Baidupush_Dm $dm)
 {
     if (true !== ($r = $dm->beforeAdd())) {
         return $r;
     }
     return $this->loadDao()->add($dm->getData());
 }