Skip to content

Commit

Permalink
去掉mongodb的bug处理
Browse files Browse the repository at this point in the history
  • Loading branch information
fancyecommerce committed Aug 13, 2019
1 parent 4d6c1db commit 20439bb
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions components/ServiceLog.php
Expand Up @@ -29,10 +29,10 @@ class ServiceLog extends Component
protected $_logModelName = '\fecshop\models\mongodb\FecshopServiceLog';
protected $_logModel;

public function init(){
parent::init();
list($this->_logModelName,$this->_logModel) = Yii::mapGet($this->_logModelName);
}
//public function init(){
// parent::init();
//
//}
/**
* Log:get log uuid .
*/
Expand Down Expand Up @@ -65,12 +65,21 @@ public function isServiceLogEnable()
}

public $serviceLogHtmlPrintStr;


public function initServiceLogDbPrint()
{
if (!$this->_logModel) {
list($this->_logModelName,$this->_logModel) = Yii::mapGet($this->_logModelName);
}
}
/**
* ServiceLog:保存serviceLog.
*/
public function printServiceLog($log_info)
{
if ($this->isServiceLogDbPrint()) {
$this->initServiceLogDbPrint();
$this->_logModel->getCollection()->save($log_info);
}
if ($this->isServiceLogHtmlPrint() || $this->isServiceLogDbPrintByParam()) {
Expand Down

0 comments on commit 20439bb

Please sign in to comment.