DiverseYouthNightSchool/application/common/library/NightSchoolBigData.php

32 lines
643 B
PHP

<?php
namespace app\common\library;
use app\common\model\BaseModel;
use app\common\model\school\classes\ClassesLib;
/**
* 夜校大数据类
*/
class NightSchoolBigData extends BaseModel
{
public static function getAreaBaseData($province,$city,$district){
$where = function ($query)use($province,$city,$district){
if( $province)$query = $query->where('province',$province);
if( $city)$query = $query->where('city',$city);
if( $district)$query = $query->where('district',$district);
};
//统计当前课程总数
$count = ClassesLib::where($where)->sum("");
}
}