public function passSummary() { $id = \LfRequest::inNum('id'); $salon = M('e_salon')->where('id=' . $id)->find(); if ($salon['summary'] == 0) { $this->error("未总结"); exit; } if ($salon['summary'] == 2) { $this->error("已经审核通过"); exit; } $res = M('e_salon')->where('id=' . $id)->save(['summary' => 2]); if ($res) { $particpates = M('e_participate')->where(array('e_id' => $id))->select(); foreach ($particpates as $s) { if ($s['user_id'] == $salon['publish_userid']) { $creditValue = 20; } else { $creditValue = 10; } $credit = new CreditModel(); $credit->updateCredit($s['user_id'], $creditValue); } $this->success("审核成功!"); } else { $this->error("审核失败,请重试"); } }