\Core\ServicesUserService

UserService 类的介绍

Summary

Methods
Properties
Constants
__get()
getBusinessContainerInstance()
getModelInstance()
getServiceInstance()
getList()
getPagesInfo()
getInfo()
saveUser()
deleteInfo()
getInfoByWhere()
searchUserList()
$userModel
No constants found
No protected methods found
$container
$businessContainerKey
N/A
No private methods found
No private properties found
N/A

Properties

$userModel

$userModel : \APP\Models\User

Type

\APP\Models\User

$container

$container : \Psr\Container\ContainerInterface

Type

\Psr\Container\ContainerInterface

$businessContainerKey

$businessContainerKey : 

Created by PhpStorm.

可以实现自动注入的业务容器 User:YM Date:2020/1/12 Time:上午8:18

Type

Methods

__get()

__get(  $key) : \Psr\Container\ContainerInterface|void

__get 隐式注入服务类 User:YM Date:2019/11/21 Time:上午9:27

Parameters

$key

Returns

\Psr\Container\ContainerInterface|void

getBusinessContainerInstance()

getBusinessContainerInstance(  $key) : mixed

getBusinessContainerInstance 获取业务容器实例 User:YM Date:2020/1/12 Time:上午8:15

Parameters

$key

Returns

mixed

getModelInstance()

getModelInstance(  $key) : mixed

getModelInstance 获取数据模型类实例 User:YM Date:2019/11/21 Time:上午10:30

Parameters

$key

Returns

mixed

getServiceInstance()

getServiceInstance(  $key) : mixed

getServiceInstance 获取服务类实例 User:YM Date:2019/11/21 Time:上午10:30

Parameters

$key

Returns

mixed

getList()

getList(array  $where = array(), array  $order = array(), integer  $offset, integer  $limit) : mixed

getList 条件获取用户列表 User:YM Date:2020/2/5 Time:下午4:08

Parameters

array $where

查询条件

array $order

排序条件

integer $offset

偏移

integer $limit

条数

Returns

mixed

getPagesInfo()

getPagesInfo(array  $where = array()) : array

getPagesInfo 获取分页信息 User:YM Date:2020/2/5 Time:下午4:09

Parameters

array $where

Returns

array

getInfo()

getInfo(  $id, boolean  $type = true) : \App\Models\BaseModel|\Hyperf\Database\Model\Model|null

getInfo 获取用户数据 User:YM Date:2020/1/8 Time:下午7:52

Parameters

$id

可以传入数组

boolean $type

是否使用缓存

Returns

\App\Models\BaseModel|\Hyperf\Database\Model\Model|null

saveUser()

saveUser(  $inputData, boolean  $type = false) : null

saveUser 保存用户,构造数据,防止注入 不接收数据库字段以外数据 User:YM Date:2020/2/5 Time:下午4:50

Parameters

$inputData
boolean $type

Throws

\Exception

Returns

null

deleteInfo()

deleteInfo(  $id) : integer

deleteInfo 根据id删除信息 User:YM Date:2020/2/5 Time:下午4:55

Parameters

$id

Returns

integer

getInfoByWhere()

getInfoByWhere(  $where, boolean  $type = false) : array

getInfoByWhere 根据条件获取用户信息 User:YM Date:2020/1/10 Time:上午12:32

Parameters

$where
boolean $type

是否多条

Returns

array

searchUserList()

searchUserList(  $search, array  $userIds = array(), array  $notIds = array(), integer  $limit = 10) : mixed

searchUserList 根据搜索条件返回list User:YM Date:2020/2/5 Time:下午2:27

Parameters

$search
array $userIds
array $notIds
integer $limit

Returns

mixed