统计
This commit is contained in:
@@ -365,7 +365,7 @@ class CustomerController extends BaseController
|
||||
$created_at = strtotime($created_at);
|
||||
$day = ceil((time() - $created_at + 1) / 60 / 60 / 24);
|
||||
$where[] = ['user_id', '=', $userId];
|
||||
$where[] = ['corp_abbr', '=', $request->basic_data['corp_abbr']];
|
||||
//$where[] = ['corp_abbr', '=', $request->basic_data['corp_abbr']];
|
||||
$start = strtotime($created . '-01');
|
||||
$year = date('Y', $start);
|
||||
$month = date('n', $start); //获取月份
|
||||
@@ -373,10 +373,7 @@ class CustomerController extends BaseController
|
||||
$where[] = ['created_at', '>=', $start];
|
||||
$where[] = ['created_at', '<', $end];
|
||||
$customer = Customer::where($where)->count();
|
||||
$builder = Customer::where($where)->count();
|
||||
$sql = str_replace(['?'], ['\'%s\''], $builder->toSql());
|
||||
$fullSql = vsprintf($sql, $builder->getBindings());
|
||||
var_dump($fullSql);
|
||||
|
||||
//初步接触
|
||||
$whereGrade = $where;
|
||||
$whereGrade[] = ['grade', '<=', 2];
|
||||
|
||||
Reference in New Issue
Block a user