setAttr('id', null)->isUpdate(false)->allowField(true)->save($arr); return $this->id; } public function getinfo($where) { $info = $this->where($where)->find(); return $info; } /*** * 获取列表数据 * 20211012 * wj */ public function getList($where = [], $field = "*", $page = 1, $size = 10, $order = "id desc", $group = "", $row = false) { $sqlObj = $this->where($where); if ("count" != $field) { $sqlObj = $sqlObj->field($field)->order($order)->group($group)->page($page, $size); if ($row) { $data = $sqlObj->find(); } else { $data = $sqlObj->select(); } } else { $data = $sqlObj = $sqlObj->count(); } return $data; } public function updateinfo($where, $updateData) { $row = $this->where($where)->update($updateData); return empty($row) ? false : $row; } }