$modelClass
$modelClass : mixed
$modelClass : mixed
$modelInstance : ?\Illuminate\Database\Eloquent\Model
selectList(array $where, string|array $field = '*', int $page, int $limit, string $order = '', array $with = [], bool $search = false, array|null $withoutScopes = null) : \Illuminate\Database\Eloquent\Collection|null
查询列表
| array | $where | |
| string|array | $field | |
| int | $page | |
| int | $limit | |
| string | $order | |
| array | $with | |
| bool | $search | |
| array|null | $withoutScopes |
selectModel(array $where, array|string $field = '*', int $page, int $limit, string $order = '', array $with = [], bool $search = false, array|null $withoutScopes = null) : \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder|\Illuminate\Pagination\LengthAwarePaginator|null
获取某些条件数据
| array | $where | |
| array|string | $field | |
| int | $page | |
| int | $limit | |
| string | $order | |
| array | $with | |
| bool | $search | |
| array|null | $withoutScopes |
get( $id, array|null $field = null, array|null $with = [], string $order = '', array|null $withoutScopes = null) : \Illuminate\Database\Eloquent\Model|null
获取一条数据
| $id | ||
| array|null | $field | |
| array|null | $with | |
| string | $order | |
| array|null | $withoutScopes |
bcInc(mixed $key, string $incField, string $inc, string|null $keyField = null, int $acc = 2) : bool
高精度加法(修正精度问题)
| mixed | $key | 主键值或条件值 |
| string | $incField | 要增加的字段 |
| string | $inc | 增加的值 |
| string|null | $keyField | 条件字段名,默认为'id' |
| int | $acc | 精度(小数位数) |