|
|
@@ -3,7 +3,7 @@
|
|
|
namespace console\controllers;
|
|
|
|
|
|
use biz\goods\services\GoodsService;
|
|
|
-use biz\stat\services\VisitByDayService;
|
|
|
+use biz\stat\services\StatVisitService;
|
|
|
use biz\promote\services\GuaGuaService;
|
|
|
use Yii;
|
|
|
use yii\console\Controller;
|
|
|
@@ -17,9 +17,7 @@ use common\components\stringUtil;
|
|
|
*/
|
|
|
class ShellController extends Controller
|
|
|
{
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
//每天要跑的东西放这里 shish 2019.9.10
|
|
|
// 10 0 * * * /usr/local/nginx/html/huahuibao/yii shell/per-day
|
|
|
public function actionPerDay()
|
|
|
@@ -31,14 +29,13 @@ class ShellController extends Controller
|
|
|
$merchant = $merchant->toArray();
|
|
|
$merchantId = $merchant['id'];
|
|
|
$merchantName = $merchant['merchantName'];
|
|
|
- $visitData = VisitByDayService::saveYesterdayNum($merchantId);//访问量
|
|
|
+ $visitData = StatVisitService::saveYesterdayNum($merchantId);//访问量
|
|
|
if (!empty($visitData)) {
|
|
|
$log = "商家:{$merchantName}({$merchantId}):";
|
|
|
$time = date("Y-m-d", $visitData['time']);
|
|
|
$log .= "访问量:date:{$time} num:{$visitData['riseNum']}\r\n";
|
|
|
- stringUtil::log($log, '/opt/shell/log/merchant_visit_info_' . date("Ymd") . '.txt');
|
|
|
+ stringUtil::log($log, '/opt/shell/log/merchant_visit_log_' . date("Ymd") . '.txt');
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -102,20 +99,13 @@ class ShellController extends Controller
|
|
|
//guaguaka
|
|
|
$arr = ['guaguacard-visit-12358-1170'];
|
|
|
GuaGuaService::putGuaCacheToSave();
|
|
|
-
|
|
|
//choujiang
|
|
|
$arr = ['draw-visit-12358-1170'];
|
|
|
-
|
|
|
//goods
|
|
|
$arr = ['goods-visit-12358-5521'];
|
|
|
GoodsService::putGoodsCacheToSave();
|
|
|
-
|
|
|
-
|
|
|
//批发商层面
|
|
|
-
|
|
|
-
|
|
|
//平台层面
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|