|
...
|
...
|
@@ -14,6 +14,8 @@ use App\Models\Com\UpdateOldInfo; |
|
|
|
use App\Models\Domain\DomainInfo;
|
|
|
|
use App\Models\Inquiry\InquiryFormData;
|
|
|
|
use App\Models\Project\Project;
|
|
|
|
use App\Models\Visit\Visit;
|
|
|
|
use App\Models\Visit\VisitItem;
|
|
|
|
use App\Services\ProjectServer;
|
|
|
|
use Illuminate\Console\Command;
|
|
|
|
use Illuminate\Support\Facades\DB;
|
|
...
|
...
|
@@ -160,14 +162,12 @@ class MonthCountDate extends Command |
|
|
|
* @time :2024/1/8 11:02
|
|
|
|
*/
|
|
|
|
public function pv_ip(&$arr,$start,$end,$project_id){
|
|
|
|
$pv_ip = DB::table('gl_count')
|
|
|
|
->where(['project_id'=>$project_id])
|
|
|
|
->where('date','>=',$start.' 00:00:00')
|
|
|
|
->where('date','<=',$end.' 23:59:59')
|
|
|
|
->select(DB::raw('SUM(pv_num) as pv_num'), DB::raw('SUM(ip_num) as ip_num'),DB::raw('SUM(inquiry_num) as inquiry_num'))
|
|
|
|
->first();
|
|
|
|
$arr['pv'] = $pv_ip->pv_num;
|
|
|
|
$arr['ip'] = $pv_ip->ip_num;
|
|
|
|
$arr['pv'] = (new VisitItem())
|
|
|
|
->where('updated_date','>=',$start.' 00:00:00')
|
|
|
|
->where('updated_date','<=',$end.' 23:59:59')->count();
|
|
|
|
$arr['ip'] = (new Visit())
|
|
|
|
->where('updated_date','>=',$start.' 00:00:00')
|
|
|
|
->where('updated_date','<=',$end.' 23:59:59')->count();
|
|
|
|
if($arr['ip'] != 0){
|
|
|
|
$arr['rate'] = round((($arr['month_total'] ?? 0) / $arr['ip']) * 10,2);
|
|
|
|
}
|
...
|
...
|
|