本地商家订单添加搜索

This commit is contained in:
wangxiaowei 2024-10-17 15:44:03 +08:00
parent fadd2daefb
commit 0d7c316726

@ -442,12 +442,17 @@ class LocalStoreLogic extends Logic
public static function orderList($post)
{
$s = "";
$where = [];
if (isset($post['state'])) {
$s = "state= " . $post['state'] . "";
$where[] = ['state', '=', $post['state']];
}
if (isset($post['keyword'])) {
$where[] = ['order_no', 'like', '%'. $post['keyword'] . '%'];
}
$list = LocalGoodsStore::where('lstore_id', $post['lstore_id'])
->where($s)
->where($where)
->where("state <> 3")
->page($post['page_no'], $post['page_size'])
->order('dtime desc')
@ -473,7 +478,7 @@ class LocalStoreLogic extends Logic
$list[$key]['local_msg'] = $local;
}
$count = LocalGoodsStore::where('lstore_id', $post['lstore_id'])
->where($s)
->where($where)
->where("state <> 3")
->count();
$all_count = LocalGoodsStore::where('lstore_id', $post['lstore_id'])