public function run($ids) { if ($this->record) { foreach ($this->record as $key => $value) { $dm = new PwUserInfoDm($key); $dm->addPostnum(-$value); Wekit::load('user.PwUser')->editUser($dm, PwUser::FETCH_DATA); } PwCreditBo::getInstance()->execute(); } }
/** * update the user info about thread * * @param array $ids [description] * @return boid */ public function run($ids) { if ($this->recode) { foreach ($this->recode as $key => $value) { $dm = new PwUserInfoDm($key); $dm->addPostnum(-$value['postnum']); if ($value['digest']) { $dm->addDigest(-$value['digest']); } Wekit::load('user.PwUser')->editUser($dm, PwUser::FETCH_DATA); } if ($this->operatorCredit) { PwCreditBo::getInstance()->execute(); } } }