field($field)->order($order)->limit($limit)->select(); } /** * @author 涂润 * 获取单条信息 */ public static function getOne($where, $field, $order = []) { return self::where($where)->field($field)->order($order)->find(); } /** * @author 涂润 * 获取条数 * @param $where * @return int|string */ public static function getCount($where, $lock = false) { return self::where($where)->lock($lock)->count(); } /** * @author 涂润 * 添加/主键更新单条记录 * @param $data * @return false|int */ public function add($data) { return $this->save($data); } }