|
@@ -156,14 +156,16 @@ class CollectInfo extends Controller
|
|
|
$sel_where[] = ['i.resale_status','in','1,2'];
|
|
|
$sel_where[] = ['i.is_destruction','=',1];
|
|
|
$sel_where[] = ['i.status','<>',2];
|
|
|
+ $goods_name = Db::name('store_collect')->where('id',$goods_id)->value('id');
|
|
|
$list = Db::name('store_order_info')
|
|
|
->alias('i')
|
|
|
- ->field('count(i.id) num,i.name,i.mid,u.phone,u.name user_name')
|
|
|
+ ->field('count(i.id) num,i.mid,u.phone,u.name user_name')
|
|
|
->join('store_member u','u.id = i.mid','left')
|
|
|
->group('i.mid')
|
|
|
->order('num desc')->where($sel_where)->select();
|
|
|
$export = [];
|
|
|
foreach ($list as $value){
|
|
|
+ $value['name'] = $goods_name;
|
|
|
$export[] = [
|
|
|
$value['name'],
|
|
|
$value['user_name'],
|