|
|
|
@ -100,6 +100,8 @@ class GoodsRecommendController extends BaseController |
|
|
|
$goodsTable = ApplicationContext::getContainer()->get(Goods::class)->getTable(); |
|
|
|
|
|
|
|
$goods = Goods::query() |
|
|
|
->select(''.$goodsTable.'.*') |
|
|
|
->addSelect(''.$goodsTable.'.sales as total_sales') |
|
|
|
->join($storeTable,''.$storeTable.'.id', '=', ''.$goodsTable.'.store_id') |
|
|
|
->where([ |
|
|
|
''.$storeTable.'.is_open' => StoreConstants::IS_OPEN_YES, |
|
|
|
|