Example #1
0
 public function addtag($login_account, $tag_name, $tag_desc)
 {
     try {
         $tag_id = SysSeq::GetSeqNextValue($this->da, "we_tag", "tag_id");
         $sql = "insert into we_tag (tag_id,tag_name,owner_id,owner_type,tag_desc,create_date) values(?,?,?,?,?,now())";
         $params = array($tag_id, $tag_name, $login_account, '01', $tag_desc);
         if (!$this->da->ExecSQL($sql, $params)) {
             return null;
         } else {
             $friendevent = new \Justsy\BaseBundle\Management\FriendEvent($this->da, $this->logger, $this->container);
             $friendevent->addtag($login_account, $tag_id, $tag_name, $tag_desc);
             return $tag_id;
         }
     } catch (\Exception $e) {
         //var_dump($e->getMessage());
         $this->writelog($e);
         return null;
     }
 }