where($condition)->order($order)->paginate(['list_rows' => $pagesize, 'query' => request()->param()], false); $this->page_info = $list; return $list->items(); } else { return Db::name('storeclass')->where($condition)->order($order)->limit($limit)->select()->toArray(); } } /** * 取得单条信息 * @access public * @author csdeshang * @param type $condition 条件 * @return type */ public function getStoreclassInfo($condition = array()) { return Db::name('storeclass')->where($condition)->find(); } /** * 删除类别 * @access public * @author csdeshang * @param type $condition 条件 * @return type */ public function delStoreclass($condition = array()) { return Db::name('storeclass')->where($condition)->delete(); } /** * 增加店铺分类 * @access public * @author csdeshang * @param array $data 数据 * @return bool */ public function addStoreclass($data) { return Db::name('storeclass')->insertGetId($data); } /** * 更新分类 * @access public * @author csdeshang * @param array $data 数据 * @param array $condition 条件 * @return bool */ public function editStoreclass($data = array(), $condition = array()) { return Db::name('storeclass')->where($condition)->update($data); } }