44 lines
987 B
PHP
44 lines
987 B
PHP
|
|
<?php
|
||
|
|
/*
|
||
|
|
* @Descripttion:
|
||
|
|
* @version:
|
||
|
|
* @Author: kangkang
|
||
|
|
* @Date: 2020-10-16 14:44:02
|
||
|
|
* @LastEditors: kangkang
|
||
|
|
* @LastEditTime: 2020-11-16 15:22:30
|
||
|
|
*/
|
||
|
|
|
||
|
|
namespace app\manager\model;
|
||
|
|
|
||
|
|
use fastphp\base\Model;
|
||
|
|
|
||
|
|
class User extends Model
|
||
|
|
{
|
||
|
|
protected $table = 'user';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @description: 获取所有客户经理客户数量
|
||
|
|
* @param {*}
|
||
|
|
* @return {*}
|
||
|
|
*/
|
||
|
|
public function getAllManagerUserCount()
|
||
|
|
{
|
||
|
|
return $this->field('ManagerId,ManagerName,count(1) as count_num')->group(['ManagerId'])->fetchAll();
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @description: 查询符合筛选条件的所有用户数量
|
||
|
|
* @param {*}
|
||
|
|
* @return {*}
|
||
|
|
*/
|
||
|
|
public function getScreenUserCount($where)
|
||
|
|
{
|
||
|
|
return $this->field('ManagerId,ManagerName,count(1) as count_num')->where($where)->group(['ManagerId'])->fetchAll();
|
||
|
|
}
|
||
|
|
|
||
|
|
public function setManager($where,$data,$limit){
|
||
|
|
return $this->where($where)->limit($limit)->update($data);
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|