修改店铺商品统计
This commit is contained in:
parent
c2a46c93a9
commit
faa314d14a
@ -904,7 +904,9 @@ class WorkbenchLogic extends BaseLogic
|
|||||||
'SUM(collect_num) as collect',
|
'SUM(collect_num) as collect',
|
||||||
'ROUND((COUNT(distinct(pay_uid))-1)/COUNT(distinct(uid)),2) as changes',
|
'ROUND((COUNT(distinct(pay_uid))-1)/COUNT(distinct(uid)),2) as changes',
|
||||||
'COUNT(distinct(pay_uid))-1 as repeats'
|
'COUNT(distinct(pay_uid))-1 as repeats'
|
||||||
])->group('product_id')->order('pay', ' desc')->limit(20)->select()->toArray();
|
])->group('product_id')->order('pay', 'desc')
|
||||||
|
->limit(20)
|
||||||
|
->select()->toArray();
|
||||||
foreach ($list as $key => &$item) {
|
foreach ($list as $key => &$item) {
|
||||||
$find = StoreProduct::where('id', $item['product_id'])->field('store_name,image')->find();
|
$find = StoreProduct::where('id', $item['product_id'])->field('store_name,image')->find();
|
||||||
$item['store_name'] = $find['store_name'];
|
$item['store_name'] = $find['store_name'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user