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