insertGetId($data); } /** * 更新 * @access public * @author csdeshang * @param array $update_array 数据 * @param array $where_array 条件 * @return bool */ public function editInformsubject($update_array, $where_array) { return Db::name('informsubject')->where($where_array)->update($update_array); } /** * 删除 * @access public * @author csdeshang * @param array $condition 条件 * @return bool */ public function delInformsubject($condition) { return Db::name('informsubject')->where($condition)->delete(); } /** * 获得列表 * @access public * @author csdeshang * @param array $condition 查询条件 * @param int $pagesize 分页 * @param string $field 字段 * @param string $order 排序 * @return array */ public function getInformsubjectList($condition = '', $pagesize = '', $field = '', $order = 'informsubject_id asc') { if ($pagesize) { $res = Db::name('informsubject')->field($field)->where($condition)->order($order)->paginate(['list_rows' => $pagesize, 'query' => request()->param()], false); $this->page_info = $res; return $res->items(); } else { return Db::name('informsubject')->field($field)->where($condition)->order($order)->select()->toArray(); } } /** * 获取单个信息 * @access public * @author csdeshang * @param type $condition 查询条件 * @return type */ public function getOneInformsubject($condition) { return Db::name('informsubject')->where($condition)->find(); } }