Browse Source

收藏数统计

master
weigang 5 years ago
parent
commit
f17199bf1b
  1. 3
      app/Service/v3/Implementations/CollectStoreService.php

3
app/Service/v3/Implementations/CollectStoreService.php

@ -67,7 +67,8 @@ class CollectStoreService implements CollectStoreServiceInterface
public function countByUser($userId)
{
return UserCollection::query()->where(['user_id' => $userId])->count();
$marketIds = Market::query()->pluck('id');
return UserCollection::query()->where(['user_id' => $userId])->whereIn('market_id', $marketIds)->count();
// $ssdb = ApplicationContext::getContainer()->get(SSDBTask::class);
// $count = $ssdb->exec('get',SsdbKeys::COUNT_COLLECT_STORE_USER.$userId);

Loading…
Cancel
Save