|
|
$list = $model->page((int)$page, (int)$limit)->field('id,store_name,store_info,keyword,cate_id,image,IFNULL(sales,0) + IFNULL(ficti,0) as sales,price,stock,ot_price')->select()->each(function ($item) use ($uid, $type, $store_id) {
|
|
|
if ($uid) $item['cart_num'] = StoreCart::where('is_pay', 0)->where('is_del', 0)->where('is_new', 0)->where('type', 'product')->where('product_id', $item['id'])->where('uid', $uid)->value('cart_num');
|