1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <?php
- namespace app\common\model;
- use think\facade\Db;
- class Storereopen extends BaseModel {
- public $page_info;
-
-
- public function getStorereopenList($condition = array(), $pagesize = '', $order = 'storereopen_id desc') {
- if($pagesize){
- $result = Db::name('storereopen')->where($condition)->order($order)->paginate(['list_rows'=>$pagesize,'query' => request()->param()],false);
- $this->page_info = $result;
- return $result->items();
- }else{
- return Db::name('storereopen')->where($condition)->order($order)->select()->toArray();
- }
-
- }
-
- public function addStorereopen($data) {
- return Db::name('storereopen')->insertGetId($data);
- }
-
- public function getStorereopenInfo($condition) {
- return Db::name('storereopen')->where($condition)->find();
- }
-
- public function editStorereopen($data, $condition) {
- return Db::name('storereopen')->where($condition)->update($data);
- }
-
- public function getStorereopenCount($condition) {
- return Db::name('storereopen')->where($condition)->count();
- }
-
- public function delStorereopen($condition) {
- return Db::name('storereopen')->where($condition)->delete();
- }
- }
|