ReadRecordStatsService.php 603 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: z-yang
  5. * Date: 2019/1/28
  6. * Time: 16:22
  7. */
  8. namespace App\Modules\User\Services;
  9. use Redis;
  10. class ReadRecordStatsService
  11. {
  12. public static function record($uid,$bid,$cid,$distribution_channel_id,$send_order_id,$from,$sequence){
  13. $data = compact('uid', 'bid','cid','distribution_channel_id','send_order_id','from','sequence');
  14. $data['created_at'] = $data['updated_at'] = date('Y-m-d H:i:s');
  15. $data['attach'] = '';
  16. try{
  17. Redis::lpush('ReadRecordStats',json_encode($data));
  18. }catch (\Exception $e){}
  19. }
  20. }