|
@@ -42,7 +42,8 @@ class Card extends BaseModel
|
|
$model = new self;
|
|
$model = new self;
|
|
$model = $model->alias('s');
|
|
$model = $model->alias('s');
|
|
if ($where['status'] != '') $model = $model->where('s.status', $where['status']);
|
|
if ($where['status'] != '') $model = $model->where('s.status', $where['status']);
|
|
- if ($where['name'] != '') $model = $model->where('s.name|s.code', 'LIKE', "%$where[name]%");
|
|
|
|
|
|
+ if (isset($where['store_id']) && $where['store_id'] != '') $model = $model->where('s.store_id', $where['store_id']);
|
|
|
|
+ if (isset($where['name']) && $where['name'] != '') $model = $model->where('s.name|s.code', 'LIKE', "%$where[name]%");
|
|
$model = $model->page(bcmul($where['page'], $where['limit'], 0), $where['limit']);
|
|
$model = $model->page(bcmul($where['page'], $where['limit'], 0), $where['limit']);
|
|
$model = $model->order('s.id desc');
|
|
$model = $model->order('s.id desc');
|
|
return self::page($model, function ($item) {
|
|
return self::page($model, function ($item) {
|