You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
612 B

5 years ago
5 years ago
5 years ago
  1. <?php
  2. namespace App\Service\v3\Implementations;
  3. use App\TaskWorker\SSDBTask;
  4. use Hyperf\Redis\Redis;
  5. use Hyperf\Utils\ApplicationContext;
  6. class ShareInfoService implements \App\Service\v3\Interfaces\ShareInfoServiceInterface
  7. {
  8. public function getForApplet()
  9. {
  10. $redis = ApplicationContext::getContainer()->get(Redis::class);
  11. $shareInfos = $redis->hGetAll('program_share_card');
  12. $shareInfos = array_values($shareInfos);
  13. array_walk($shareInfos, function (&$value, $key) {
  14. $value = json_decode($value, true);
  15. });
  16. return $shareInfos?:[];
  17. }
  18. }