|
@@ -45,19 +45,19 @@ class SystemStoreStaff extends BaseModel
|
|
|
*/
|
|
|
public static function lst($where)
|
|
|
{
|
|
|
- $model = self::page((int)$where['page'], (int)$where['limit']);
|
|
|
+ $model = self::alias('a')
|
|
|
+ ->join('wechat_user u', 'u.uid=a.uid')
|
|
|
+ ->join('system_store s', 'a.store_id = s.id')
|
|
|
+ ->field('a.id,u.nickname,a.avatar,a.staff_name,a.status,a.add_time,s.name');
|
|
|
if (isset($where['store_id']) && $where['store_id'] != '') {
|
|
|
$model = $model->where('store_id', $where['store_id']);
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- $model = $model->alias('a')
|
|
|
- ->join('wechat_user u', 'u.uid=a.uid')
|
|
|
- ->join('system_store s', 'a.store_id = s.id')
|
|
|
- ->field('a.id,u.nickname,a.avatar,a.staff_name,a.status,a.add_time,s.name');
|
|
|
+ $count = $model->count();
|
|
|
+ $model = $model->page((int)$where['page'], (int)$where['limit']);
|
|
|
$data = $model->select();
|
|
|
- $count = $data->count();
|
|
|
return compact('count', 'data');
|
|
|
}
|
|
|
|