重写获取本地商家方法
This commit is contained in:
parent
a78bb5d46c
commit
b9ea667ffd
@ -126,7 +126,7 @@ class LocalStoreLogic extends Logic
|
||||
// 数量统计
|
||||
$count = LocalStore::alias('ls')
|
||||
->join('local_store_goods lsg', 'ls.lstore_id = lsg.lstore_id')
|
||||
->where(['ls.is_delete' => 0, 'ls.store_state' => 1])
|
||||
->where(['ls.is_delete' => 0, 'ls.store_state' => 1, 'lsg.state' => 1, 'lsg.audit_status' => 1, 'lsg.delete_time' => 0])
|
||||
->where($where)
|
||||
->whereNotNull('ls.shopLogo')
|
||||
->count();
|
||||
@ -134,12 +134,12 @@ class LocalStoreLogic extends Logic
|
||||
// 列表
|
||||
$lists = LocalStore::alias('ls')
|
||||
->join('local_store_goods lsg', 'ls.lstore_id = lsg.lstore_id')
|
||||
->where(['ls.is_delete' => 0, 'ls.store_state' => 1])
|
||||
->where(['ls.is_delete' => 0, 'ls.store_state' => 1, 'lsg.state' => 1, 'lsg.audit_status' => 1, 'lsg.delete_time' => 0])
|
||||
->where($where)
|
||||
->whereNotNull('ls.shopLogo')
|
||||
->order('lsg.id desc')
|
||||
->page($data['page_no'], $data['page_size'])
|
||||
->field('ls.lstore_id as ls_id, ls.shopName, ls.longitude, ls.latitude, lsg.id, lsg.lstore_id, lsg.title, lsg.price')
|
||||
->field('ls.shopName, ls.longitude, ls.latitude, lsg.id, lsg.lstore_id, lsg.title, lsg.price')
|
||||
->select()->toArray();
|
||||
|
||||
foreach ($lists as $key => &$value) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user