修改店铺街接口
This commit is contained in:
parent
47f6086afb
commit
3e757d21e8
@ -221,10 +221,13 @@ class LocalStoreLogic extends Logic
|
||||
$query->where('title', 'like', "%{$keyword}%")
|
||||
->where(['state' => 1, 'audit_status' => 1, 'delete_time' => 0]);
|
||||
}])
|
||||
->where($where)
|
||||
->where(['is_delete' => 0, 'store_state' => 1])
|
||||
->whereNotNull('shopLogo')
|
||||
->count();
|
||||
|
||||
// dump(LocalStore::getLastSql());die;
|
||||
|
||||
// 这里的Join只是为了配合with获取指定的字段
|
||||
$lists = LocalStore::alias('ls')
|
||||
->with(['street_goods' => function ($query) use ($keyword) {
|
||||
@ -234,7 +237,7 @@ class LocalStoreLogic extends Logic
|
||||
->withAttr('street_goods.url', function($v) {
|
||||
return UrlServer::getFileUrl($v);
|
||||
})
|
||||
->join('local_store_goods lsg', 'lsg.lstore_id = ls.lstore_id')
|
||||
->leftJoin('local_store_goods lsg', 'lsg.lstore_id = ls.lstore_id')
|
||||
->where(['ls.is_delete' => 0, 'ls.store_state' => 1])
|
||||
->where($where)
|
||||
->whereNotNull('ls.shopLogo')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user