Beispiel #1
0
 public function run()
 {
     if (false == $this->verifyUserAuth()) {
         return false;
     }
     //$UserId = $this->getDataItem('user_id');
     $userId = $this->getUserAuth()->userId;
     $status = UserMessage::find("user_id = {$userId}")->delete();
     if ($status) {
         $this->setResult(['success' => 1, 'message' => '清空成功!']);
     } else {
         return $this->errorLog(ResultStatus::DATABASE_ERROR, '数据库异常');
     }
 }