\serviceDataService

基础数据服务 Class DataService

Summary

Methods
Properties
Constants
deleteSequence()
createSequence()
save()
update()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

deleteSequence()

deleteSequence(string  $sequence, string  $type = 'SYSTEM') : boolean

删除指定序号

Parameters

string $sequence
string $type

Throws

\think\Exception
\think\exception\PDOException

Returns

boolean

createSequence()

createSequence(integer  $length = 10, string  $type = 'SYSTEM') : string

生成唯一序号 (失败返回 NULL )

Parameters

integer $length

序号长度

string $type

序号顾类型

Returns

string

save()

save(\think\db\Query|string  $dbQuery, array  $data, string  $key = 'id', array  $where = array()) : boolean

数据增量保存

Parameters

\think\db\Query|string $dbQuery

数据查询对象

array $data

需要保存或更新的数据

string $key

条件主键限制

array $where

其它的where条件

Throws

\think\Exception
\think\exception\PDOException

Returns

boolean

update()

update(\think\db\Query|string  $dbQuery, array  $where = array()) : boolean|null

更新数据表内容

Parameters

\think\db\Query|string $dbQuery

数据查询对象

array $where

额外查询条件

Throws

\think\Exception
\think\exception\PDOException

Returns

boolean|null