public function update(App_Account_InfoDm $dm) { if (true !== ($r = $dm->beforeUpdate())) { return $r; } return $this->_loadDao()->update($dm->getType(), $dm->getData()); }
/** * 后台设置 */ public function adminSet($param) { if ($this->type) { $dm = new App_Account_InfoDm($param['type']); $dm->setAppKey($param['appKey'])->setAppSecret($param['appSecret'])->setDisplayOrder($param['displayOrder'])->setStatus($param['status']); $this->_getAccountInfoDs()->update($dm); } else { $dm = new App_Account_InfoDm(); $dm->setType($param['type'])->setAppKey($param['appKey'])->setAppSecret($param['appSecret'])->setDisplayOrder($param['displayOrder'])->setStatus($param['status']); $this->_getAccountInfoDs()->add($dm); } }