Example #1
0
 public function create($record)
 {
     $rec = $this->table('__BR_BRIDGES__')->data($record)->add();
     if (!empty($rec)) {
         $id = $this->getLastInsID();
         $pid = $this->addon->registerTakeOver(0, $id, 0, '对接' . $record['title']);
         if (!is_error($pid)) {
             $rec = array();
             $rec['processor'] = $pid;
             $this->table('__BR_BRIDGES__')->data($rec)->where("`id`='{$id}'")->save();
         }
     } else {
         $id = 0;
     }
     return $id;
 }