本文整理匯總了PHP中D::querypvdetailog方法的典型用法代碼示例。如果您正苦於以下問題:PHP D::querypvdetailog方法的具體用法?PHP D::querypvdetailog怎麽用?PHP D::querypvdetailog使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類D
的用法示例。
在下文中一共展示了D::querypvdetailog方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: actionPartInfo
/**
* 配件詳細信息
*
*/
public function actionPartInfo()
{
if (!isset($_POST['modelId']) || empty($_POST['modelId'])) {
Yii::app()->end();
}
if (!isset($_POST['partId']) || empty($_POST['partId'])) {
Yii::app()->end();
}
$userId = Yii::app()->user->id;
$modelId = $_POST['modelId'];
$partId = $_POST['partId'];
//用戶車型權限檢查,如果沒有權限則不返回相應的信息
//$hasPerm = Yii::app()->user->checkPermission(array('vehicleEpcID'=>$vehicleEpcID));
$hasPerm = true;
if (!$hasPerm) {
$this->renderPartial('partsdetail', array('hasPerm' => false));
Yii::app()->end();
}
//查詢配件詳情
$partInfo = RPCClient::call('PartsService_queryPartInfo', array('partId' => $partId));
//圖片URL加密
if ($partInfo) {
$picture = trim($partInfo['picture'], '/');
$imgserver = Yii::app()->params['imgserver'];
$imageencode = Yii::app()->params['imgencode'];
$originpic = CommonUtil::generateImgUrl($picture, $imgserver, 'parts');
$signurl = CommonUtil::encodeImgUrl($originpic, $imageencode);
$partInfo['picture'] = $signurl;
}
try {
$url = Yii::app()->controller->getRoute();
//把ID轉換成對應的車型主組,子組
$params['partsdetail'] = D::querypvdetailog($modelId, $partId);
//插入mongo日誌
$oper = F::getoperation($url, $info == null, $params);
//epc查詢日誌
$loginfoArr = array('userId' => $userId, 'querytype' => 1, 'modelId' => $modelId, 'partId' => $partId);
RPCClient::call('LogService_logQueryEpc', $loginfoArr);
} catch (Exception $e) {
}
$this->renderPartial('partsdetail', array('part' => $partInfo, 'hasPerm' => true));
}