/** * 配達者or依頼者を評価する * @param $customerID * @param $params * @throws Exception */ public function evaluatePerson($customerID, $params) { $this->_log->debug(__CLASS__ . ":" . __FUNCTION__ . " called:(" . __LINE__ . ")"); $db = Common::getMaster(); $this->_begin($db); try { $mRequest = new TRequest($db); $requestInfo = $mRequest->findRecord($params['requestID']); $mCustomer = new TCustomer($db); if ($customerID == $requestInfo['recipientID']) { // 配達者を評価 $this->_log->debug("配達者を評価"); $mCustomer->updateRecord($requestInfo['deliverymanID'], $params); } elseif ($customerID == $requestInfo['deliverymanID']) { // 依頼者を評価 $this->_log->debug("配達者を評価"); $mCustomer->updateRecord($requestInfo['recipientID'], $params); } $this->_commit(); } catch (Exception $e) { $this->_rollBack(); throw $e; } return; }