维护用户自动分配用户
This commit is contained in:
43
app/manager/model/User.php
Normal file
43
app/manager/model/User.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user