|
@@ -74,7 +74,7 @@ class IndexController extends Controller
|
|
|
}
|
|
|
public function addSource($data,$store){
|
|
|
$i=1;
|
|
|
- $limit=1000;
|
|
|
+ $limit=200;
|
|
|
$modelKey=[
|
|
|
'date',
|
|
|
'store',
|
|
@@ -118,8 +118,6 @@ class IndexController extends Controller
|
|
|
];
|
|
|
$list[]=$item;
|
|
|
if($i%$limit==0||$i==count($data)){
|
|
|
- echo "<pre>";
|
|
|
- print_r($list);exit;
|
|
|
\Yii::$app->db->createCommand()->batchInsert(Trafficsource::tableName(), $modelKey, $list)->execute();
|
|
|
$list=[];
|
|
|
}
|