本地生活商品添加搜索

This commit is contained in:
wangxiaowei 2024-10-05 16:05:03 +08:00
parent d51d1539ad
commit abb4bfe1e1
2 changed files with 6 additions and 0 deletions

@ -16,6 +16,7 @@ class LocalStoreGoods extends Api
$get['page_no'] = $get['page_no'] ?? $this->page_no;
$get['page_size'] = $get['page_size'] ?? $this->page_size;
$get['type'] = $get['type'] ?? 1;
$get['keyword'] = $get['keyword'] ?? '';
$get['user_id'] = $this->user_id;
$result = LocalStoreGoodsLogic::lists($get);
if ($result) {

@ -35,6 +35,11 @@ class LocalStoreGoodsLogic extends Logic
$where[] = ['audit_status', '=', LocalStoreGoodsEnum::AUDIT_STATUS_REFUSE];
}
// 搜索商品名称
if ($get['keyword']) {
$where[] = ['title', 'like', '%' . $get['keyword'] . '%'];
}
$m_where[] = ['lstore_id', '=', $get['lstore_id']];
$m_where[] = ['delete_time', '=', 0];