|
|
$list = $model->page((int)$page, (int)$limit)->field('id,store_name,cate_id,image,IFNULL(sales,0) + IFNULL(ficti,0) as sales,price,stock,spec_type,max_integral,is_integral,is_gold,give_integral')->select()->each(function ($item) use ($uid, $type) {
|
|
$list = $model->page((int)$page, (int)$limit)->field('id,store_name,cate_id,image,IFNULL(sales,0) + IFNULL(ficti,0) as sales,price,stock,spec_type,max_integral,is_integral,is_gold,give_integral')->select()->each(function ($item) use ($uid, $type) {
|
|
|
$item['is_att'] = StoreProductAttrValueModel::where(['product_id' => $item['id'], 'type' => 0])->count() ? true : false;
|
|
$item['is_att'] = StoreProductAttrValueModel::where(['product_id' => $item['id'], 'type' => 0])->count() ? true : false;
|